1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package com.dy.pipIrrGlobal.daoPr;
 
import com.dy.pipIrrGlobal.pojoPr.PrMonitoringFlowmeter;
import org.apache.ibatis.annotations.Param;
 
import java.util.List;
import java.util.Map;
 
/**
 * @author ZhuBaoMin
 * @date 2024-01-05 10:18
 * @LastEditTime 2024-01-05 10:18
 * @Description
 */
public interface PrMonitoringFlowmeterMapper {
    int deleteByPrimaryKey(Long id);
 
    int insert(PrMonitoringFlowmeter record);
 
    int insertSelective(PrMonitoringFlowmeter record);
 
    PrMonitoringFlowmeter selectByPrimaryKey(Long id);
 
    int updateByPrimaryKeySelective(PrMonitoringFlowmeter record);
 
    int updateByPrimaryKey(PrMonitoringFlowmeter record);
 
    /**
     * 根据流量监测站、流量计、操作类型获取记录数量
     * @param monitoringId 监测站编号
     * @param flowmeterId 流量计编号
     * @param operateType 操作类型 1-捆绑,2-解绑
     * @return 符合条件记录数量
     */
    Integer getBindRecordCount(@Param("monitoringId") Long monitoringId, @Param("flowmeterId") Long flowmeterId, @Param("operateType") Byte operateType);
 
    /**
     * 根据 流量监测站编号 获取 绑定记录 按操作时间降序
     * @param monitoringId 监测站编号
     * @return 绑定记录
     */
    List<Map<String, Object>> getBingRecordsByMonitoringId(String monitoringId);
}