潘志宝
2024-09-12 ac6fb5406fccf2d9a0e39ae5e299c7fa207978da
提交 | 用户 | 时间
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;
7 import com.iailab.module.data.ind.value.entity.IndItemValueEntity;
8 import com.iailab.module.data.ind.value.vo.IndItemValuePageReqVO;
9 import org.apache.ibatis.annotations.Mapper;
10
11 /**
12  * @author PanZhibao
13  * @Description
14  * @createTime 2024年09月11日
15  */
16 @TenantDS
17 @Mapper
18 public interface IndItemValueDao extends BaseMapperX<IndItemValueEntity> {
19
20     default PageResult<IndItemValueEntity> selectPage(IndItemValuePageReqVO reqVO) {
21         return selectPage(reqVO, new LambdaQueryWrapperX<IndItemValueEntity>()
22                 .eq(IndItemValueEntity::getItemNo, reqVO.getItemNo())
23                 .geIfPresent(IndItemValueEntity::getDataTime, reqVO.getStartTime())
24                 .leIfPresent(IndItemValueEntity::getDataTime, reqVO.getEndTime())
25                 .orderByDesc(IndItemValueEntity::getDataTime));
26     }
27 }