From 554de444b87aab5f93cb1593a8095612cf9479a7 Mon Sep 17 00:00:00 2001 From: yujian <yujian@163.com> Date: 星期二, 09 六月 2020 17:34:30 +0800 Subject: [PATCH] 订单 --- fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java | 35 +++++++++++++++++++++++++---------- 1 files changed, 25 insertions(+), 10 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java index f0469f7..91839a7 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java @@ -55,7 +55,6 @@ import com.yeshi.fanli.entity.taobao.TaoBaoLink; import com.yeshi.fanli.exception.goods.ConvertLinkExceptionException; import com.yeshi.fanli.exception.share.ShareGoodsException; -import com.yeshi.fanli.exception.user.cloud.UserCloudException; import com.yeshi.fanli.log.LogHelper; import com.yeshi.fanli.service.inter.common.JumpDetailV2Service; import com.yeshi.fanli.service.inter.config.ConfigService; @@ -642,8 +641,23 @@ if (!VersionUtil.greaterThan_2_1_1(acceptData.getPlatform(), acceptData.getVersion())) { listNew.addAll(list); } else if (list.size() > 0) { // 娲诲姩鍥剧墖涓嶅厑璁歌烦杞� + + // 浜戝彂鍗曟槸鍚﹀紑鍚� + String cloudState = configService.getByVersion(ConfigKeyEnum.robotCloudOpen.getKey(), acceptData.getPlatform(), + Integer.parseInt(acceptData.getVersion())); + boolean cloudOpen = false; + if (!StringUtil.isNullOrEmpty(cloudState) && "1".equals(cloudState)) { + cloudOpen = true; + } + for (GoodsEvaluate goodsEvaluate : list) { - if (goodsEvaluate.getType() != EvaluateEnum.activity) { + EvaluateEnum evaluateEnum = goodsEvaluate.getType(); + // 鍗曞搧 娲诲姩鍙互涓�閿簯鍙戝崟 + if (cloudOpen && evaluateEnum == EvaluateEnum.activity || evaluateEnum == EvaluateEnum.single ) { + goodsEvaluate.setCloud(true); + } + + if (evaluateEnum != EvaluateEnum.activity) { listNew.add(goodsEvaluate); continue; } @@ -818,8 +832,8 @@ * @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) { + public void evaluateShare(AcceptData acceptData, Long uid, String id, Integer type, String goodsId, + Integer goodsType, PrintWriter out) { try { if (uid == null) { out.print(JsonUtil.loadFalseResult("鐢ㄦ埛鏈櫥褰�")); @@ -831,7 +845,7 @@ return; } - if (type == 1 && (goodsId == null || goodsType == null)) { + if (type == 1 && (StringUtil.isNullOrEmpty(goodsId) || goodsType == null)) { out.print(JsonUtil.loadFalseResult("鍟嗗搧鍙傛暟涓嶈兘涓虹┖")); return; } @@ -913,7 +927,7 @@ if (type == 1) { for (ImgInfo imgInfo : imgs) { if (imgInfo.getGoodsVO() != null) - if (imgInfo.getGoodsVO().getGoodsId().longValue() == goodsId.longValue() + if (imgInfo.getGoodsVO().getGoodsId().equalsIgnoreCase(goodsId) && imgInfo.getGoodsVO().getGoodsType() == goodsType.intValue()) { String jumpLink = getJumpLink(imgInfo.getGoodsVO(), user, relationId, inviteCode, imgInfo.getUrl()); @@ -990,7 +1004,8 @@ if (goodsVO.getGoodsType() == Constant.SOURCE_TYPE_TAOBAO) { TaoBaoLink taoBaoLink = null; try { - taoBaoLink = shareGoodsService.getTaoBaoLinkForShare(user.getId(), goodsVO.getGoodsId(), relationId); + taoBaoLink = shareGoodsService.getTaoBaoLinkForShare(user.getId(), Long.parseLong(goodsVO.getGoodsId()), + relationId); } catch (ShareGoodsException e) { e.printStackTrace(); } @@ -998,7 +1013,7 @@ configService.get(ConfigKeyEnum.taobaoShareQrcodeText.getKey()), taoBaoLink.getGoods(), TaoBaoUtil.filterTaoToken(taoBaoLink.getTaoToken())); } else if (goodsVO.getGoodsType() == Constant.SOURCE_TYPE_JD) { - JDGoods jdGoods = jdGoodsCacheUtil.getGoodsInfo(goodsVO.getGoodsId()); + JDGoods jdGoods = jdGoodsCacheUtil.getGoodsInfo(Long.parseLong(goodsVO.getGoodsId())); if (jdGoods == null) { return null; } @@ -1012,8 +1027,8 @@ jumpLink = JDApiUtil.convertLinkWithSubUnionId(materialId, couponUrl, JDApiUtil.POSITION_SHARE + "", user.getId() + ""); } else if (goodsVO.getGoodsType() == Constant.SOURCE_TYPE_PDD) { - jumpLink = PinDuoDuoApiUtil.getPromotionUrl(goodsVO.getGoodsId(), PinDuoDuoApiUtil.PID_SHARE + "", - user.getId() + ""); + jumpLink = PinDuoDuoApiUtil.getPromotionUrl(Long.parseLong(goodsVO.getGoodsId()), + PinDuoDuoApiUtil.PID_SHARE + "", user.getId() + ""); } FileUploadResult uploadResult = qrCodeService.drawDynamicGoodsPoster(jumpLink, user.getPortrait(), inviteCode, -- Gitblit v1.8.0