| | |
| | | } |
| | | |
| | | List<String> list = new ArrayList<>(); |
| | | // 单品 |
| | | if (goodsEvaluate.getType() == EvaluateEnum.single) { |
| | | for (ImgInfo imgInfo : imgs) { |
| | | GoodsDetailVO goodsVO = imgInfo.getGoodsVO(); |
| | | if (goodsVO == null) { |
| | | list.add(StringUtil.isNullOrEmpty(imgInfo.getUrlHD()) ? imgInfo.getUrl() : imgInfo.getUrlHD()); |
| | | continue; |
| | | } |
| | | |
| | | String jumpLink = getJumpLink(goodsVO, user, inviteCode); |
| | | if (!StringUtil.isNullOrEmpty(jumpLink)) { |
| | | list.add(jumpLink); |
| | | } |
| | | } |
| | | |
| | | } else if (goodsEvaluate.getType() == EvaluateEnum.multiple) { |
| | | if (type == 1) { |
| | | for (ImgInfo imgInfo : imgs) { |
| | | if (imgInfo.getGoodsVO() != null) |
| | | if (imgInfo.getGoodsVO().getGoodsId().longValue() == goodsId.longValue() |
| | | && imgInfo.getGoodsVO().getGoodsType() == goodsType.intValue()) { |
| | | String jumpLink = getJumpLink(imgInfo.getGoodsVO(), user, inviteCode); |
| | | if (!StringUtil.isNullOrEmpty(jumpLink)) { |
| | | list.add(jumpLink); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | } else if (type == 2 || type == 3) { |
| | | for (ImgInfo imgInfo : imgs) { |
| | | if (imgInfo.getGoodsVO() != null) { |
| | | String jumpLink = getJumpLink(imgInfo.getGoodsVO(), user, inviteCode); |
| | | if (!StringUtil.isNullOrEmpty(jumpLink)) { |
| | | list.add(jumpLink); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } else if (goodsEvaluate.getType() == EvaluateEnum.activity) { |
| | | Integer dynamicType = goodsEvaluate.getDynamicType(); |
| | | if (dynamicType == null || dynamicType.intValue() == 2) { |
| | | for (ImgInfo imgInfo : imgs) { |
| | | if (imgInfo.getType() == ImgEnum.goods || imgInfo.getType() == ImgEnum.video) |
| | | continue; |
| | |
| | | list.add(imgInfo.getActivityPic()); |
| | | } |
| | | } |
| | | } else { |
| | | // 单品 |
| | | if (goodsEvaluate.getType() == EvaluateEnum.single) { |
| | | for (ImgInfo imgInfo : imgs) { |
| | | GoodsDetailVO goodsVO = imgInfo.getGoodsVO(); |
| | | if (goodsVO == null) { |
| | | list.add(StringUtil.isNullOrEmpty(imgInfo.getUrlHD()) ? imgInfo.getUrl() : imgInfo.getUrlHD()); |
| | | continue; |
| | | } |
| | | |
| | | String jumpLink = getJumpLink(goodsVO, user, inviteCode); |
| | | if (!StringUtil.isNullOrEmpty(jumpLink)) { |
| | | list.add(jumpLink); |
| | | } |
| | | } |
| | | |
| | | } else if (goodsEvaluate.getType() == EvaluateEnum.multiple) { |
| | | if (type == 1) { |
| | | for (ImgInfo imgInfo : imgs) { |
| | | if (imgInfo.getGoodsVO() != null) |
| | | if (imgInfo.getGoodsVO().getGoodsId().longValue() == goodsId.longValue() |
| | | && imgInfo.getGoodsVO().getGoodsType() == goodsType.intValue()) { |
| | | String jumpLink = getJumpLink(imgInfo.getGoodsVO(), user, inviteCode); |
| | | if (!StringUtil.isNullOrEmpty(jumpLink)) { |
| | | list.add(jumpLink); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | } else if (type == 2 || type == 3) { |
| | | for (ImgInfo imgInfo : imgs) { |
| | | if (imgInfo.getGoodsVO() != null) { |
| | | String jumpLink = getJumpLink(imgInfo.getGoodsVO(), user, inviteCode); |
| | | if (!StringUtil.isNullOrEmpty(jumpLink)) { |
| | | list.add(jumpLink); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } else if (goodsEvaluate.getType() == EvaluateEnum.activity) { |
| | | for (ImgInfo imgInfo : imgs) { |
| | | if (imgInfo.getType() == ImgEnum.goods || imgInfo.getType() == ImgEnum.video) |
| | | continue; |
| | | if (imgInfo.getType() == ImgEnum.img) |
| | | list.add(StringUtil.isNullOrEmpty(imgInfo.getUrlHD()) ? imgInfo.getUrl() : imgInfo.getUrlHD()); |
| | | else if (imgInfo.getType() == ImgEnum.activity) |
| | | if (!StringUtil.isNullOrEmpty(imgInfo.getActivityPic())) { |
| | | list.add(imgInfo.getActivityPic()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | Integer shareCount = goodsEvaluate.getShareNum(); |
| | | if (shareCount == null) { |