|
@@ -349,15 +349,17 @@ public class PageServiceImpl implements PageService {
|
|
|
product.setPriceGrade(priceUtilService.getPriceGrade(product.getPrice()));
|
|
|
//供应商信息
|
|
|
ShopVo shop = shopMapper.getProductShopById(product.getShopId());
|
|
|
- Integer normalNum = shopMapper.getProductNumById(product.getShopId());
|
|
|
- shop.setNormalNum(normalNum == null ? 0 : normalNum);
|
|
|
- if (shop.getBusinessScope() != null && shop.getBusinessScope().contains("/")) {
|
|
|
- String[] businessScopeArray = shop.getBusinessScope().split("/");
|
|
|
- shop.setBusinessScopeArray(businessScopeArray);
|
|
|
- }
|
|
|
- shop.setLogo(ImageUtils.getImageURL("shopLogo", shop.getLogo(), 0, domain));
|
|
|
- shop.setBusinessLicense(ImageUtils.getImageURL("shopLogo", shop.getBusinessLicense(), 0, domain));
|
|
|
- product.setShop(shop);
|
|
|
+ if (null != shop) {
|
|
|
+ Integer normalNum = shopMapper.getProductNumById(product.getShopId());
|
|
|
+ shop.setNormalNum(null == normalNum ? 0 : normalNum);
|
|
|
+ if (shop.getBusinessScope() != null && shop.getBusinessScope().contains("/")) {
|
|
|
+ String[] businessScopeArray = shop.getBusinessScope().split("/");
|
|
|
+ shop.setBusinessScopeArray(businessScopeArray);
|
|
|
+ }
|
|
|
+ shop.setLogo(ImageUtils.getImageURL("shopLogo", shop.getLogo(), 0, domain));
|
|
|
+ shop.setBusinessLicense(ImageUtils.getImageURL("shopLogo", shop.getBusinessLicense(), 0, domain));
|
|
|
+ product.setShop(shop);
|
|
|
+ }
|
|
|
// 商品可见度:3:所有人可见,2:普通机构可见,1:会员机构可见
|
|
|
Integer visibility = product.getVisibility();
|
|
|
if (null != userId && userId > 0) {
|