|
@@ -2,6 +2,7 @@ package com.ningdatech.pmapi.sys.controller; |
|
|
|
|
|
|
|
|
import com.ningdatech.basic.model.IdVo; |
|
|
import com.ningdatech.basic.model.IdVo; |
|
|
import com.ningdatech.basic.model.PageVo; |
|
|
import com.ningdatech.basic.model.PageVo; |
|
|
|
|
|
import com.ningdatech.log.annotation.WebLog; |
|
|
import com.ningdatech.pmapi.sys.entity.req.NoticeListReq; |
|
|
import com.ningdatech.pmapi.sys.entity.req.NoticeListReq; |
|
|
import com.ningdatech.pmapi.sys.entity.req.NoticeSaveReq; |
|
|
import com.ningdatech.pmapi.sys.entity.req.NoticeSaveReq; |
|
|
import com.ningdatech.pmapi.sys.entity.req.NoticeStatusModifyReq; |
|
|
import com.ningdatech.pmapi.sys.entity.req.NoticeStatusModifyReq; |
|
@@ -24,7 +25,7 @@ import javax.validation.Valid; |
|
|
* @since 2022-07-21 |
|
|
* @since 2022-07-21 |
|
|
*/ |
|
|
*/ |
|
|
@RestController |
|
|
@RestController |
|
|
@Api(tags = "消息管理") |
|
|
|
|
|
|
|
|
@Api(tags = "公告管理") |
|
|
@RequiredArgsConstructor |
|
|
@RequiredArgsConstructor |
|
|
@RequestMapping("/api/v1/notice") |
|
|
@RequestMapping("/api/v1/notice") |
|
|
public class NoticeController { |
|
|
public class NoticeController { |
|
@@ -33,6 +34,7 @@ public class NoticeController { |
|
|
|
|
|
|
|
|
@PostMapping("/save") |
|
|
@PostMapping("/save") |
|
|
@ApiOperation("新增通知") |
|
|
@ApiOperation("新增通知") |
|
|
|
|
|
@WebLog("新增公告") |
|
|
public IdVo<Long> save(@Valid @RequestBody NoticeSaveReq req) { |
|
|
public IdVo<Long> save(@Valid @RequestBody NoticeSaveReq req) { |
|
|
return noticeManage.saveOrModify(req); |
|
|
return noticeManage.saveOrModify(req); |
|
|
} |
|
|
} |
|
@@ -45,6 +47,7 @@ public class NoticeController { |
|
|
|
|
|
|
|
|
@PostMapping("/enabled") |
|
|
@PostMapping("/enabled") |
|
|
@ApiOperation("启用禁用") |
|
|
@ApiOperation("启用禁用") |
|
|
|
|
|
@WebLog("启用禁用") |
|
|
public Boolean save(@Valid @RequestBody NoticeStatusModifyReq req) { |
|
|
public Boolean save(@Valid @RequestBody NoticeStatusModifyReq req) { |
|
|
return noticeManage.changeEnabled(req); |
|
|
return noticeManage.changeEnabled(req); |
|
|
} |
|
|
} |
|
@@ -63,6 +66,7 @@ public class NoticeController { |
|
|
|
|
|
|
|
|
@DeleteMapping("/del") |
|
|
@DeleteMapping("/del") |
|
|
@ApiOperation("删除公告") |
|
|
@ApiOperation("删除公告") |
|
|
|
|
|
@WebLog("删除公告") |
|
|
public void delNotice(@RequestBody IdVo<Long> req) { |
|
|
public void delNotice(@RequestBody IdVo<Long> req) { |
|
|
noticeManage.delNotice(req.getId()); |
|
|
noticeManage.delNotice(req.getId()); |
|
|
} |
|
|
} |
|
|