|
|
@@ -22,26 +22,32 @@ import org.springframework.web.bind.annotation.*;
|
|
|
* @author xunmei
|
|
|
* @date 2023-09-19
|
|
|
*/
|
|
|
-@Api(tags = {"CoreMessageCenter" })
|
|
|
+@Api(tags = {"CoreMessageCenter"})
|
|
|
@RestController
|
|
|
@RequestMapping("/center")
|
|
|
public class CoreMessageCenterController extends BaseController {
|
|
|
@Autowired
|
|
|
private ICoreMessageCenterService coreMessageCenterService;
|
|
|
|
|
|
-/**
|
|
|
- * 查询消息中心列表
|
|
|
- */
|
|
|
+ /**
|
|
|
+ * 查询消息中心列表
|
|
|
+ */
|
|
|
|
|
|
-@ApiOperation(value = "查询消息列表")
|
|
|
+ @ApiOperation(value = "查询消息列表")
|
|
|
//@RequiresPermissions("core:center:list")
|
|
|
-@GetMapping("/messageList")
|
|
|
-public TableDataInfo<CoreMessageCenterVO> list(CoreMessageCenterDTO coreMessageCenter) {
|
|
|
- if (null==coreMessageCenter.getType()){
|
|
|
- coreMessageCenter.setType("3");
|
|
|
+ @GetMapping("/messageList")
|
|
|
+ public TableDataInfo<CoreMessageCenterVO> list(CoreMessageCenterDTO coreMessageCenter) {
|
|
|
+ if (null == coreMessageCenter.getType()) {
|
|
|
+ coreMessageCenter.setType("3");
|
|
|
+ }
|
|
|
+ return coreMessageCenterService.selectByPage(coreMessageCenter);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "查询消息列表是否有未读")
|
|
|
+ @GetMapping("/isRead")
|
|
|
+ public AjaxResult isRead() {
|
|
|
+ return success(coreMessageCenterService.isRead());
|
|
|
}
|
|
|
- return coreMessageCenterService.selectByPage(coreMessageCenter);
|
|
|
-}
|
|
|
|
|
|
/**
|
|
|
* 获取消息中心详细信息
|
|
|
@@ -52,6 +58,7 @@ public TableDataInfo<CoreMessageCenterVO> list(CoreMessageCenterDTO coreMessageC
|
|
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
|
|
return success(coreMessageCenterService.selectCoreMessageCenterById(id));
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 已读
|
|
|
*/
|
|
|
@@ -60,12 +67,13 @@ public TableDataInfo<CoreMessageCenterVO> list(CoreMessageCenterDTO coreMessageC
|
|
|
public AjaxResult isRead(@PathVariable("id") Long id) {
|
|
|
return success(coreMessageCenterService.isRead(id));
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 新增消息中心
|
|
|
*/
|
|
|
@ApiOperation(value = "新增CoreMessageCenter")
|
|
|
@RequiresPermissions("core:center:add")
|
|
|
- @Log(title = "消息中心" , businessType = BusinessType.INSERT)
|
|
|
+ @Log(title = "消息中心", businessType = BusinessType.INSERT)
|
|
|
@PostMapping
|
|
|
public AjaxResult add(@RequestBody CoreMessageCenter coreMessageCenter) {
|
|
|
return toAjax(coreMessageCenterService.insertCoreMessageCenter(coreMessageCenter));
|
|
|
@@ -76,7 +84,7 @@ public TableDataInfo<CoreMessageCenterVO> list(CoreMessageCenterDTO coreMessageC
|
|
|
*/
|
|
|
@ApiOperation(value = "修改CoreMessageCenter")
|
|
|
@RequiresPermissions("core:center:edit")
|
|
|
- @Log(title = "消息中心" , businessType = BusinessType.UPDATE)
|
|
|
+ @Log(title = "消息中心", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping
|
|
|
public AjaxResult edit(@RequestBody CoreMessageCenter coreMessageCenter) {
|
|
|
return toAjax(coreMessageCenterService.updateCoreMessageCenter(coreMessageCenter));
|
|
|
@@ -87,7 +95,7 @@ public TableDataInfo<CoreMessageCenterVO> list(CoreMessageCenterDTO coreMessageC
|
|
|
*/
|
|
|
@ApiOperation(value = "删除CoreMessageCenter")
|
|
|
@RequiresPermissions("core:center:remove")
|
|
|
- @Log(title = "消息中心" , businessType = BusinessType.DELETE)
|
|
|
+ @Log(title = "消息中心", businessType = BusinessType.DELETE)
|
|
|
@DeleteMapping("/{ids}")
|
|
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
|
|
return toAjax(coreMessageCenterService.deleteCoreMessageCenterByIds(ids));
|