From 9bb10523664a293db17d6c4d16b62d52600ba1ee Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 5 Nov 2024 09:37:38 +0800 Subject: [PATCH] 【代码评审】商城:消息获取改为游标查询 --- yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/message/KeFuMessageListReqVO.java | 2 +- yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/kefu/KeFuMessageMapper.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/message/KeFuMessageListReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/message/KeFuMessageListReqVO.java index 4661933..6368ba4 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/message/KeFuMessageListReqVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/message/KeFuMessageListReqVO.java @@ -9,7 +9,7 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@Schema(description = "管理后台 - 客服消息 Request VO") +@Schema(description = "管理后台 - 客服消息列表 Request VO") @Data public class KeFuMessageListReqVO { diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/kefu/KeFuMessageMapper.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/kefu/KeFuMessageMapper.java index 322634a..b86356c 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/kefu/KeFuMessageMapper.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/kefu/KeFuMessageMapper.java @@ -21,10 +21,10 @@ public interface KeFuMessageMapper extends BaseMapperX { /** * 获得消息列表 - * 第一次查询时不带时间,默认查询最新的十条消息 - * 第二次查询带时间查询历史消息 + * 1. 第一次查询时,不带时间,默认查询最新的十条消息 + * 2. 第二次查询时,带时间,查询历史消息 * - * @param reqVO 请求 + * @param reqVO 列表请求 * @return 消息列表 */ default List selectList(KeFuMessageListReqVO reqVO) { @@ -32,7 +32,7 @@ public interface KeFuMessageMapper extends BaseMapperX { .eqIfPresent(KeFuMessageDO::getConversationId, reqVO.getConversationId()) .ltIfPresent(KeFuMessageDO::getCreateTime, reqVO.getCreateTime()) .orderByDesc(KeFuMessageDO::getCreateTime) - .last("limit 10")); + .last("limit 10")); // TODO @puhui999:使用 limitN 哈。然后 10 通过 reqVO 传递。 } default List selectListByConversationIdAndUserTypeAndReadStatus(Long conversationId, Integer userType, -- libgit2 0.21.4