diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/XktTask.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/XktTask.java index 62fed8f52..abb50a31c 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/XktTask.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/XktTask.java @@ -712,11 +712,12 @@ public class XktTask { if (CollectionUtils.isNotEmpty(insertBrowsingList)) { this.userBrowHisMapper.insert(BeanUtil.copyToList(insertBrowsingList, UserBrowsingHistory.class)); } - final Date sixMonthAgo = java.sql.Date.valueOf(LocalDate.now().minusMonths(6)); + // 最近一月的浏览记录 + final Date oneMonthAgo = java.sql.Date.valueOf(LocalDate.now().minusMonths(1)); final Date now = java.sql.Date.valueOf(LocalDate.now()); // 将最新的数据更新到redis中 List latestBrowsingList = this.userBrowHisMapper.selectList(new LambdaQueryWrapper() - .eq(UserBrowsingHistory::getDelFlag, Constants.UNDELETED).between(UserBrowsingHistory::getBrowsingTime, sixMonthAgo, now)); + .eq(UserBrowsingHistory::getDelFlag, Constants.UNDELETED).between(UserBrowsingHistory::getBrowsingTime, oneMonthAgo, now)); if (CollectionUtils.isEmpty(latestBrowsingList)) { return; } diff --git a/sql/ry_20240629.sql b/sql/ry_20240629.sql index 51841a999..437886e5e 100644 --- a/sql/ry_20240629.sql +++ b/sql/ry_20240629.sql @@ -4150,7 +4150,7 @@ CREATE TABLE `user_browsing_history` `store_prod_id` bigint UNSIGNED NOT NULL COMMENT '档口商品ID', `prod_art_num` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商品货号', `main_pic_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '第一张主图路径', - `price` decimal(10, 2) NULL DEFAULT NULL COMMENT '商品价格', + `prod_price` decimal(10, 2) NULL DEFAULT NULL COMMENT '商品价格', `prod_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商品标题', `browsing_time` datetime NULL DEFAULT NULL COMMENT '凭证日期', `version` bigint UNSIGNED NOT NULL COMMENT '版本号', diff --git a/xkt/src/main/java/com/ruoyi/xkt/domain/UserBrowsingHistory.java b/xkt/src/main/java/com/ruoyi/xkt/domain/UserBrowsingHistory.java index 3fd682a56..66d099bae 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/domain/UserBrowsingHistory.java +++ b/xkt/src/main/java/com/ruoyi/xkt/domain/UserBrowsingHistory.java @@ -55,7 +55,7 @@ public class UserBrowsingHistory extends XktBaseEntity { /** * 商品价格 */ - private BigDecimal price; + private BigDecimal prodPrice; /** * 浏览日期 */