package cn.cecep.talroad.vo.query;

import cn.cecep.talroad.common.core.domain.query.PageQuery;
import cn.cecep.talroad.domain.PcMenu;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;


/**
 * 企业档案菜单管理对象 pc_menu
 *
 * @author szhpt
 * @date 2023-02-02*/
@ApiModel(value = "企业档案菜单管理")
@EqualsAndHashCode(callSuper = false)
@Data
public class PcMenuQuery extends PageQuery
{

    @ApiModelProperty(value = "主键id")
    private String id;
    @ApiModelProperty(value = "菜单名称")
    private String menuCode;
    @ApiModelProperty(value = "菜单编码")
    private String menuName;
    @ApiModelProperty(value = "是否启用")
    private String menuIfUse;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<PcMenu> createLambdaQueryWrapper(PcMenuQuery query) {
        QueryWrapper<PcMenu> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotNull(query.getId()), "id", query.getId());
        wrapper.eq(ObjectUtil.isNotNull(query.getMenuCode()), "menu_code", query.getMenuCode());
        wrapper.eq(ObjectUtil.isNotNull(query.getMenuName()), "menu_name", query.getMenuName());
        wrapper.eq(ObjectUtil.isNotNull(query.getMenuIfUse()), "menu_if_use", query.getMenuIfUse());
        return wrapper;
        }
}
