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.
91 lines
2.4 KiB
91 lines
2.4 KiB
package com.psdc.mapper;
|
|
|
|
import java.util.List;
|
|
|
|
import com.psdc.entity.PsdcStatisticsMonth;
|
|
import com.psdc.entity.request.EnergyStatisticsRequest;
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
import org.apache.ibatis.annotations.Param;
|
|
import org.springframework.data.domain.Pageable;
|
|
import org.springframework.security.core.parameters.P;
|
|
|
|
|
|
/**
|
|
* 每月统计表;(psdc_statistics_month)表数据库访问层
|
|
* @date : 2023-5-11
|
|
*/
|
|
@Mapper
|
|
public interface PsdcStatisticsMonthMapper{
|
|
/**
|
|
* 通过ID查询单条数据
|
|
*
|
|
* @param monthId 主键
|
|
* @return 实例对象
|
|
*/
|
|
PsdcStatisticsMonth queryById(Integer monthId);
|
|
/**
|
|
* 分页查询指定行数据
|
|
*
|
|
* @param psdcStatisticsMonth 查询条件
|
|
* @param pageable 分页对象
|
|
* @return 对象列表
|
|
*/
|
|
List<PsdcStatisticsMonth> queryAllByLimit(EnergyStatisticsRequest energyStatisticsRequest);
|
|
/**
|
|
* 新增数据
|
|
*
|
|
* @param psdcStatisticsMonth 实例对象
|
|
* @return 影响行数
|
|
*/
|
|
int insert(PsdcStatisticsMonth psdcStatisticsMonth);
|
|
/**
|
|
* 新增数据
|
|
*
|
|
* @param psdcStatisticsMonth 实例对象
|
|
* @return 影响行数
|
|
*/
|
|
int insertMonth(PsdcStatisticsMonth psdcStatisticsMonth);
|
|
/**
|
|
* 更新数据
|
|
*
|
|
* @param psdcStatisticsMonth 实例对象
|
|
* @return 影响行数
|
|
*/
|
|
int update(PsdcStatisticsMonth psdcStatisticsMonth);
|
|
|
|
/**
|
|
* 更新固定点位数据
|
|
* @param monthPoint 点位
|
|
* @param value 值
|
|
* @param monthId 月id
|
|
* @return 条数
|
|
*/
|
|
int updatePoint(@Param("monthPoint") String monthPoint,
|
|
@Param("value") Double value,
|
|
@Param("monthId") Integer monthId);
|
|
/**
|
|
* 通过主键删除数据
|
|
*
|
|
* @param monthId 主键
|
|
* @return 影响行数
|
|
*/
|
|
int deleteById(Integer monthId);
|
|
|
|
/**
|
|
* 根据设备id和日期查询
|
|
* @param deviceId 设备id
|
|
* @param date 日期
|
|
* @return 对象
|
|
*/
|
|
PsdcStatisticsMonth queryByDeviceIdAndDate(@Param("deviceId") Integer deviceId,
|
|
@Param("date") String date);
|
|
|
|
/**
|
|
* 计算一行数据总和
|
|
* @param deviceId 设备id
|
|
* @param date 日期
|
|
* @return 总和
|
|
*/
|
|
Double queryOneLineSum(@Param("deviceId") Integer deviceId,
|
|
@Param("date") String date);
|
|
} |