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