From 0414ddb0b2b3a7199ae6181a770f97ac140dbd73 Mon Sep 17 00:00:00 2001 From: zhangf <1603559716@qq.com> Date: 星期三, 08 五月 2024 16:46:22 +0800 Subject: [PATCH] spi统计 --- goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/TargetDutyfileInfoController.java | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-) diff --git a/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/TargetDutyfileInfoController.java b/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/TargetDutyfileInfoController.java index 9252a7e..cc1d71e 100644 --- a/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/TargetDutyfileInfoController.java +++ b/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; @@ -11,6 +12,7 @@ import com.gkhy.safePlatform.targetDuty.entity.TargetDutyfileInfo; import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetDivideDetailSaveOrUpdate; import com.gkhy.safePlatform.targetDuty.service.TargetDutyfileInfoService; +import com.gkhy.safePlatform.targetDuty.service.baseService.TargetDutyfileInfoBaseService; import com.google.common.collect.Lists; import org.springframework.web.bind.annotation.*; import com.gkhy.safePlatform.commons.query.PageQuery; @@ -40,6 +42,8 @@ */ @Resource private TargetDutyfileInfoService targetDutyfileInfoService; + @Resource + private TargetDutyfileInfoBaseService targetDutyfileInfoBaseService; /** * 分页查询所有数据 @@ -52,7 +56,7 @@ PageUtils.checkCheck(pageQuery); return this.targetDutyfileInfoService.queryAll(pageQuery); } - + /** * 通过主键查询单条数据 @@ -62,7 +66,7 @@ */ @GetMapping(value = "/selectOne/{id}") public ResultVO selectOne(@PathVariable Serializable id) { - return new ResultVO<>(ResultCodes.OK,this.targetDutyfileInfoService.getById(id)); + return new ResultVO<>(ResultCodes.OK,this.targetDutyfileInfoBaseService.getById(id)); } /** @@ -74,9 +78,9 @@ @PostMapping(value = "/addOrUpdate") public ResultVO update(@RequestBody TargetDutyfileInfo targetDutyfileInfo) { if (targetDutyfileInfo.getId() == null) { - return new ResultVO<>(ResultCodes.OK,targetDutyfileInfoService.save(targetDutyfileInfo)); + return new ResultVO<>(ResultCodes.OK,targetDutyfileInfoBaseService.save(targetDutyfileInfo)); } else { - targetDutyfileInfoService.update(targetDutyfileInfo,new UpdateWrapper<TargetDutyfileInfo>().eq("id",targetDutyfileInfo.getId())); + targetDutyfileInfoBaseService.update(targetDutyfileInfo,new UpdateWrapper<TargetDutyfileInfo>().eq("id",targetDutyfileInfo.getId())); return new ResultVO<>(ResultCodes.OK); } } @@ -87,11 +91,9 @@ * @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) { + this.targetDutyfileInfoService.delete(ids); return new ResultVO<>(ResultCodes.OK); } @@ -106,4 +108,4 @@ } -} +} \ No newline at end of file -- Gitblit v1.9.2