package cn.cecep.talroad.vo.query;

import cn.cecep.talroad.common.core.domain.query.PageQuery;
import cn.cecep.talroad.domain.BMainPollDisFile;
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;


/**
 * 排污许可附件信息对象 b_main_poll_dis_file
 *
 * @author szhpt
 * @date 2023-01-18*/
@ApiModel(value = "排污许可附件信息")
@EqualsAndHashCode(callSuper = false)
@Data
public class BMainPollDisFileQuery extends PageQuery
{

    @ApiModelProperty(value = "主键id")
    private Long fileId;
    @ApiModelProperty(value = "企业id")
    private String factoryId;
    @ApiModelProperty(value = "排污许可表id")
    private String pollDisId;
    @ApiModelProperty(value = "文件类型名称")
    private String fileType;
    @ApiModelProperty(value = "文件名称")
    private String fileName;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<BMainPollDisFile> createLambdaQueryWrapper(BMainPollDisFileQuery query) {
        QueryWrapper<BMainPollDisFile> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotNull(query.getFileId()), "file_id", query.getFileId());
        wrapper.eq(ObjectUtil.isNotNull(query.getFactoryId()), "factory_id", query.getFactoryId());
        wrapper.eq(ObjectUtil.isNotNull(query.getPollDisId()), "poll_dis_id", query.getPollDisId());
        wrapper.eq(ObjectUtil.isNotNull(query.getFileType()), "file_type", query.getFileType());
        wrapper.eq(ObjectUtil.isNotNull(query.getFileName()), "file_name", query.getFileName());
        return wrapper;
        }
}
