| | |
| | | import com.yeshi.fanli.service.inter.user.tb.UserExtraTaoBaoInfoService; |
| | | import com.yeshi.fanli.service.manger.goods.ConvertLinkManager; |
| | | import com.yeshi.fanli.util.Constant; |
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil; |
| | | import com.yeshi.fanli.util.StringUtil; |
| | | import com.yeshi.fanli.util.VersionUtil; |
| | | import com.yeshi.fanli.util.cache.JDGoodsCacheUtil; |
| | |
| | | return new JsonPrimitive(""); |
| | | } else { |
| | | // 保留2位小数 |
| | | value = value.setScale(2); |
| | | return new JsonPrimitive(value.toString()); |
| | | return new JsonPrimitive(MoneyBigDecimalUtil.getWithNoZera(value)+""); |
| | | } |
| | | } |
| | | }).registerTypeAdapter(Date.class, new JsonSerializer<Date>() { |
| | |
| | | continue; |
| | | } |
| | | |
| | | String jumpLink = getJumpLink(goodsVO, user, relationId, inviteCode); |
| | | String jumpLink = getJumpLink(goodsVO, user, relationId, inviteCode, imgInfo.getUrl()); |
| | | if (!StringUtil.isNullOrEmpty(jumpLink)) { |
| | | list.add(jumpLink); |
| | | } |
| | |
| | | if (imgInfo.getGoodsVO() != null) |
| | | if (imgInfo.getGoodsVO().getGoodsId().longValue() == goodsId.longValue() |
| | | && imgInfo.getGoodsVO().getGoodsType() == goodsType.intValue()) { |
| | | String jumpLink = getJumpLink(imgInfo.getGoodsVO(), user, relationId, inviteCode); |
| | | String jumpLink = getJumpLink(imgInfo.getGoodsVO(), user, relationId, inviteCode, imgInfo.getUrl()); |
| | | if (!StringUtil.isNullOrEmpty(jumpLink)) { |
| | | list.add(jumpLink); |
| | | } |
| | |
| | | } else if (type == 2 || type == 3) { |
| | | for (ImgInfo imgInfo : imgs) { |
| | | if (imgInfo.getGoodsVO() != null) { |
| | | String jumpLink = getJumpLink(imgInfo.getGoodsVO(), user, relationId, inviteCode); |
| | | String jumpLink = getJumpLink(imgInfo.getGoodsVO(), user, relationId, inviteCode, imgInfo.getUrl() ); |
| | | if (!StringUtil.isNullOrEmpty(jumpLink)) { |
| | | list.add(jumpLink); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | private String getJumpLink(GoodsDetailVO goodsVO, UserInfo user, String relationId, String inviteCode) { |
| | | private String getJumpLink(GoodsDetailVO goodsVO, UserInfo user, String relationId, String inviteCode, String mainPic) { |
| | | String jumpLink = null; |
| | | if (goodsVO.getGoodsType() == Constant.SOURCE_TYPE_TAOBAO) { |
| | | TaoBaoLink taoBaoLink = null; |
| | |
| | | } |
| | | |
| | | FileUploadResult uploadResult = qrCodeService.drawDynamicGoodsPoster(jumpLink, user.getPortrait(), inviteCode, |
| | | goodsVO); |
| | | mainPic, goodsVO); |
| | | if (uploadResult != null) { |
| | | return uploadResult.getUrl(); |
| | | } |