com.github.javaclub.base.domain.query.SysMenuQuery Maven / Gradle / Ivy
/* Automatic generated by CrudCodeGenerator wirtten by Gerald Chen
*
* @(#)SysMenuQuery.java 2023-09-06
*
* Copyright (c) 2023 - 2099. All Rights Reserved.
*
*/
package com.github.javaclub.base.domain.query;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.javaclub.base.domain.SysMenu;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* SysMenuQuery 查询条件
*
* @version $Id: SysMenuQuery.java 2023-09-06 19:11:11 Exp $
*/
@Data
@Builder
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "SysMenu 查询条件")
public class SysMenuQuery extends BaseQuery {
private static final long serialVersionUID = 1693998671709L;
@ApiModelProperty(value = "父菜单ID,一级菜单为0")
private Long parentId;
@ApiModelProperty(value = "类型: [0-目录 1-菜单 2-按钮]", allowableValues="0, 1, 2")
private Integer type;
public SysMenuQuery() {
}
public QueryWrapper queryWrapper() {
QueryWrapper q = super.buildBaseQuery();
q.eq(null != getParentId(), "parent_id", getParentId());
q.eq(null != getType(), "type", getType());
return q;
}
}