| New file | 
|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrGlobal.daoPr; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoPr.PrController; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voPr.VoController; | 
|---|
|  |  |  | 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-15 16:51 | 
|---|
|  |  |  | * @LastEditTime 2024-01-15 16:51 | 
|---|
|  |  |  | * @Description | 
|---|
|  |  |  | */ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Mapper | 
|---|
|  |  |  | public interface PrControllerMapper extends BaseMapper<PrController> { | 
|---|
|  |  |  | int deleteByPrimaryKey(Long id); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int insert(PrController record); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int insertSelective(PrController record); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | PrController selectByPrimaryKey(Long id); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int updateByPrimaryKeySelective(PrController record); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int updateByPrimaryKey(PrController record); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定获取控制器记录数 | 
|---|
|  |  |  | * @param params | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | Long getRecordCount(Map<?, ?> params); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定获取控制器记录 | 
|---|
|  |  |  | * @param params | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | List<VoController> getControllers(Map<?, ?> params); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据控制器编号获取控制器列表 | 
|---|
|  |  |  | * @param rtuAddr | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | List<Map<String, Object>> getControllersByAddr(@Param("rtuAddr") String rtuAddr); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据控制器编号获取控制器列表 | 
|---|
|  |  |  | * @param rtuAddr | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | List<PrController> getControllersByRtuAddrAndIntakeNotNull(@Param("rtuAddr") String rtuAddr); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据控制器编号逻辑删除控制 | 
|---|
|  |  |  | * @param controllerId | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | Integer deleteControllerById(@Param("controllerId") Long controllerId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据控制器编号获取未删除的控制器数量 | 
|---|
|  |  |  | * @param controllerId | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | Integer getRecordCountOfController(@Param("controllerId") Long controllerId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据控制器编号获取已绑定记录数 | 
|---|
|  |  |  | * @param controllerId | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | Integer getBindedCount(@Param("controllerId") Long controllerId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据控制器编号删除取水口编号 | 
|---|
|  |  |  | * @param controllerId | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | Integer deleteIntakeId(@Param("controllerId") Long controllerId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据取水口ID或阀控器地址获取阀控器对象 | 
|---|
|  |  |  | * @param intakeId | 
|---|
|  |  |  | * @param rtuAddr | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | PrController getRtu(@Param("intakeId") Long intakeId, @Param("rtuAddr") String rtuAddr); | 
|---|
|  |  |  | } | 
|---|