无关风月
24 分钟以前 b5ead35c1d955f2a0e2e10da79254860d0ba95e9
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,7 +55,7 @@
    /**
     * 系统通知列表
     *
     * -- 远程调用
     */
    @ApiOperation(value = "系统通知列表(不分页)", tags = {"后台-系统设置-系统通知管理"})
    @GetMapping(value = "/noticesList")
@@ -64,9 +66,21 @@
    /**
     * 系统通知详情
     * -- 远程调用
     */
    @ApiOperation(value = "系统通知详情", tags = {"后台-系统设置-系统通知管理"})
    @GetMapping(value = "/noticesDetail")
    public R<Notices> noticesDetail(@RequestParam("id") Integer id) {
        return R.ok(noticesService.lambdaQuery().eq(Notices::getIsDelete, 0)
                .eq(Notices::getId, id).one());
    }
    /**
     * 系统通知详情
     *
     * @param id 系统通知id
     */
    @RequiresPermissions("notice_detail")
    @ApiOperation(value = "系统通知详情", tags = {"后台-系统设置-系统通知管理"})
    @GetMapping(value = "/detail")
    @ApiImplicitParams({
@@ -81,9 +95,11 @@
     *
     * @param notices 系统通知信息
     */
    @RequiresPermissions("notice_save")
    @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 +108,7 @@
     *
     * @param notices 系统通知信息
     */
    @RequiresPermissions("notice_update")
    @ApiOperation(value = "修改系统通知", tags = {"后台-系统设置-系统通知管理"})
    @PostMapping(value = "/update")
    public R<String> update(@RequestBody Notices notices) {
@@ -103,6 +120,7 @@
     *
     * @param ids 系统通知多条id拼接
     */
    @RequiresPermissions("notice_delete")
    @ApiOperation(value = "批量删除系统通知", tags = {"后台-系统设置-系统通知管理"})
    @GetMapping(value = "/batchDelete")
    @ApiImplicitParams({