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