songhuangfeng123
2022-09-01 b854d8d7604329dcf99584d15f83ff02076d9e07
equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/KeypointEquipmentInfoController.java
@@ -62,10 +62,10 @@
     */
    @PostMapping(value = "/page/list")
    public ResultVO selectAll(@RequestBody PageQuery<KeypointEquipmentInfoQueryCriteria> pageQuery){
      PageUtils.checkCheck(pageQuery);
        PageUtils.checkCheck(pageQuery);
      return this.keypointEquipmentInfoService.queryAll(pageQuery);
    }
    /**
     * 通过主键查询单条数据
@@ -100,11 +100,21 @@
     * @param ids 主键结合
     * @return 删除结果
     */
    @GetMapping(value = "/delete")
    public ResultVO delete(String ids) {
   List<String> idList = Arrays.stream(ids.split(","))
                .collect(Collectors.toList());
        this.keypointEquipmentInfoService.removeByIds(idList);
    @RequestMapping(value = "/delete",method = RequestMethod.POST)
    public ResultVO delete(@RequestBody Long[] ids) {
        if(ids == null){
            return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL);
        }
        List<Long> idList = Arrays.asList(ids);
        List<KeypointEquipmentInfo> delList = new ArrayList<>();
        idList.forEach(f->{
            KeypointEquipmentInfo info = new KeypointEquipmentInfo();
            info.setDelFlag(1);
            info.setId(f);
            delList.add(info);
        });
        this.keypointEquipmentInfoService.updateBatchById(delList);
        return new ResultVO<>(ResultCodes.OK);
    }
@@ -286,4 +296,4 @@
    }
}
}