| | |
| | | @Resource |
| | | private ShareGoodsService shareGoodsService; |
| | | |
| | | |
| | | |
| | | private final static long TYPE_REXIAO = 1;// 热销 |
| | | private final static long TYPE_TUIJIAN = 2;// 推荐 |
| | | private final static long TYPE_HAODIAN = 3;// 好店 |
| | |
| | | Object shareNum = json.get("shareNum"); |
| | | if (shareNum != null) { |
| | | int num = Integer.parseInt(shareNum.toString()); |
| | | if (num >= 10000) { |
| | | |
| | | if (num >= 100000000) { |
| | | double sales = num; |
| | | String salesCountMidea = String.format("%.1f", sales / 100000000); |
| | | json.put("shareNum", salesCountMidea + "亿"); |
| | | } else if (num >= 10000) { |
| | | double sales = num; |
| | | String salesCountMidea = String.format("%.1f", sales / 10000); |
| | | json.put("shareNum", salesCountMidea + "万"); |
| | |
| | | } |
| | | jsonArray.add(json); |
| | | } |
| | | |
| | | |
| | | JSONObject data = new JSONObject(); |
| | | data.put("count", count); |
| | |
| | | |
| | | GoodsDetailVO goodsVO = imgInfo.getGoodsVO(); |
| | | if (goodsVO == null) { |
| | | list.add(StringUtil.isNullOrEmpty(imgInfo.getUrlHD()) ? imgInfo.getUrl() : imgInfo.getUrlHD()); |
| | | list.add(StringUtil.isNullOrEmpty(imgInfo.getUrlHD()) ? imgInfo.getUrl() |
| | | : imgInfo.getUrlHD()); |
| | | continue; |
| | | } |
| | | |
| | |
| | | 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()); |
| | | 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()); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | private String getJumpLink(GoodsDetailVO goodsVO, UserInfo user, String relationId, String inviteCode) { |
| | | String jumpLink = null; |
| | | if (goodsVO.getGoodsType() == Constant.SOURCE_TYPE_TAOBAO) { |
| | |
| | | } catch (ShareGoodsException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | jumpLink = ShareControllerV2.getERCodeContentNew(configService.get(ConfigKeyEnum.quickShareTBCommentText.getKey()), |
| | | taoBaoLink.getGoods(), TaoBaoUtil.filterTaoToken(taoBaoLink.getTaoToken())); |
| | | jumpLink = ShareControllerV2.getERCodeContentNew( |
| | | configService.get(ConfigKeyEnum.quickShareTBCommentText.getKey()), taoBaoLink.getGoods(), |
| | | TaoBaoUtil.filterTaoToken(taoBaoLink.getTaoToken())); |
| | | } else if (goodsVO.getGoodsType() == Constant.SOURCE_TYPE_JD) { |
| | | JDGoods jdGoods = jdGoodsCacheUtil.getGoodsInfo(goodsVO.getGoodsId()); |
| | | if (jdGoods == null) { |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 评论复制 |