Browse Source

新增接口方法

hechunping 2 years ago
parent
commit
d99a4d2256

+ 0 - 2
sys-api-service/src/main/java/com/xy/service/AlgorithmServiceImpl.java

@@ -34,7 +34,6 @@ import static com.xy.utils.Beans.copy;
 @AllArgsConstructor
 @AllArgsConstructor
 @Api(tags = "算法平台")
 @Api(tags = "算法平台")
 public class AlgorithmServiceImpl extends ServiceImpl<AlgorithmMapper, Algorithm> implements AlgorithmService {
 public class AlgorithmServiceImpl extends ServiceImpl<AlgorithmMapper, Algorithm> implements AlgorithmService {
-    @PostMapping("list")
     @ApiOperation("集合查询")
     @ApiOperation("集合查询")
     public R<List<AlgorithmDto.Vo>> list(@RequestBody AlgorithmDto.SelectList selectList) {
     public R<List<AlgorithmDto.Vo>> list(@RequestBody AlgorithmDto.SelectList selectList) {
         LambdaQueryWrapper<Algorithm> lambdaQueryWrapper = new MybatisPlusQuery().eqWrapper(selectList, Algorithm.class).build();
         LambdaQueryWrapper<Algorithm> lambdaQueryWrapper = new MybatisPlusQuery().eqWrapper(selectList, Algorithm.class).build();
@@ -43,7 +42,6 @@ public class AlgorithmServiceImpl extends ServiceImpl<AlgorithmMapper, Algorithm
     }
     }
 
 
     @ApiOperation(value = "新增、更新算法平台", notes = "不传id为新增,传id为修改")
     @ApiOperation(value = "新增、更新算法平台", notes = "不传id为新增,传id为修改")
-    @PostMapping("saveOrUpdate")
     public R saveOrUpdate(@Validated @RequestBody AlgorithmDto.Save saveDto) {
     public R saveOrUpdate(@Validated @RequestBody AlgorithmDto.Save saveDto) {
         Long id = saveDto.getId();
         Long id = saveDto.getId();
         boolean isAdd = id == null || id == 0;
         boolean isAdd = id == null || id == 0;

+ 7 - 0
sys-api/src/main/java/com/xy/service/AlgorithmService.java

@@ -3,7 +3,9 @@ package com.xy.service;
 import com.xy.annotate.RestMappingController;
 import com.xy.annotate.RestMappingController;
 import com.xy.dto.AlgorithmDto;
 import com.xy.dto.AlgorithmDto;
 import com.xy.utils.R;
 import com.xy.utils.R;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestBody;
 
 
 import java.util.List;
 import java.util.List;
@@ -18,6 +20,11 @@ import java.util.List;
  */
  */
 @RestMappingController("/algorithm")
 @RestMappingController("/algorithm")
 public interface AlgorithmService {
 public interface AlgorithmService {
+    @ApiOperation("列表")
+    @PostMapping("list")
     R<List<AlgorithmDto.Vo>> list(@RequestBody AlgorithmDto.SelectList selectList);
     R<List<AlgorithmDto.Vo>> list(@RequestBody AlgorithmDto.SelectList selectList);
+
+    @ApiOperation("增加修改")
+    @PostMapping("saveOrUpdate")
     R saveOrUpdate(@Validated @RequestBody AlgorithmDto.Save saveDto);
     R saveOrUpdate(@Validated @RequestBody AlgorithmDto.Save saveDto);
 }
 }