From 58a1078809f129905ae30e676c8705e2a083e2ec Mon Sep 17 00:00:00 2001
From: EricsHu <hrr145632>
Date: 星期三, 24 五月 2023 16:45:38 +0800
Subject: [PATCH] 111
---
src/main/java/com/qxueyou/scc/controller/MsgInfoController.java | 40 ++++++++++++++++++++--------------------
1 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/src/main/java/com/qxueyou/scc/controller/MsgInfoController.java b/src/main/java/com/qxueyou/scc/controller/MsgInfoController.java
index a95520d..5017220 100644
--- a/src/main/java/com/qxueyou/scc/controller/MsgInfoController.java
+++ b/src/main/java/com/qxueyou/scc/controller/MsgInfoController.java
@@ -21,13 +21,13 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
-@Api(tags="消息管理接口")
+@Api(tags="娑堟伅绠$悊鎺ュ彛")
@Controller
@CrossOrigin(origins="*",maxAge=3600)
@RequestMapping(value = "/msg/msg/")
public class MsgInfoController {
- // 分页查询中,默认记录条数和页数
+ // 鍒嗛〉鏌ヨ涓紝榛樿璁板綍鏉℃暟鍜岄〉鏁�
private static final int DEFAULT_PAGE_SIZE = 10;
private static final int DEFAULT_PAGE_NUM = 1;
@@ -35,15 +35,15 @@
IMsgInfoService msgInfoService;
/**
- * 消息列表
+ * 娑堟伅鍒楄〃
*/
- @ApiOperation(value = "获取消息列表")
+ @ApiOperation(value = "鑾峰彇娑堟伅鍒楄〃")
@RequestMapping(value = "list", method = RequestMethod.GET)
public @ResponseBody Result list(Short type,Integer pageSize,Integer pageNum) {
pageSize = pageSize != null && pageSize > 0 ? pageSize : DEFAULT_PAGE_SIZE;
pageNum = pageNum != null && pageNum > 0 ? pageNum : DEFAULT_PAGE_NUM;
- //消息数量
+ //娑堟伅鏁伴噺
int totalCount = msgInfoService.listCount(type);
Pager pager = new Pager(pageSize,pageNum);
pager.setTotalCount(totalCount);
@@ -58,48 +58,48 @@
}
/**
- * 删除消息
+ * 鍒犻櫎娑堟伅
* @param msgIds
* @return
*/
- @ApiOperation(value = "删除消息")
+ @ApiOperation(value = "鍒犻櫎娑堟伅")
@RequestMapping(value = "delete", method = RequestMethod.GET)
public @ResponseBody Result deleteUserMsg(String msgIds){
if(StringUtils.isEmpty(msgIds)){
- return new Result(false,"参数错误!");
+ return new Result(false,"鍙傛暟閿欒锛�");
}
return this.msgInfoService.deleteUserMsg(msgIds.split(","));
}
/**
- * 清空个人消息
+ * 娓呯┖涓汉娑堟伅
*
* @return
*/
- @ApiOperation(value = "清空消息")
+ @ApiOperation(value = "娓呯┖娑堟伅")
@RequestMapping(value = "clear", method = RequestMethod.GET)
public @ResponseBody Result deleteAllUserMsg(Short type){
return this.msgInfoService.deleteAllUserMsg(type);
}
/**
- * 修改已读标志位
+ * 淇敼宸茶鏍囧織浣�
* @param msgId
* @return
*/
- @ApiOperation(value = "更新为已读")
+ @ApiOperation(value = "鏇存柊涓哄凡璇�")
@RequestMapping(value = "read", method = RequestMethod.GET)
public @ResponseBody Result updateReadFlag(String msgIds){
return this.msgInfoService.updateReadStatus(msgIds.split(","));
}
/**
- * 全部已读
+ * 鍏ㄩ儴宸茶
* @param msgId
* @return
*/
- @ApiOperation(value = "全部更新为已读")
+ @ApiOperation(value = "鍏ㄩ儴鏇存柊涓哄凡璇�")
@RequestMapping(value = "readall", method = RequestMethod.GET)
public @ResponseBody Result updateAllUserReadFlag(Short type){
return this.msgInfoService.updateUserAllReadStatus(type);
@@ -107,11 +107,11 @@
/**
- * 最近的提醒消息
+ * 鏈�杩戠殑鎻愰啋娑堟伅
* @param msgId
* @return
*/
- @ApiOperation(value = "最近的一条提醒信息")
+ @ApiOperation(value = "鏈�杩戠殑涓�鏉℃彁閱掍俊鎭�")
@RequestMapping(value = "last", method = RequestMethod.GET)
public @ResponseBody Result getLatest(){
return new Result(true,"",this.msgInfoService.readLastRemindMsg());
@@ -119,22 +119,22 @@
/**
- * 最近的提醒消息
+ * 鏈�杩戠殑鎻愰啋娑堟伅
* @param msgId
* @return
*/
- @ApiOperation(value = "按类型获取未读消息的数量")
+ @ApiOperation(value = "鎸夌被鍨嬭幏鍙栨湭璇绘秷鎭殑鏁伴噺")
@RequestMapping(value = "count", method = RequestMethod.GET)
public @ResponseBody Result queryUnReadMsgCountByType(){
return new Result(true,"",this.msgInfoService.queryUnReadMsgCountByType());
}
/**
- * 查询未读消息总数
+ * 鏌ヨ鏈娑堟伅鎬绘暟
* @param msgId
* @return
*/
- @ApiOperation(value = "查询用户未读消息总数")
+ @ApiOperation(value = "鏌ヨ鐢ㄦ埛鏈娑堟伅鎬绘暟")
@RequestMapping(value = "totalcount", method = RequestMethod.GET)
public @ResponseBody Result queryUnReadTotalCount(){
return new Result(true,"",CollectionUtils.newObjectMap("totalCount",this.msgInfoService.queryUnReadTotalCount()));
--
Gitblit v1.8.0