Просмотр исходного кода

乐器置换新增单独开启缴费,学生端问卷调查新增调查问卷名称

zouxuan 4 лет назад
Родитель
Сommit
88cf7d1e97

+ 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));
+    }
 }