hjl
2024-07-01 03c6572c7918beaa20365e69c9694a11f0d9948a
ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/NoticesController.java
@@ -6,6 +6,7 @@
import com.ruoyi.admin.entity.Notices;
import com.ruoyi.admin.service.NoticesService;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@@ -39,6 +40,7 @@
     * @param pageNum  页码
     * @param pageSize 每页显示条数
     */
    @RequiresPermissions("system_notice")
    @ApiOperation(value = "系统通知分页查询列表", tags = {"后台-系统设置-系统通知管理"})
    @GetMapping(value = "/page")
    @ApiImplicitParams({
@@ -53,8 +55,8 @@
    /**
     * 系统通知列表
     *
     */
    @RequiresPermissions("system_notice")
    @ApiOperation(value = "系统通知列表(不分页)", tags = {"后台-系统设置-系统通知管理"})
    @GetMapping(value = "/noticesList")
    public R<List<Notices>> noticesList() {
@@ -67,6 +69,7 @@
     *
     * @param id 系统通知id
     */
    @RequiresPermissions("system_notice")
    @ApiOperation(value = "系统通知详情", tags = {"后台-系统设置-系统通知管理"})
    @GetMapping(value = "/detail")
    @ApiImplicitParams({
@@ -81,9 +84,11 @@
     *
     * @param notices 系统通知信息
     */
    @RequiresPermissions("system_notice")
    @ApiOperation(value = "新增系统通知", tags = {"后台-系统设置-系统通知管理"})
    @PostMapping(value = "/save")
    public R<String> save(@RequestBody Notices notices) {
        notices.setNoticeDetail(String.valueOf(notices.getNoticeDetail()));
        return noticesService.save(notices) ? R.ok() : R.fail();
    }
@@ -92,6 +97,7 @@
     *
     * @param notices 系统通知信息
     */
    @RequiresPermissions("system_notice")
    @ApiOperation(value = "修改系统通知", tags = {"后台-系统设置-系统通知管理"})
    @PostMapping(value = "/update")
    public R<String> update(@RequestBody Notices notices) {
@@ -103,6 +109,7 @@
     *
     * @param ids 系统通知多条id拼接
     */
    @RequiresPermissions("system_notice")
    @ApiOperation(value = "批量删除系统通知", tags = {"后台-系统设置-系统通知管理"})
    @GetMapping(value = "/batchDelete")
    @ApiImplicitParams({