权限调整

master
zzy 2026-04-24 17:21:33 +08:00
parent f534c48d29
commit 32061d3d28
1 changed files with 9 additions and 9 deletions

View File

@ -50,14 +50,14 @@ public class CommunityPostController {
@PostMapping("/create")
@Operation(summary = "创建社区动态")
@PreAuthorize("@ss.hasPermission('community:community-post:create')")
@PreAuthorize("@ss.hasPermission('community:post:create')")
public CommonResult<Long> createCommunityPost(@Valid @RequestBody CommunityPostSaveReqVO createReqVO) {
return success(communityPostService.createCommunityPost(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新社区动态")
@PreAuthorize("@ss.hasPermission('community:community-post:update')")
@PreAuthorize("@ss.hasPermission('community:post:update')")
public CommonResult<Boolean> updateCommunityPost(@Valid @RequestBody CommunityPostSaveReqVO updateReqVO) {
communityPostService.updateCommunityPost(updateReqVO);
return success(true);
@ -66,7 +66,7 @@ public class CommunityPostController {
@DeleteMapping("/delete")
@Operation(summary = "删除社区动态")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('community:community-post:delete')")
@PreAuthorize("@ss.hasPermission('community:post:delete')")
public CommonResult<Boolean> deleteCommunityPost(@RequestParam("id") Long id) {
communityPostService.deleteCommunityPost(id);
return success(true);
@ -75,7 +75,7 @@ public class CommunityPostController {
@DeleteMapping("/delete-list")
@Parameter(name = "ids", description = "编号", required = true)
@Operation(summary = "批量删除社区动态")
@PreAuthorize("@ss.hasPermission('community:community-post:delete')")
@PreAuthorize("@ss.hasPermission('community:post:delete')")
public CommonResult<Boolean> deleteCommunityPostList(@RequestParam("ids") List<Long> ids) {
communityPostService.deleteCommunityPostListByIds(ids);
return success(true);
@ -84,7 +84,7 @@ public class CommunityPostController {
@GetMapping("/get")
@Operation(summary = "获得社区动态")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('community:community-post:query')")
@PreAuthorize("@ss.hasPermission('community:post:query')")
public CommonResult<CommunityPostRespVO> getCommunityPost(@RequestParam("id") Long id) {
CommunityPostDO post = communityPostService.getCommunityPost(id);
CommunityPostRespVO respVO = BeanUtils.toBean(post, CommunityPostRespVO.class);
@ -109,7 +109,7 @@ public class CommunityPostController {
@GetMapping("/page")
@Operation(summary = "获得社区动态分页")
@PreAuthorize("@ss.hasPermission('community:community-post:query')")
@PreAuthorize("@ss.hasPermission('community:post:query')")
public CommonResult<PageResult<CommunityPostRespVO>> getCommunityPostPage(@Valid CommunityPostPageReqVO pageReqVO) {
PageResult<CommunityPostDO> pageResult = communityPostService.getCommunityPostPage(pageReqVO);
PageResult<CommunityPostRespVO> respVOPageResult = BeanUtils.toBean(pageResult, CommunityPostRespVO.class);
@ -139,7 +139,7 @@ public class CommunityPostController {
@PutMapping("/publish")
@Operation(summary = "发布动态")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('community:community-post:publish')")
@PreAuthorize("@ss.hasPermission('community:post:publish')")
public CommonResult<Boolean> publishCommunityPost(@RequestParam("id") Long id) {
communityPostService.publishCommunityPost(id);
return success(true);
@ -148,7 +148,7 @@ public class CommunityPostController {
@PutMapping("/offline")
@Operation(summary = "下线动态")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('community:community-post:offline')")
@PreAuthorize("@ss.hasPermission('community:post:offline')")
public CommonResult<Boolean> offlineCommunityPost(@RequestParam("id") Long id) {
communityPostService.offlineCommunityPost(id);
return success(true);
@ -156,7 +156,7 @@ public class CommunityPostController {
@GetMapping("/export-excel")
@Operation(summary = "导出社区动态 Excel")
@PreAuthorize("@ss.hasPermission('community:community-post:export')")
@PreAuthorize("@ss.hasPermission('community:post:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportCommunityPostExcel(@Valid CommunityPostPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {