master:APP 商品访问量逻辑调优;

pull/1121/head
liujiang 2025-12-01 15:25:07 +08:00
parent 0a0f5ca133
commit d0db987f54
2 changed files with 4 additions and 1 deletions

View File

@ -523,6 +523,7 @@ public class XktTask {
public void dailyProdWeight() {
// 筛选非私款的商品
List<StoreProduct> storeProdList = this.storeProdMapper.selectList(new LambdaQueryWrapper<StoreProduct>()
.in(StoreProduct::getProdStatus, Arrays.asList(EProductStatus.ON_SALE.getValue(), EProductStatus.TAIL_GOODS.getValue()))
.eq(StoreProduct::getDelFlag, Constants.UNDELETED).eq(StoreProduct::getPrivateItem, EProductItemType.NON_PRIVATE_ITEM.getValue()));
if (CollectionUtils.isEmpty(storeProdList)) {
return;
@ -581,6 +582,7 @@ public class XktTask {
public void dailyStoreWeight() {
// 筛选非私款的商品
List<StoreProduct> storeProdList = this.storeProdMapper.selectList(new LambdaQueryWrapper<StoreProduct>()
.in(StoreProduct::getProdStatus, Arrays.asList(EProductStatus.ON_SALE.getValue(), EProductStatus.TAIL_GOODS.getValue()))
.eq(StoreProduct::getDelFlag, Constants.UNDELETED).eq(StoreProduct::getPrivateItem, EProductItemType.NON_PRIVATE_ITEM.getValue()));
if (CollectionUtils.isEmpty(storeProdList)) {
return;
@ -813,6 +815,7 @@ public class XktTask {
.eq(Store::getDelFlag, Constants.UNDELETED).in(Store::getId, storeIdList));
// 非私款商品才会计入权重
List<StoreProduct> storeProdList = this.storeProdMapper.selectList(new LambdaQueryWrapper<StoreProduct>()
.in(StoreProduct::getProdStatus, Arrays.asList(EProductStatus.ON_SALE.getValue(), EProductStatus.TAIL_GOODS.getValue()))
.eq(StoreProduct::getDelFlag, Constants.UNDELETED).eq(StoreProduct::getPrivateItem, EProductItemType.NON_PRIVATE_ITEM.getValue())
.in(StoreProduct::getStoreId, storeIdList));
if (CollectionUtils.isEmpty(storeProdList)) {

View File

@ -70,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM
store_product_statistics sps
JOIN store s ON sps.store_id = s.id
JOIN store_product sp ON sps.store_prod_id = sp.id
JOIN store_product sp ON sps.store_prod_id = sp.id AND sp.prod_status IN (2)
JOIN store_product_file spf ON sps.store_prod_id = spf.store_prod_id AND spf.del_flag = 0 AND spf.file_type = 1 AND spf.order_num = 1
JOIN sys_file sf ON spf.file_id = sf.id
LEFT JOIN ( SELECT store_prod_id, MIN( price ) AS min_price FROM store_product_color_size GROUP BY store_prod_id ) spcp ON sp.id = spcp.store_prod_id