Browse Source

放置位置返回实体

lyhzzz 3 years ago
parent
commit
6aa787f91a

+ 1 - 2
src/main/java/com/fdkankan/fusion/controller/CaseTagPointController.java

@@ -31,8 +31,7 @@ public class CaseTagPointController {
 
     @PostMapping("/place")
     public ResultData place(@RequestBody CaseTagPoint caseTagPoint){
-        caseTagPointService.place(caseTagPoint);
-        return ResultData.ok();
+        return ResultData.ok(caseTagPointService.place(caseTagPoint));
     }
 
     @GetMapping("/allList")

+ 1 - 1
src/main/java/com/fdkankan/fusion/service/ICaseTagPointService.java

@@ -19,7 +19,7 @@ public interface ICaseTagPointService extends IService<CaseTagPoint> {
 
     Long getCountByTagId(Integer tagId);
 
-    void place(CaseTagPoint caseTagPoint);
+    CaseTagPoint place(CaseTagPoint caseTagPoint);
 
     Object allList(Integer tagId);
 }

+ 2 - 1
src/main/java/com/fdkankan/fusion/service/impl/CaseTagPointServiceImpl.java

@@ -43,7 +43,7 @@ public class CaseTagPointServiceImpl extends ServiceImpl<ICaseTagPointMapper, Ca
     }
 
     @Override
-    public void place(CaseTagPoint caseTagPoint) {
+    public CaseTagPoint place(CaseTagPoint caseTagPoint) {
         if(caseTagPoint.getTagId() == null || StringUtils.isEmpty(caseTagPoint.getTagPoint())){
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
         }
@@ -52,6 +52,7 @@ public class CaseTagPointServiceImpl extends ServiceImpl<ICaseTagPointMapper, Ca
             caseTagPoint.setTagPointTitle("位置"+count+1);
         }
         this.save(caseTagPoint);
+        return caseTagPoint;
     }
 
     @Override