|
@@ -3,6 +3,7 @@ package com.caimei365.commodity.service.impl;
|
|
|
import com.caimei365.commodity.components.PriceUtilService;
|
|
|
import com.caimei365.commodity.mapper.PriceMapper;
|
|
|
import com.caimei365.commodity.mapper.SellerMapper;
|
|
|
+import com.caimei365.commodity.mapper.ShopMapper;
|
|
|
import com.caimei365.commodity.model.ResponseJson;
|
|
|
import com.caimei365.commodity.model.vo.CombinationVo;
|
|
|
import com.caimei365.commodity.model.vo.PaginationVo;
|
|
@@ -36,6 +37,8 @@ public class SellerServiceImpl implements SellerService {
|
|
|
private PageService pageService;
|
|
|
@Resource
|
|
|
private PriceMapper priceMapper;
|
|
|
+ @Resource
|
|
|
+ private ShopMapper shopMapper;
|
|
|
|
|
|
/**
|
|
|
* 协销搜索商品(单一)
|
|
@@ -111,8 +114,14 @@ public class SellerServiceImpl implements SellerService {
|
|
|
ProductItemVo productItemVo = pd.get(0);
|
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
|
productList = sellerMapper.getProductList(productIdList);
|
|
|
+ //本商品设置首位
|
|
|
productList.remove(productItemVo);
|
|
|
productList.add(0, productItemVo);
|
|
|
+ Integer userIdentity = shopMapper.getUserIdentityById(userId);
|
|
|
+ // 如果非会员身份剔除会员可见商品
|
|
|
+ if (userIdentity == 0 || userIdentity == 1 || userIdentity == 5 || userIdentity == 6) {
|
|
|
+ productList.stream().filter(c -> "1".equals(c.getVisibility()));
|
|
|
+ }
|
|
|
productList.forEach(product -> {
|
|
|
// 设置商品主图及价格
|
|
|
priceUtilService.setProductDetails(userId, product, 2);
|