master:用户浏览历史没有价格问题;

pull/1121/head
liujiang 2025-12-03 16:57:06 +08:00
parent bfa14a2c1d
commit 5657e959ae
3 changed files with 5 additions and 4 deletions

View File

@ -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<UserBrowsingHistory> latestBrowsingList = this.userBrowHisMapper.selectList(new LambdaQueryWrapper<UserBrowsingHistory>()
.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;
}

View File

@ -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 '版本号',

View File

@ -55,7 +55,7 @@ public class UserBrowsingHistory extends XktBaseEntity {
/**
*
*/
private BigDecimal price;
private BigDecimal prodPrice;
/**
*
*/