潘志宝
2024-11-15 4be7d863a161b64f8592a789d699e807545e7dc6
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
package com.iailab.module.data.plan.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.aop.TenantIgnore;
import com.iailab.framework.tenant.core.db.dynamic.DataDS;
import com.iailab.framework.tenant.core.db.dynamic.TenantDS;
import com.iailab.module.data.plan.item.entity.PlanItemEntity;
import com.iailab.module.data.plan.item.vo.PlanItemDataVO;
import com.iailab.module.data.plan.item.vo.PlanItemPageReqVO;
import org.apache.ibatis.annotations.Mapper;
 
import java.util.List;
import java.util.Map;
 
/**
 * @author PanZhibao
 * @Description
 * @createTime 2024年11月01日
 */
@TenantDS
@Mapper
public interface PlanItemDao extends BaseMapperX<PlanItemEntity> {
 
    @DataDS
    @TenantIgnore
    List<PlanItemDataVO> getSourceValue(Map<String, Object> params);
 
    default PageResult<PlanItemEntity> selectPage(PlanItemPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<PlanItemEntity>()
                .likeIfPresent(PlanItemEntity::getItemNo, reqVO.getItemNo())
                .likeIfPresent(PlanItemEntity::getItemName, reqVO.getItemName())
                .eqIfPresent(PlanItemEntity::getItemCategory, reqVO.getItemCategory())
                .orderByDesc(PlanItemEntity::getCreateTime));
    }
}