|
@@ -63,7 +63,7 @@ public class SubjectController extends BaseController {
|
|
|
return succeed(subjectService.queryPageTree(queryInfo));
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "修改、新增声部")
|
|
|
+ @ApiOperation(value = "新增声部")
|
|
|
@PostMapping("/upset")
|
|
|
@PreAuthorize("@pcs.hasPermissions('subject/upset')")
|
|
|
public Object update(@RequestBody SubjectWrapper.AddSubject add) {
|
|
@@ -72,16 +72,26 @@ public class SubjectController extends BaseController {
|
|
|
return succeed();
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "修改、新增声部")
|
|
|
- @PostMapping("/update")
|
|
|
- @PreAuthorize("@pcs.hasPermissions('subject/update')")
|
|
|
- public Object update(@RequestBody Subject subject) {
|
|
|
+ @ApiOperation(value = "修改分类名称")
|
|
|
+ @PostMapping("/updateCategoryName")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('subject/updateCategoryName')")
|
|
|
+ public HttpResponseResult<Object> updateCategoryName(@RequestBody Subject subject) {
|
|
|
Subject s = subjectService.get(subject.getId());
|
|
|
s.setName(subject.getName());
|
|
|
subjectService.update(s);
|
|
|
return succeed();
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "修改分类")
|
|
|
+ @PostMapping("/updateCategory")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('subject/updateCategory')")
|
|
|
+ public HttpResponseResult<Object> updateCategory(@RequestBody Subject subject) {
|
|
|
+ Subject s = subjectService.get(subject.getId());
|
|
|
+ s.setParentSubjectId(subject.getParentSubjectId());
|
|
|
+ subjectService.update(s);
|
|
|
+ return succeed();
|
|
|
+ }
|
|
|
+
|
|
|
@PreAuthorize("@pcs.hasPermissions('subject/enable')")
|
|
|
@PostMapping("/enable")
|
|
|
public HttpResponseResult<Boolean> enable(@RequestBody SubjectWrapper.SubjectEnable subjectEnable) {
|