eight
2024-11-29 04480e19c8b47c2cb469811d47679c923b82710d
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package cn.lihu.jh.module.ecg.dal.mysql.checktype;
 
import java.util.*;
 
import cn.lihu.jh.framework.common.pojo.PageResult;
import cn.lihu.jh.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.lihu.jh.framework.mybatis.core.mapper.BaseMapperX;
import cn.lihu.jh.module.ecg.dal.dataobject.checktype.CheckTypeDO;
import org.apache.ibatis.annotations.*;
import cn.lihu.jh.module.ecg.controller.admin.checktype.vo.*;
 
/**
 * 检查类型 Mapper
 *
 * @author majianbo
 */
@Mapper
public interface CheckTypeMapper extends BaseMapperX<CheckTypeDO> {
 
    default PageResult<CheckTypeDO> selectPage(CheckTypePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<CheckTypeDO>()
                .likeIfPresent(CheckTypeDO::getName, reqVO.getName())
                .eqIfPresent(CheckTypeDO::getValue, reqVO.getValue())
                .eqIfPresent(CheckTypeDO::getReadyNum, reqVO.getReadyNum())
                .betweenIfPresent(CheckTypeDO::getCreateTime, reqVO.getCreateTime())
                .eqIfPresent(CheckTypeDO::getNeedDevReady, reqVO.getNeedDevReady())
                .eqIfPresent(CheckTypeDO::getCallingColumn, reqVO.getCallingColumn())
                .eqIfPresent(CheckTypeDO::getDisplayBarcode, reqVO.getDisplayBarcode())
                .eqIfPresent(CheckTypeDO::getExpenseRecognition, reqVO.getExpenseRecognition())
                .eqIfPresent(CheckTypeDO::getTimeslotBookNum, reqVO.getTimeslotBookNum())
                .eqIfPresent(CheckTypeDO::getTimeslotReservedNum, reqVO.getTimeslotReservedNum())
                .eqIfPresent(CheckTypeDO::getAffinityCheckTypes, reqVO.getAffinityCheckTypes())
                .orderByDesc(CheckTypeDO::getId));
    }
 
    default PageResult<CheckTypeDO> selectPageForCallingScreen(CheckTypePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<CheckTypeDO>()
                .likeIfPresent(CheckTypeDO::getName, reqVO.getName())
                .eqIfPresent(CheckTypeDO::getValue, reqVO.getValue())
                .eqIfPresent(CheckTypeDO::getReadyNum, reqVO.getReadyNum())
                .betweenIfPresent(CheckTypeDO::getCreateTime, reqVO.getCreateTime())
                .eqIfPresent(CheckTypeDO::getNeedDevReady, reqVO.getNeedDevReady())
                .neIfPresent(CheckTypeDO::getCallingColumn, reqVO.getCallingColumn())
                .eqIfPresent(CheckTypeDO::getDisplayBarcode, reqVO.getDisplayBarcode())
                .eqIfPresent(CheckTypeDO::getExpenseRecognition, reqVO.getExpenseRecognition())
                .eqIfPresent(CheckTypeDO::getTimeslotBookNum, reqVO.getTimeslotBookNum())
                .eqIfPresent(CheckTypeDO::getTimeslotReservedNum, reqVO.getTimeslotReservedNum())
                .eqIfPresent(CheckTypeDO::getAffinityCheckTypes, reqVO.getAffinityCheckTypes())
                .orderByDesc(CheckTypeDO::getId));
    }
 
    @Select("SELECT * FROM lihu.check_type;")
    @Results({
            @Result(property = "displayBarcode", column = "display_barcode", typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler.class),
            @Result(property = "affinityCheckTypes", column = "affinity_check_types", typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler.class)
    })
    List<CheckTypeDO> simpleCheckTypeList();
 
}