|
|
@@ -542,7 +542,7 @@ public class GoodsDonController {
|
|
|
}
|
|
|
return true;
|
|
|
}).collect(Collectors.toList());
|
|
|
- setHomeManageSpecific(exList, fUid);
|
|
|
+ setHomeManageSpecific(exList, fUid, dsUserId);
|
|
|
map.put(HomeManagementConfig.Type.ex.name(), exList);
|
|
|
}
|
|
|
//设置特定价格
|
|
|
@@ -554,7 +554,7 @@ public class GoodsDonController {
|
|
|
}
|
|
|
return true;
|
|
|
}).collect(Collectors.toList());
|
|
|
- setHomeManageSpecific(vgList, fUid);
|
|
|
+ setHomeManageSpecific(vgList, fUid, dsUserId);
|
|
|
map.put(HomeManagementConfig.Type.vg.name(), vgList);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
@@ -717,7 +717,7 @@ public class GoodsDonController {
|
|
|
/**
|
|
|
* 设置平台 特定价格
|
|
|
*/
|
|
|
- public void setGcSpecificPrice(GoodsFrontListCategoryView data, Long fUid) {
|
|
|
+ public void setGcSpecificPrice(GoodsFrontListCategoryView data, Long fUid, Long dsUserId) {
|
|
|
if (fUid != null) {
|
|
|
if (data.getIsSp()) {
|
|
|
//查找所有特定规格最小价格 满足条件
|
|
|
@@ -735,6 +735,9 @@ public class GoodsDonController {
|
|
|
redisService.setNx(specificGoodsKey, specificSkus, RedisService.key.YH_HOME_PAGHE_CACHE.getTimeout());
|
|
|
}
|
|
|
specificSkus.forEach(specificSku -> {
|
|
|
+ if (StrUtil.isNotEmpty(specificSku.getUserOwns()) && (dsUserId == null || !specificSku.getUserOwns().contains(dsUserId.toString()))) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
String specificGoodsIdsStr = specificSku.getSpecificGoodsIds();
|
|
|
if (isPaySpecificGoodsIds(specificGoodsIdsStr, fUid)) {
|
|
|
BigDecimal specificPrice = data.getSpecificPrice();
|
|
|
@@ -788,13 +791,16 @@ public class GoodsDonController {
|
|
|
/**
|
|
|
* 设置首页配置 涉及平台特定价格
|
|
|
*/
|
|
|
- public void setHomeManageSpecific(List<HomeManagementFrontView> list, Long fUid) {
|
|
|
+ public void setHomeManageSpecific(List<HomeManagementFrontView> list, Long fUid, Long dsUserId) {
|
|
|
DateTime now = DateTime.now();
|
|
|
list.forEach(data -> {
|
|
|
if (data.getIsSp() != null && data.getIsSp() && fUid != null) {
|
|
|
//查找所有特定规格最小价格 满足条件
|
|
|
List<GoodsDonSku> specificSkus = getSpecificSku(data.getGoodsId());
|
|
|
specificSkus.forEach(specificSku -> {
|
|
|
+ if (StrUtil.isNotEmpty(specificSku.getUserOwns()) && (dsUserId == null || !specificSku.getUserOwns().contains(dsUserId.toString()))) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
String specificGoodsIdsStr = specificSku.getSpecificGoodsIds();
|
|
|
if (isPaySpecificGoodsIds(specificGoodsIdsStr, fUid)) {
|
|
|
BigDecimal specificPrice = data.getSpecificPrice();
|
|
|
@@ -912,7 +918,7 @@ public class GoodsDonController {
|
|
|
data.setSold(sold + data.getSold());
|
|
|
data.setNotifyMsg(getPayMsgTime(data.getId(), now, 1, null));
|
|
|
//设置特定价格
|
|
|
- setGcSpecificPrice(data, fUid);
|
|
|
+ setGcSpecificPrice(data, fUid, dsUserId);
|
|
|
return true;
|
|
|
}).collect(Collectors.toList());
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(goodsFrontListViews);
|