潘志宝
2024-12-15 bbe7acfbe5a4c08d6edc91eaf81dcecf9d630e18
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
package com.iailab.module.data.ind.item.dao;
 
import com.iailab.framework.common.pojo.PageResult;
import com.iailab.framework.mybatis.core.mapper.BaseMapperX;
import com.iailab.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.iailab.framework.tenant.core.db.dynamic.TenantDS;
import com.iailab.module.data.ind.item.entity.IndItemEntity;
import com.iailab.module.data.ind.item.vo.IndItemPageReqVO;
import com.iailab.module.data.ind.item.vo.IndItemRespVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
 
import java.util.List;
 
/**
 * @author PanZhibao
 * @Description
 * @createTime 2024年09月11日
 */
@TenantDS
@Mapper
public interface IndItemDao extends BaseMapperX<IndItemEntity> {
    List<IndItemRespVO> getItemList(@Param("params")IndItemPageReqVO reqVO);
 
    default PageResult<IndItemEntity> selectPage(IndItemPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<IndItemEntity>()
                .likeIfPresent(IndItemEntity::getItemNo, reqVO.getItemNo())
                .likeIfPresent(IndItemEntity::getItemName, reqVO.getItemName())
                .eqIfPresent(IndItemEntity::getItemType, reqVO.getItemType())
                .eqIfPresent(IndItemEntity::getItemCategory, reqVO.getItemCategory())
                .orderByDesc(IndItemEntity::getCreateTime));
    }
 
 
}