调用feign接口传递参数为null问题修改

报警相关未修改方法名称修改
xml文件中sql书写内容修改
This commit is contained in:
qiaoqinzheng 2023-06-20 14:51:03 +08:00
parent 71dfb1e519
commit 68db2b25de
8 changed files with 11 additions and 10 deletions

View File

@ -23,13 +23,13 @@ public class AlarmContactGroupController {
@GetMapping("findInfo")
@ApiOperation(value = "查询报警联系人组信息详情", notes = "查询报警联系人组信息详情")
public Result findPage(String id){
public Result findInfo(String id){
return alarmContactGroupService.findInfo(id);
}
@PostMapping("create")
@ApiOperation(value = "新增报警人联系人组", notes = "新增报警联系人组")
public Result findPage(@RequestBody AlarmContactGroup alarmContactGroup){
public Result create(@RequestBody AlarmContactGroup alarmContactGroup){
return alarmContactGroupService.create(alarmContactGroup);
}

View File

@ -42,7 +42,7 @@ public class AlarmLogController {
@PostMapping("create")
@ApiOperation(value = "新增报警日志", notes = "新增报警日志")
public Result findPage(@RequestBody AlarmLog alarmLog){
public Result create(@RequestBody AlarmLog alarmLog){
return alarmLogService.create(alarmLog);
}

View File

@ -26,13 +26,13 @@ public class AlarmRuleController {
@GetMapping("findInfo")
@ApiOperation(value = "查看规则信息详情", notes = "查看规则信息详情")
public Result findPage(String id){
public Result findInfo(String id){
return alarmRuleService.findInfo(id);
}
@PostMapping("create")
@ApiOperation(value = "新增规则信息", notes = "新增规则信息")
public Result findPage(@RequestBody AlarmRule alarmRule){
public Result create(@RequestBody AlarmRule alarmRule){
return alarmRuleService.create(alarmRule);
}

View File

@ -21,8 +21,8 @@
<if test=" startDate!=null and startDate!='' ">
and MODDATE >= TO_DATE(#{startDate}, 'YYYY-MM-DD hh24:mi:ss')
</if>
ORDER BY ACQUISITION_STOP
</where>
ORDER BY ACQUISITION_STOP
</select>
</mapper>

View File

@ -20,7 +20,6 @@
<if test=" startDate!=null and startDate!='' ">
and MODDATE >= TO_DATE(#{startDate}, 'YYYY-MM-DD hh24:mi:ss')
</if>
ORDER BY ACQUISITION_STOP
</where>
</select>

View File

@ -3,6 +3,7 @@ package org.jeecg.modules.service;
import org.jeecg.modules.system.entity.GardsDetectors;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import java.util.List;
@ -16,6 +17,6 @@ public interface ICacheTimeService {
List<Map<String, String>> findCacheTime();
@RequestMapping("/gardsDetectors/findStationDetectors")
Map<String, List<GardsDetectors>> findStationDetectors(List<String> stationIds);
Map<String, List<GardsDetectors>> findStationDetectors(@RequestBody List<String> stationIds);
}

View File

@ -71,7 +71,7 @@ public class GardsDetectorsController {
}
@RequestMapping("findStationDetectors")
public Map<String, List<GardsDetectors>> findStationDetectors(List<String> stationIds){
public Map<String, List<GardsDetectors>> findStationDetectors(@RequestBody List<String> stationIds){
return gardsDetectorsService.findStationDetectors(stationIds);
}

View File

@ -154,9 +154,10 @@ public class GardsDetectorsServiceImpl extends ServiceImpl<GardsDetectorsMapper,
Map<String, List<GardsDetectors>> map = new HashMap<>();
if (CollectionUtils.isNotEmpty(stationIds)){
LambdaQueryWrapper<GardsDetectors> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(GardsDetectors::getStationId, stationIds);
List<GardsDetectors> detectorsList = this.baseMapper.selectList(queryWrapper);
for (String stationId:stationIds) {
List<GardsDetectors> detectors = detectorsList.stream().filter(item -> item.getStationId().equals(stationId) && item.getStatus().equals("Operating")).collect(Collectors.toList());
List<GardsDetectors> detectors = detectorsList.stream().filter(item -> item.getStationId().equals(Integer.valueOf(stationId)) && item.getStatus().trim().equals("Operating")).collect(Collectors.toList());
map.put(stationId, detectors);
}
}