songhuangfeng123
2022-09-01 b854d8d7604329dcf99584d15f83ff02076d9e07
goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/TargetDutyfileInfoController.java
@@ -1,4 +1,5 @@
package com.gkhy.safePlatform.targetDuty.controller;
import java.util.ArrayList;
import java.util.Date;
@@ -52,7 +53,7 @@
      PageUtils.checkCheck(pageQuery);
      return this.targetDutyfileInfoService.queryAll(pageQuery);
    }
    /**
     * 通过主键查询单条数据
@@ -87,11 +88,21 @@
     * @param ids 主键结合
     * @return 删除结果
     */
    @GetMapping(value = "/delete")
    public ResultVO delete(String ids) {
   List<String> idList = Arrays.stream(ids.split(","))
                .collect(Collectors.toList());
        this.targetDutyfileInfoService.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<TargetDutyfileInfo> delList = new ArrayList<>();
        idList.forEach(f->{
            TargetDutyfileInfo info = new TargetDutyfileInfo();
            info.setDelFlag(1);
            info.setId(f);
            delList.add(info);
        });
        this.targetDutyfileInfoService.updateBatchById(delList);
        return new ResultVO<>(ResultCodes.OK);
    }
@@ -106,4 +117,4 @@
    }
}
}