| | |
| | | import com.yeshi.fanli.entity.dynamic.CommentInfo.CommentInfoEnum; |
| | | import com.yeshi.fanli.entity.dynamic.DynamicInfo; |
| | | import com.yeshi.fanli.entity.dynamic.GoodsEvaluate; |
| | | import com.yeshi.fanli.entity.dynamic.GoodsEvaluate.EvaluateEnum; |
| | | import com.yeshi.fanli.entity.dynamic.GoodsPicture; |
| | | import com.yeshi.fanli.entity.dynamic.ImgInfo; |
| | | import com.yeshi.fanli.entity.dynamic.ImgInfo.ImgEnum; |
| | |
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService; |
| | | import com.yeshi.fanli.service.inter.user.UserInfoService; |
| | | import com.yeshi.fanli.service.inter.user.tb.UserExtraTaoBaoInfoService; |
| | | import com.yeshi.fanli.service.manger.goods.ConvertLinkManager; |
| | | import com.yeshi.fanli.util.AESUtil; |
| | | import com.yeshi.fanli.util.Constant; |
| | | import com.yeshi.fanli.util.StringUtil; |
| | |
| | | |
| | | @Resource |
| | | private QrCodeService qrCodeService; |
| | | |
| | | @Resource |
| | | private ConvertLinkManager convertLinkManager; |
| | | |
| | | private final static long TYPE_REXIAO = 1;// 热销 |
| | | private final static long TYPE_TUIJIAN = 2;// 推荐 |
| | |
| | | out.print(JsonUtil.loadTrueResult(data)); |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param acceptData |
| | | * @param uid |
| | | * @param id |
| | | * @param type |
| | | * 1-放大 2-保存 3-分享 |
| | | * @param goodsId |
| | | * @param goodsType |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "evaluateShare", method = RequestMethod.POST) |
| | | public void evaluateShare(AcceptData acceptData, Long uid, String id, Integer type, Long goodsId, Integer goodsType, |
| | | PrintWriter out) { |
| | |
| | | } |
| | | |
| | | List<String> list = new ArrayList<>(); |
| | | for (ImgInfo imgInfo : imgs) { |
| | | GoodsDetailVO goodsVO = imgInfo.getGoodsVO(); |
| | | if (goodsVO == null) { |
| | | list.add(imgInfo.getUrl()); |
| | | continue; |
| | | // 单品 |
| | | 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) { |
| | | String jumpLink = getJumpLink(goodsVO, user, inviteCode); |
| | | if (!StringUtil.isNullOrEmpty(jumpLink)) { |
| | | list.add(jumpLink); |
| | | 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) { |
| | | if (goodsVO.getGoodsId().longValue() == goodsId.longValue() |
| | | && goodsVO.getGoodsType() == goodsType.intValue()) { |
| | | String jumpLink = getJumpLink(goodsVO, user, inviteCode); |
| | | 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, inviteCode); |
| | | if (!StringUtil.isNullOrEmpty(jumpLink)) { |
| | | list.add(jumpLink); |
| | | } |
| | | } |
| | | } |
| | | } else if (type == 3){ |
| | | String jumpLink = getJumpLink(goodsVO, 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()); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | try { |
| | | text=convertLinkManager.convertLinkFromText(text, uid, true); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | out.print(JsonUtil.loadFalseResult("转链失败")); |
| | | return; |
| | | } |
| | | |
| | | JSONObject data = new JSONObject(); |
| | | data.put("text", text); |