xieshengjie пре 1 година
родитељ
комит
cf1e9b01e7

+ 5 - 5
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/update/TargetEnterController.java

@@ -17,7 +17,7 @@ import javax.annotation.Resource;
 import java.util.List;
 
 @RestController
-@RequestMapping("//target")
+@RequestMapping("//enter")
 public class TargetEnterController {
     @Resource
     private TargetEnterService targetEnterService;
@@ -58,10 +58,10 @@ public class TargetEnterController {
         }
     }
 
-    @DeleteMapping(value = "/target")
+    @DeleteMapping(value = "/target/{id}")
     @ApiOperation(value = "删", notes = "删")
-    public R delete(@RequestBody ProEconTargetdata data) {
-        boolean b = targetEnterService.delete(data);
+    public R delete(@PathVariable String id) {
+        boolean b = targetEnterService.delete(id);
         if (b) {
             return R.data(ResultMsg.ok(b));
         } else {
@@ -83,7 +83,7 @@ public class TargetEnterController {
 
 
     @GetMapping(value = "/wpls")
-    @ApiOperation(value = "查", notes = "查")
+    @ApiOperation(value = "查场站", notes = "查场站")
     public R wpls(@RequestParam(value = "wpid", required = true) String wpid) {
         List<ProBasicPowerstation> resultList  = targetEnterService.wpls(wpid);
         if (StringUtils.isNotNull(resultList)) {

+ 5 - 5
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/update/TargetEnterService.java

@@ -16,9 +16,7 @@ import com.gyee.runeconomy.util.DateUtils;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
-import java.util.Date;
-import java.util.List;
-import java.util.Optional;
+import java.util.*;
 import java.util.stream.Collectors;
 
 @Service
@@ -51,8 +49,10 @@ public class TargetEnterService {
         return proEconTargetdataService.saveOrUpdate(data);
     }
 
-    public boolean delete(ProEconTargetdata data) {
-        return proEconTargetdataService.removeById(data.getId());
+    public boolean delete(String ids) {
+        String[] split = ids.split(",");
+        List<String> list = Arrays.asList(split);
+        return proEconTargetdataService.removeByIds(list);
     }
 
     public List<ProEconTargetdata> get(String wpid, String date) {