package cn.cecep.talroad.vo.query;

import cn.cecep.talroad.common.core.domain.query.PageQuery;
import cn.cecep.talroad.domain.PcNoiseType;
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_noise_type
 *
 * @author szhpt
 * @date 2023-01-11*/
@ApiModel(value = "噪声排放类型")
@EqualsAndHashCode(callSuper = false)
@Data
public class PcNoiseTypeQuery extends PageQuery
{

    @ApiModelProperty(value = "噪声类别id")
    private String id;
    @ApiModelProperty(value = "噪声类型名称")
    private String noiseTypeName;
    @ApiModelProperty(value = "噪声编码")
    private String noiseTypeCode;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<PcNoiseType> createLambdaQueryWrapper(PcNoiseTypeQuery query) {
        QueryWrapper<PcNoiseType> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotNull(query.getId()), "id", query.getId());
        wrapper.eq(ObjectUtil.isNotNull(query.getNoiseTypeName()), "noise_type_name", query.getNoiseTypeName());
        wrapper.eq(ObjectUtil.isNotNull(query.getNoiseTypeCode()), "noise_type_code", query.getNoiseTypeCode());
        return wrapper;
        }
}
