Commit 053fe9c7a842e861a73aa5531c71607202e60946

Authored by 芋道源码
Committed by Gitee
2 parents 36faf88d c5011726

!1130 【功能完善】商城:客服消息查询 pageSize 改 limit

Merge pull request !1130 from puhui999/develop2
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/kefu/vo/message/KeFuMessageListReqVO.java
@@ -15,7 +15,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @@ -15,7 +15,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
15 @Data 15 @Data
16 public class KeFuMessageListReqVO { 16 public class KeFuMessageListReqVO {
17 17
18 - private static final Integer PAGE_SIZE = 10; 18 + private static final Integer LIMIT = 10;
19 19
20 @Schema(description = "会话编号", example = "12580") 20 @Schema(description = "会话编号", example = "12580")
21 @NotNull(message = "会话编号不能为空") 21 @NotNull(message = "会话编号不能为空")
@@ -25,11 +25,10 @@ public class KeFuMessageListReqVO { @@ -25,11 +25,10 @@ public class KeFuMessageListReqVO {
25 @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) 25 @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
26 private LocalDateTime createTime; 26 private LocalDateTime createTime;
27 27
28 - // TODO @puhui999:这种一般建议叫 limit。不用 pageSize 哈  
29 - @Schema(description = "每页条数,最大值为 100", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")  
30 - @NotNull(message = "每页条数不能为空")  
31 - @Min(value = 1, message = "每页条数最小值为 1")  
32 - @Max(value = 100, message = "每页条数最大值为 100")  
33 - private Integer pageSize = PAGE_SIZE; 28 + @Schema(description = "每次查询条数,最大值为 100", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
  29 + @NotNull(message = "每次查询条数不能为空")
  30 + @Min(value = 1, message = "每次查询条数最小值为 1")
  31 + @Max(value = 100, message = "每次查询最大值为 100")
  32 + private Integer limit = LIMIT;
34 33
35 } 34 }
36 \ No newline at end of file 35 \ No newline at end of file
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/kefu/vo/message/AppKeFuMessagePageReqVO.java
@@ -15,7 +15,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @@ -15,7 +15,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
15 @Data 15 @Data
16 public class AppKeFuMessagePageReqVO { 16 public class AppKeFuMessagePageReqVO {
17 17
18 - private static final Integer PAGE_SIZE = 10; 18 + private static final Integer LIMIT = 10;
19 19
20 @Schema(description = "会话编号", example = "12580") 20 @Schema(description = "会话编号", example = "12580")
21 private Long conversationId; 21 private Long conversationId;
@@ -24,10 +24,10 @@ public class AppKeFuMessagePageReqVO { @@ -24,10 +24,10 @@ public class AppKeFuMessagePageReqVO {
24 @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) 24 @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
25 private LocalDateTime createTime; 25 private LocalDateTime createTime;
26 26
27 - @Schema(description = "每页条数,最大值为 100", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")  
28 - @NotNull(message = "每页条数不能为空")  
29 - @Min(value = 1, message = "每页条数最小值为 1")  
30 - @Max(value = 100, message = "每页条数最大值为 100")  
31 - private Integer pageSize = PAGE_SIZE; 27 + @Schema(description = "每次查询条数,最大值为 100", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
  28 + @NotNull(message = "每次查询条数不能为空")
  29 + @Min(value = 1, message = "每次查询条数最小值为 1")
  30 + @Max(value = 100, message = "每次查询最大值为 100")
  31 + private Integer limit = LIMIT;
32 32
33 } 33 }
34 \ No newline at end of file 34 \ No newline at end of file
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/kefu/KeFuMessageMapper.java
@@ -32,7 +32,7 @@ public interface KeFuMessageMapper extends BaseMapperX<KeFuMessageDO> { @@ -32,7 +32,7 @@ public interface KeFuMessageMapper extends BaseMapperX<KeFuMessageDO> {
32 .eqIfPresent("conversation_id", reqVO.getConversationId()) 32 .eqIfPresent("conversation_id", reqVO.getConversationId())
33 .ltIfPresent("create_time", reqVO.getCreateTime()) 33 .ltIfPresent("create_time", reqVO.getCreateTime())
34 .orderByDesc("create_time") 34 .orderByDesc("create_time")
35 - .limitN(reqVO.getPageSize())); 35 + .limitN(reqVO.getLimit()));
36 } 36 }
37 37
38 default List<KeFuMessageDO> selectListByConversationIdAndUserTypeAndReadStatus(Long conversationId, Integer userType, 38 default List<KeFuMessageDO> selectListByConversationIdAndUserTypeAndReadStatus(Long conversationId, Integer userType,