|
@@ -58,13 +58,23 @@ public class RoosInformationServiceImpl implements RoosInformationService {
|
|
log.info("shopId==="+shopId+"===productId==="+productId+"===infoId==="+infoId+"===keyword==="+keyword);
|
|
log.info("shopId==="+shopId+"===productId==="+productId+"===infoId==="+infoId+"===keyword==="+keyword);
|
|
// 供应商不存在或者处于不统计状态 不显示弹框
|
|
// 供应商不存在或者处于不统计状态 不显示弹框
|
|
Integer shopStatus = roosInformationMapper.getShopStatus(shopId, productId, infoId, keyword);
|
|
Integer shopStatus = roosInformationMapper.getShopStatus(shopId, productId, infoId, keyword);
|
|
|
|
+ List<Integer> shopProductIds = roosInformationMapper.getShopProductIds(shopId);
|
|
log.info("shopStatus===="+shopStatus);
|
|
log.info("shopStatus===="+shopStatus);
|
|
|
|
+ // 网站底部的每个商品的弹窗,只在浏览了该商品相关的文章详情,商品详情和搜索列表后才显示,而不是该供应商的任意一个商品都显示
|
|
if (null != shopStatus && 0 != shopStatus) {
|
|
if (null != shopStatus && 0 != shopStatus) {
|
|
isClick = false;
|
|
isClick = false;
|
|
}
|
|
}
|
|
if (null == shopStatus) {
|
|
if (null == shopStatus) {
|
|
isClick = false;
|
|
isClick = false;
|
|
}
|
|
}
|
|
|
|
+ // 若一个供应商只添加了一个商品,则游客在浏览该供应商主页时,就显示该商品的底部弹窗
|
|
|
|
+ if (null != shopId) {
|
|
|
|
+ if (0 == shopStatus && null != shopProductIds && shopProductIds.size() == 1) {
|
|
|
|
+ isClick = true;
|
|
|
|
+ } else {
|
|
|
|
+ isClick = false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return isClick;
|
|
return isClick;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -80,7 +90,18 @@ public class RoosInformationServiceImpl implements RoosInformationService {
|
|
@Override
|
|
@Override
|
|
public ResponseJson<CmShopPopUpVo> getPopUpInfo(Integer shopId, Integer productId, Integer infoId, String keyword) {
|
|
public ResponseJson<CmShopPopUpVo> getPopUpInfo(Integer shopId, Integer productId, Integer infoId, String keyword) {
|
|
log.info("shopId==="+shopId+"===productId==="+productId+"===infoId==="+infoId+"===keyword==="+keyword);
|
|
log.info("shopId==="+shopId+"===productId==="+productId+"===infoId==="+infoId+"===keyword==="+keyword);
|
|
- CmShopPopUpVo shopPop = roosInformationMapper.getShopPop(shopId, productId, infoId, keyword);
|
|
|
|
|
|
+ CmShopPopUpVo shopPop = new CmShopPopUpVo();
|
|
|
|
+ if (null != shopId) {
|
|
|
|
+ List<Integer> shopProductIds = roosInformationMapper.getShopProductIds(shopId);
|
|
|
|
+ if (null != shopProductIds && shopProductIds.size() == 1) {
|
|
|
|
+ shopPop = roosInformationMapper.getProductPop(shopId);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ shopPop = roosInformationMapper.getShopPop(productId, infoId, keyword);
|
|
|
|
+ }
|
|
|
|
+ if (null == shopPop) {
|
|
|
|
+ return ResponseJson.error(-1, "信息异常", null);
|
|
|
|
+ }
|
|
log.info("shopPop====="+shopPop);
|
|
log.info("shopPop====="+shopPop);
|
|
return ResponseJson.success(shopPop);
|
|
return ResponseJson.success(shopPop);
|
|
}
|
|
}
|
|
@@ -113,7 +134,7 @@ public class RoosInformationServiceImpl implements RoosInformationService {
|
|
String format = simpleDateFormat.format(new Date());
|
|
String format = simpleDateFormat.format(new Date());
|
|
// 供应商集合
|
|
// 供应商集合
|
|
List<Integer> shopIds = new ArrayList<>();
|
|
List<Integer> shopIds = new ArrayList<>();
|
|
- // 该用户是否访问过香干供应商相关页面
|
|
|
|
|
|
+ // 该用户是否访问过相关供应商相关页面
|
|
List<Integer> shopIdList = roosInformationMapper.getShopId();
|
|
List<Integer> shopIdList = roosInformationMapper.getShopId();
|
|
for (Integer shopId : shopIdList) {
|
|
for (Integer shopId : shopIdList) {
|
|
List<Integer> behavior = null;
|
|
List<Integer> behavior = null;
|