评论的展示、已读及跳转,消息接口优化
This commit is contained in:
@@ -10,6 +10,7 @@ import com.zyplayer.doc.data.config.security.DocUserDetails;
|
||||
import com.zyplayer.doc.data.config.security.DocUserUtil;
|
||||
import com.zyplayer.doc.data.repository.manage.entity.UserMessage;
|
||||
import com.zyplayer.doc.data.service.manage.UserMessageService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@@ -45,9 +46,11 @@ public class UserMessageController {
|
||||
IPage<UserMessage> page = new Page<>(pageNum, pageSize);
|
||||
QueryWrapper<UserMessage> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("accept_user_id", currentUser.getUserId());
|
||||
if (msgStatus != null && msgStatus >= 0) {
|
||||
wrapper.eq("msg_status", msgStatus);
|
||||
}
|
||||
wrapper.orderByAsc("msg_status").orderByDesc("creation_time");
|
||||
// if (msgStatus != null && msgStatus >= 0) {
|
||||
// wrapper.eq("msg_status", msgStatus);
|
||||
// }
|
||||
wrapper.notIn("msg_status", 2);
|
||||
userMessageService.page(page, wrapper);
|
||||
return DocResponseJson.ok(page);
|
||||
}
|
||||
@@ -83,6 +86,9 @@ public class UserMessageController {
|
||||
* @param status 状态
|
||||
*/
|
||||
public void update(String ids, Integer status) {
|
||||
if (StringUtils.isBlank(ids)) {
|
||||
return;
|
||||
}
|
||||
DocUserDetails currentUser = DocUserUtil.getCurrentUser();
|
||||
QueryWrapper<UserMessage> wrapper = new QueryWrapper<>();
|
||||
wrapper.in("id", Arrays.asList(ids.split(",")));
|
||||
|
||||
@@ -42,7 +42,7 @@ zyplayer:
|
||||
# ------WIKI文档相关------
|
||||
wiki:
|
||||
# WIKI文档的文件上传后的存储目录,!!截图或文件还是很重要的,建议您还要定期备份此目录的文件呢!!
|
||||
upload-path: e:/zyplayerDoc/wikiFiles
|
||||
upload-path: d:/zyplayerDoc/wikiFiles
|
||||
# 是否检查目录有被系统定期清理的风险,强烈建议开启
|
||||
upload-path-check: true
|
||||
# ------swagger相关配置------
|
||||
|
||||
Reference in New Issue
Block a user