Jay
2024-10-09 41aaa0cc7c5fe00724be8fa44764a1fbc0c46dc9
提交 | 用户 | 时间
2a6f08 1 package com.iailab.module.data.ind.value.dao;
2
3 import com.iailab.framework.common.pojo.PageResult;
4 import com.iailab.framework.mybatis.core.mapper.BaseMapperX;
5 import com.iailab.framework.mybatis.core.query.LambdaQueryWrapperX;
6 import com.iailab.framework.tenant.core.db.dynamic.TenantDS;
cf757d 7 import com.iailab.module.data.ind.item.vo.IndItemValueVO;
8 import com.iailab.module.data.ind.value.dto.QuerySourceValueDTO;
2a6f08 9 import com.iailab.module.data.ind.value.entity.IndItemValueEntity;
10 import com.iailab.module.data.ind.value.vo.IndItemValuePageReqVO;
11 import org.apache.ibatis.annotations.Mapper;
cf757d 12
13 import java.util.List;
2a6f08 14
15 /**
16  * @author PanZhibao
17  * @Description
18  * @createTime 2024年09月11日
19  */
20 @TenantDS
21 @Mapper
22 public interface IndItemValueDao extends BaseMapperX<IndItemValueEntity> {
23
24     default PageResult<IndItemValueEntity> selectPage(IndItemValuePageReqVO reqVO) {
25         return selectPage(reqVO, new LambdaQueryWrapperX<IndItemValueEntity>()
26                 .eq(IndItemValueEntity::getItemNo, reqVO.getItemNo())
27                 .geIfPresent(IndItemValueEntity::getDataTime, reqVO.getStartTime())
28                 .leIfPresent(IndItemValueEntity::getDataTime, reqVO.getEndTime())
29                 .orderByDesc(IndItemValueEntity::getDataTime));
30     }
cf757d 31
32     List<IndItemValueVO> getSourceValue(QuerySourceValueDTO dto);
2a6f08 33 }