1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package cn.iocoder.yudao.module.mes.dal.mysql.safety;
 
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.mes.controller.admin.safety.vo.inspection.SafetyInspectionPointPageReqVO;
import cn.iocoder.yudao.module.mes.dal.dataobject.safety.SafetyInspectionPointDO;
import org.apache.ibatis.annotations.Mapper;
 
import java.util.List;
 
/**
 * 安全生产 - 巡检点位 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface SafetyInspectionPointMapper extends BaseMapperX<SafetyInspectionPointDO> {
 
    default PageResult<SafetyInspectionPointDO> selectPage(SafetyInspectionPointPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<SafetyInspectionPointDO>()
                .likeIfPresent(SafetyInspectionPointDO::getCode, reqVO.getCode())
                .likeIfPresent(SafetyInspectionPointDO::getName, reqVO.getName())
                .eqIfPresent(SafetyInspectionPointDO::getPointType, reqVO.getPointType())
                .likeIfPresent(SafetyInspectionPointDO::getWorkshopName, reqVO.getWorkshopName())
                .eqIfPresent(SafetyInspectionPointDO::getStatus, reqVO.getStatus())
                .orderByAsc(SafetyInspectionPointDO::getCode));
    }
 
    default SafetyInspectionPointDO selectByCode(String code) {
        return selectOne(SafetyInspectionPointDO::getCode, code);
    }
 
    default List<SafetyInspectionPointDO> selectListByStatus(Integer status) {
        return selectList(new LambdaQueryWrapperX<SafetyInspectionPointDO>()
                .eq(SafetyInspectionPointDO::getStatus, status)
                .orderByAsc(SafetyInspectionPointDO::getCode));
    }
 
}