潘志宝
2024-10-15 856d69ce678173e0a8e165bcb0135037d20b48ee
提交 | 用户 | 时间
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;
5bc3b4 6 import com.iailab.framework.tenant.core.aop.TenantIgnore;
441d30 7 import com.iailab.framework.tenant.core.db.dynamic.DataDS;
2a6f08 8 import com.iailab.framework.tenant.core.db.dynamic.TenantDS;
cf757d 9 import com.iailab.module.data.ind.item.vo.IndItemValueVO;
10 import com.iailab.module.data.ind.value.dto.QuerySourceValueDTO;
2a6f08 11 import com.iailab.module.data.ind.value.entity.IndItemValueEntity;
12 import com.iailab.module.data.ind.value.vo.IndItemValuePageReqVO;
13 import org.apache.ibatis.annotations.Mapper;
cf757d 14
15 import java.util.List;
2a6f08 16
17 /**
18  * @author PanZhibao
19  * @Description
20  * @createTime 2024年09月11日
21  */
22 @TenantDS
23 @Mapper
24 public interface IndItemValueDao extends BaseMapperX<IndItemValueEntity> {
25
26     default PageResult<IndItemValueEntity> selectPage(IndItemValuePageReqVO reqVO) {
27         return selectPage(reqVO, new LambdaQueryWrapperX<IndItemValueEntity>()
28                 .eq(IndItemValueEntity::getItemNo, reqVO.getItemNo())
29                 .geIfPresent(IndItemValueEntity::getDataTime, reqVO.getStartTime())
30                 .leIfPresent(IndItemValueEntity::getDataTime, reqVO.getEndTime())
31                 .orderByDesc(IndItemValueEntity::getDataTime));
32     }
441d30 33     @DataDS
5bc3b4 34     @TenantIgnore
cf757d 35     List<IndItemValueVO> getSourceValue(QuerySourceValueDTO dto);
2a6f08 36 }