Browse Source

内容管理,加权限

zouxuan 3 years ago
parent
commit
5f4690f3bf
1 changed files with 3 additions and 3 deletions
  1. 3 3
      cms/src/main/java/com/ym/mec/cms/controller/NewsController.java

+ 3 - 3
cms/src/main/java/com/ym/mec/cms/controller/NewsController.java

@@ -101,7 +101,7 @@ public class NewsController extends BaseController {
 	@ApiOperation("新增资讯")
 	@PostMapping(value = "/add", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
 	@AuditLogAnnotation(operateName = "资讯新增",interfaceURL = "news/add")
-//	@PreAuthorize("@pcs.hasPermissions('news/add')")
+	@PreAuthorize("@pcs.hasPermissions('news/add')")
 	public Object add(SysNewsInformation newsInfo) {
 		return succeed(sysNewsInformationService.insert(newsInfo));
 	}
@@ -109,7 +109,7 @@ public class NewsController extends BaseController {
 	@ApiOperation("更新资讯")
 	@PostMapping(value = "/update", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
 	@AuditLogAnnotation(operateName = "资讯更新",interfaceURL = "news/update")
-//	@PreAuthorize("@pcs.hasPermissions('news/update')")
+	@PreAuthorize("@pcs.hasPermissions('news/update')")
 	public Object update(SysNewsInformation newsInfo) {
 		Date date = new Date();
 		newsInfo.setUpdateTime(date);
@@ -120,7 +120,7 @@ public class NewsController extends BaseController {
 	@ApiOperation("删除")
 	@PostMapping(value = "/del/{id}", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
 	@AuditLogAnnotation(operateName = "资讯删除",interfaceURL = "news/del")
-//	@PreAuthorize("@pcs.hasPermissions('news/del')")
+	@PreAuthorize("@pcs.hasPermissions('news/del')")
 	public Object add(@PathVariable("id") Long id) {
 		return succeed(sysNewsInformationService.deleteWithLogical(id));
 	}