Administrator
2024-07-17 16900a8d681aed70bca5b3fea8dc28715dde9712
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package com.dy.pipIrrGlobal.daoPr;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dy.pipIrrGlobal.pojoPr.PrIntakeController;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
 
import java.util.List;
import java.util.Map;
 
/**
 * @author ZhuBaoMin
 * @date 2024-01-02 9:16
 * @LastEditTime 2024-01-02 9:16
 * @Description
 */
 
@Mapper
public interface PrIntakeControllerMapper extends BaseMapper<PrIntakeController> {
    int deleteByPrimaryKey(Long id);
 
    int insert(PrIntakeController record);
 
    int insertSelective(PrIntakeController record);
 
    PrIntakeController selectByPrimaryKey(Long id);
 
    int updateByPrimaryKeySelective(PrIntakeController record);
 
    int updateByPrimaryKey(PrIntakeController record);
 
    /**
     * 根据取水口编号、控制器编号、操作类别获取记录数量
     * 重复绑定、重复解绑都用该方法判断
     * @param intakeId 取水口ID
     * @param controllerId 控制器ID
     * @param operateType 操作类型 1-捆绑,2-解绑
     * @return 如何条件记录数
     */
    Integer getBindRecordCount(@Param("intakeId") Long intakeId, @Param("controllerId") Long controllerId, @Param("operateType") Byte operateType);
 
    /**
     * 根据取水口编号获取绑定记录列表
     * @param intakeId 取水口编号
     * @return 取水口与控制器绑定列表
     */
    List<Map<String, Object>> getBindsByIntakeId(@Param("intakeId") Long intakeId);
 
    /**
     * 根据控制器编号获取绑定记录列表
     * @param controllerId 控制器编号
     * @return 取水口与控制器绑定列表
     */
    List<Map<String, Object>> getBindsByControllerId(@Param("controllerId") Long controllerId);
 
    /**
     * 修改绑定记录通过取水口
     * @param record
     * @return
     */
    int updateByIntakeSelective(PrIntakeController record);
}