Commit 956cc656 by levphon

围栏开启关闭状态同步大数据

1 parent 5171871a
......@@ -32,6 +32,12 @@ public interface VehiclePermitMapper extends CommonBaseMapper<VehiclePermit> {
*/
List<VehiclePermitDTO> selectPermitVehicleByReceiverId(@Param("receiverId") Long receiverId, @Param("contentType") Integer contentType);
/**
* 批量插入指定授权数据
*
* @param list
* @return
*/
int insertIgnoreExistedPermit(@Param("list") List<VehiclePermit> list);
/**
......
......@@ -357,13 +357,20 @@ public class ElectricFenceService {
public int startStop(Long fenceId) {
ElectricFence electricFence = electricFenceMapper.selectById(fenceId);
if (electricFence.getEnableStatus() == 0) {
//开启
electricFence.setEnableStatus(1);
} else {
//关闭
electricFence.setEnableStatus(0);
}
electricFence.setUpdatedBy(ShieldContextHolder.getUserId());
electricFence.setUpdatedDate(new Date());
return electricFenceMapper.updateByPrimaryKeySelective(electricFence);
int cnt = electricFenceMapper.updateByPrimaryKeySelective(electricFence);
// 修改围栏状态 向大数据推送更新围栏状态(kafka)
eFenceComponent.optionElectricFence(electricFence, electricFence.getEnableStatus());
return cnt;
}
public void deleteById(Long fenceId) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!