You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
2.4 KiB
83 lines
2.4 KiB
package com.psdc.mapper;
|
|
|
|
import java.util.List;
|
|
|
|
import com.psdc.entity.PsdcStatisticsDay;
|
|
import com.psdc.entity.request.EnergyStatisticsRequest;
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
import org.apache.ibatis.annotations.Param;
|
|
import org.springframework.data.domain.Pageable;
|
|
|
|
|
|
/**
|
|
* 每日统计表;(psdc_statistics_day)表数据库访问层
|
|
* @date : 2023-5-11
|
|
*/
|
|
@Mapper
|
|
public interface PsdcStatisticsDayMapper{
|
|
/**
|
|
* 通过ID查询单条数据
|
|
*
|
|
* @param statisticsId 主键
|
|
* @return 实例对象
|
|
*/
|
|
PsdcStatisticsDay queryById(Integer statisticsId);
|
|
/**
|
|
* 分页查询指定行数据
|
|
*
|
|
* @param energyStatisticsRequest 查询条件
|
|
* @return 对象列表
|
|
*/
|
|
List<PsdcStatisticsDay> queryAllByLimit(EnergyStatisticsRequest energyStatisticsRequest);
|
|
|
|
/**
|
|
* 新增数据
|
|
* @param psdcStatisticsDay 实例对象
|
|
* @return 影响行数
|
|
*/
|
|
int insert(PsdcStatisticsDay psdcStatisticsDay);
|
|
|
|
Integer count(@Param("deviceId") Integer deviceId,
|
|
@Param("datetime") String datetime);
|
|
|
|
/**
|
|
* 新增数据
|
|
* @param psdcStatisticsDay 实例对象
|
|
* @return 影响行数
|
|
*/
|
|
int insertDay(PsdcStatisticsDay psdcStatisticsDay);
|
|
|
|
/**
|
|
* 更新数据
|
|
* @param psdcStatisticsDay 实例对象
|
|
* @return 影响行数
|
|
*/
|
|
int update(PsdcStatisticsDay psdcStatisticsDay);
|
|
|
|
Integer updateTodayDevEnergy(@Param(value = "valNo") String valNo,
|
|
@Param(value = "powerValue") Double powerValue,
|
|
@Param(value = "devId") Integer devId,
|
|
@Param(value = "samDate") String samDate);
|
|
|
|
Integer updateDay(@Param(value = "valNo") String valNo,
|
|
@Param(value = "powerValue") Double powerValue,
|
|
@Param(value = "devId") Integer devId,
|
|
@Param(value = "samDate") String samDate);
|
|
|
|
/**
|
|
* 通过主键删除数据
|
|
*
|
|
* @param statisticsId 主键
|
|
* @return 影响行数
|
|
*/
|
|
int deleteById(Integer statisticsId);
|
|
|
|
/**
|
|
* 计算一行数据总和
|
|
* @param deviceId 设备id
|
|
* @param datetime 日期
|
|
* @return 总和
|
|
*/
|
|
Double queryOneLineSum(@Param("deviceId") Integer deviceId,
|
|
@Param("datetime") String datetime);
|
|
} |