package cn.cecep.talroad.vo.query;

import cn.cecep.talroad.common.core.domain.query.PageQuery;
import cn.cecep.talroad.domain.PcIndustry;
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_industry
 *
 * @author szhpt
 * @date 2023-01-10*/
@ApiModel(value = "行业")
@EqualsAndHashCode(callSuper = false)
@Data
public class PcIndustryQuery extends PageQuery
{

    @ApiModelProperty(value = "$column.columnComment")
    private String id;
    @ApiModelProperty(value = "行业编码")
    private String indusCode;
    @ApiModelProperty(value = "行业名称")
    private String indusName;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<PcIndustry> createLambdaQueryWrapper(PcIndustryQuery query) {
        QueryWrapper<PcIndustry> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotNull(query.getId()), "id", query.getId());
        wrapper.eq(ObjectUtil.isNotNull(query.getIndusCode()), "indus_code", query.getIndusCode());
        wrapper.eq(ObjectUtil.isNotNull(query.getIndusName()), "indus_name", query.getIndusName());
        return wrapper;
        }
}
