瀏覽代碼

refactor: 小优化

fanyanpeng 2 年之前
父節點
當前提交
e34ee2e030

+ 1 - 1
src/main/java/com/seecoder/BlueWhale/Controller/ProductController.java

@@ -22,7 +22,7 @@ public class ProductController {
         return ResultVO.buildSuccess(productService.create(productVO));
     }
 
-    @PostMapping("/stock")
+    @PostMapping("/{storeId}/tocks")
     public ResultVO<Boolean> addStock(@RequestParam("id") Integer id,@RequestParam("number") Integer number){
         return ResultVO.buildSuccess(productService.addStock(id,number));
     }

+ 4 - 2
src/main/java/com/seecoder/BlueWhale/VO/ResultVO.java

@@ -19,11 +19,13 @@ public class ResultVO<T> implements Serializable {
 
     private T result;
 
+
+
     public static <T> ResultVO<T> buildSuccess(T result) {
-        return new ResultVO<T>("200", null, result);
+        return new ResultVO<T>("000", null, result);
     }
 
     public static <T> ResultVO<T> buildFailure(String msg) {
-        return new ResultVO<T>("500", msg, null);
+        return new ResultVO<T>("400", msg, null);
     }
 }