소스 검색

修改接口

yumeng 2 년 전
부모
커밋
aa6c954887
1개의 변경된 파일25개의 추가작업 그리고 0개의 파일을 삭제
  1. 25 0
      ruixuan-live/src/main/java/com/ruixuan/isc/controller/KuaishouItemCollectSamplesController.java

+ 25 - 0
ruixuan-live/src/main/java/com/ruixuan/isc/controller/KuaishouItemCollectSamplesController.java

@@ -274,6 +274,31 @@ public class KuaishouItemCollectSamplesController extends BaseController {
     }
 
 
+
+    @PutMapping("/update")
+    public JSONObject update(@RequestBody KuaishouItemCollectSamples kuaishouItemCollectSamples) {
+        JSONObject returnJson = new JSONObject();
+        try {
+            Long id = kuaishouItemCollectSamples.getId();
+            if (Check.isNull(id)) {
+                throw new Exception("id不能为空");
+            }
+
+            int i = kuaishouItemCollectSamplesService.updateKuaishouItemCollectSamples(kuaishouItemCollectSamples);
+            returnJson.put("code", 0);
+            returnJson.put("message", "修改成功");
+        } catch (Exception e) {
+            e.printStackTrace();
+            returnJson.put("code", -1);
+            returnJson.put("message", e.getMessage());
+        }
+        return returnJson;
+    }
+    
+    
+    
+
+
     @GetMapping("/detail")
     public JSONObject detail(Long id) {
         JSONObject returnJson = new JSONObject();