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));
|
}
|
|
}
|