|
@@ -46,19 +46,34 @@ public class RoosInformationServiceImpl implements RoosInformationService {
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
String format = simpleDateFormat.format(new Date());
|
|
|
List<Integer> list = roosInformationMapper.selIsClick(IP, format, shopId, productId, infoId, keyword);
|
|
|
- boolean isClick = true;
|
|
|
+ boolean isClick = false;
|
|
|
// 判断是否点击过取消、或者填写过信息
|
|
|
if (null != list && list.size() > 0) {
|
|
|
- if (list.stream().allMatch(i -> i == 1)) {
|
|
|
- isClick = false;
|
|
|
+ if (list.stream().allMatch(i -> i == 0)) {
|
|
|
+ isClick = true;
|
|
|
}
|
|
|
+ } else {
|
|
|
+ isClick = true;
|
|
|
}
|
|
|
// 供应商不存在或者处于不统计状态 不显示弹框
|
|
|
Integer shopStatus = roosInformationMapper.getShopStatus(shopId, productId, infoId, keyword);
|
|
|
+ List<Integer> shopProductIds = roosInformationMapper.getShopProductIds(shopId);
|
|
|
// 网站底部的每个商品的弹窗,只在浏览了该商品相关的文章详情,商品详情和搜索列表后才显示,而不是该供应商的任意一个商品都显示
|
|
|
- if (null == shopStatus || 0 != shopStatus) {
|
|
|
+ if (null != shopStatus && 0 != shopStatus) {
|
|
|
+ isClick = false;
|
|
|
+ }
|
|
|
+ if (null == shopStatus) {
|
|
|
isClick = false;
|
|
|
}
|
|
|
+ // 若一个供应商只添加了一个商品,则游客在浏览该供应商主页时,就显示该商品的底部弹窗
|
|
|
+ if (null != shopId) {
|
|
|
+ if (null != list && list.size() > 0 && list.stream().allMatch(i -> i == 0)
|
|
|
+ && null != shopStatus && 0 == shopStatus && null != shopProductIds && shopProductIds.size() == 1) {
|
|
|
+ isClick = true;
|
|
|
+ } else {
|
|
|
+ isClick = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
return isClick;
|
|
|
}
|
|
|
|