Przeglądaj źródła

Merge branch 'online1' of http://git.dayaedu.com/yonge/mec

zouxuan 4 lat temu
rodzic
commit
8485d134e0

+ 12 - 0
mec-web/src/main/java/com/ym/mec/web/controller/ReplacementInstrumentCooperationController.java

@@ -79,4 +79,16 @@ public class ReplacementInstrumentCooperationController extends BaseController {
     public HttpResponseResult<ReplacementInstrumentCooperation> openPay(Integer id) {
         return succeed(replacementInstrumentCooperationService.openPay(id));
     }
+
+    @ApiOperation(value = "修改")
+    @PostMapping("/update")
+    @PreAuthorize("@pcs.hasPermissions('replacementInstrumentCooperation/update')")
+    public Object update(Integer id,String title) {
+        ReplacementInstrumentCooperation cooperation = replacementInstrumentCooperationService.get(id);
+        if(cooperation == null){
+            return failed("活动不存在");
+        }
+        cooperation.setTitle(title);
+        return succeed(replacementInstrumentCooperationService.update(cooperation));
+    }
 }