Browse Source

修复PC商城进入店铺查看所有商品bug

multiwx
dy-hu 12 months ago
parent
commit
87c4aaefc0
  1. 11
      cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/impl/CerePlatformShopServiceImpl.java

11
cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/impl/CerePlatformShopServiceImpl.java

@ -5,6 +5,7 @@
*/
package com.shop.cereshop.app.service.shop.impl;
import cn.hutool.core.util.ObjectUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.luciad.imageio.webp.WebPReadParam;
@ -138,10 +139,12 @@ public class CerePlatformShopServiceImpl implements CerePlatformShopService {
product.setUsers(activityProduct.getUsers());
}
CereBuyerCollect collect = cereBuyerCollectService.findByUserProduct(user.getBuyerUserId(),product.getProductId());
if(collect!=null){
product.setCollectId(collect.getCollectId());
product.setIfCollect(collect.getState());
if (ObjectUtil.isNotEmpty(user)){
CereBuyerCollect collect = cereBuyerCollectService.findByUserProduct(user.getBuyerUserId(),product.getProductId());
if(collect!=null){
product.setCollectId(collect.getCollectId());
product.setIfCollect(collect.getState());
}
}
}
}

Loading…
Cancel
Save