From d8359ddb48dab5cc797a9d552e11fde571f4920c Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期二, 27 八月 2019 12:32:46 +0800 Subject: [PATCH] Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div --- fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java | 274 +++++++++++++++++++++++++++--------------------------- 1 files changed, 135 insertions(+), 139 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java index d6ef71e..55ad6fc 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java @@ -158,8 +158,9 @@ * 鑾峰彇娣樺疂鐨勫垎浜摼鎺� * * @param acceptData - * @param uid -鐢ㄦ埛ID - * @param auctionId-鍟嗗搧ID + * @param uid + * -鐢ㄦ埛ID + * @param auctionId-鍟嗗搧ID * @param out */ @RequestMapping(value = "createShareInfo") @@ -303,7 +304,7 @@ // 鍒嗕韩id try { ShareGoodsRecordDTO shareRecord = userShareGoodsRecordService.addRecordGoodsDetail(uid, goodsId, - Constant.SOURCE_TYPE_TAOBAO); + Constant.SOURCE_TYPE_TAOBAO, false); shareInfo.setShareId(shareRecord.getRedisKey()); } catch (Exception e) { try { @@ -367,12 +368,21 @@ public void createTaoLijin(Long uid, Long auctionId, int totalNum, String relationId, HttpServletRequest request, PrintWriter out) { try { - TaoBaoLink taoBaoLink = shareGoodsService.getTaoLiJinLinkForShare(uid, auctionId, relationId); + TaoBaoGoodsBrief goods = null; + try { + goods = TaoKeApiUtil.searchGoodsDetail(auctionId, new TaoKeAppInfo(TaoBaoConstant.TAOBAO_AUTH_APPKEY, + TaoBaoConstant.TAOBAO_AUTH_APPSECRET, TaoBaoConstant.TAOBAO_SPECIAL_PID_DEFAULT)); + } catch (TaobaoGoodsDownException e2) { + e2.printStackTrace(); + } - TaoBaoGoodsBrief goods = taoBaoLink.getGoods(); + if (goods == null) { + out.print(JsonUtil.loadFalseResult("鍟嗗搧宸蹭笅鏋�")); + return; + } // 璁$畻鎺ㄥ箍绾㈠寘 - String warningRate = configTaoLiJinService.getValueByKey("warning_value"); + String warningRate = configTaoLiJinService.getValueByKey("warning_value", new Date()); BigDecimal spreadMoney = TaoLiJinUtil.getSpreadMoney(warningRate, goods); // 鎺ㄥ箍绾㈠寘 涓嶈兘灏忎簬1 @@ -406,53 +416,50 @@ } shareInfo.setClickUrl(url); + TaoBaoLink taoBaoLink = new TaoBaoLink(); + taoBaoLink.setCouponLink(taoLiJinLink); + taoBaoLink.setClickUrl(taoLiJinLink); + // 鍒涘缓娣樺彛浠� if (!StringUtil.isNullOrEmpty(taoLiJinLink)) {// 閫氳繃绔嬪嵆鎺ㄥ箍鏂瑰紡鑾峰彇娣樺彛浠ゆ垚鍔� String quanToken = TaoKeApiUtil.getTKToken(goods.getPictUrl(), goods.getTitle(), taoLiJinLink); if (!StringUtil.isNullOrEmpty(quanToken)) { taoBaoLink.setTaoToken(quanToken); } - } else if (!StringUtil.isNullOrEmpty(taoBaoLink.getClickUrl())) { - String quanToken = TaoKeApiUtil.getTKToken(goods.getPictUrl(), goods.getTitle(), - taoBaoLink.getClickUrl()); - if (!StringUtil.isNullOrEmpty(quanToken)) { - taoBaoLink.setTaoToken(quanToken); - } } shareInfo.setToken(taoBaoLink.getTaoToken()); shareInfo.setRule(configService.get("share_single_goods_rule")); - shareInfo.setPictUrl(TbImgUtil.getTBSizeImg(taoBaoLink.getGoods().getPictUrl(), 500)); + shareInfo.setPictUrl(TbImgUtil.getTBSizeImg(goods.getPictUrl(), 500)); // 鏃犲埜 - String shopType = taoBaoLink.getGoods().getUserType() == 0 ? "娣樺疂浠�" : "澶╃尗浠�"; + String shopType = goods.getUserType() == 0 ? "娣樺疂浠�" : "澶╃尗浠�"; String shareText = ""; - if (StringUtil.isNullOrEmpty(taoBaoLink.getGoods().getCouponInfo())) { + if (StringUtil.isNullOrEmpty(goods.getCouponInfo())) { String text = shareGoodsTextTemplateService.getCommonTemplate(uid); if (StringUtil.isNullOrEmpty(text)) text = configService.get("goods_share_text_nocoupon"); - shareText = text.replace("{鏍囬}", taoBaoLink.getGoods().getTitle()).replace("{鍟嗗搧鍘熶环}", - MoneyBigDecimalUtil.getWithNoZera(taoBaoLink.getGoods().getZkPrice()) + ""); + shareText = text.replace("{鏍囬}", goods.getTitle()).replace("{鍟嗗搧鍘熶环}", + MoneyBigDecimalUtil.getWithNoZera(goods.getZkPrice()) + ""); } else// 鏈夊埜 { String text = shareGoodsTextTemplateService.getTaoLiJinTemplate(uid); if (StringUtil.isNullOrEmpty(text)) - text = configTaoLiJinService.getValueByKey("goods_share_text"); + text = configTaoLiJinService.getValueByKey("goods_share_text", new Date()); - shareText = text.replace("{鏍囬}", taoBaoLink.getGoods().getTitle()) - .replace("{鍟嗗搧鍘熶环}", MoneyBigDecimalUtil.getWithNoZera(taoBaoLink.getGoods().getZkPrice()) + "") - .replace("{浼樻儬鍒搁潰棰潁", - MoneyBigDecimalUtil.getWithNoZera(taoBaoLink.getGoods().getCouponAmount()).toString()) + shareText = text.replace("{鏍囬}", goods.getTitle()) + .replace("{鍟嗗搧鍘熶环}", MoneyBigDecimalUtil.getWithNoZera(goods.getZkPrice()) + "") + .replace("{浼樻儬鍒搁潰棰潁", MoneyBigDecimalUtil.getWithNoZera(goods.getCouponAmount()).toString()) .replace("{娣樼ぜ閲戦潰棰潁", MoneyBigDecimalUtil.getWithNoZera(spreadMoney).toString()) - .replace("{浼樻儬鍒镐环}", TaoBaoUtil.getAfterUseCouplePrice(taoBaoLink.getGoods()) + ""); + .replace("{浼樻儬鍒镐环}", TaoBaoUtil.getAfterUseCouplePrice(goods) + ""); } shareText = shareText.replace("{搴楅摵绫诲瀷}", shopType) - .replace("{鏈堥攢閲弣", TaoBaoUtil.getSaleCount(taoBaoLink.getGoods().getBiz30day())) - .replace("{棰嗗埜鐭摼}", shortLink).replace("{娣樺彛浠", taoBaoLink.getTaoToken()); + .replace("{鏈堥攢閲弣", TaoBaoUtil.getSaleCount(goods.getBiz30day())).replace("{棰嗗埜鐭摼}", shortLink) + .replace("{娣樺彛浠", taoBaoLink.getTaoToken()); shareInfo.setShareText(shareText); - String descText = shareText.replace(taoBaoLink.getGoods().getTitle(), "").trim(); + String descText = shareText.replace(goods.getTitle(), "").trim(); if (descText.startsWith("\\r\\n")) descText = descText.substring(0); @@ -468,11 +475,11 @@ // 娣诲姞鍒嗕韩璁板綍 BigDecimal rate = hongBaoManageService.getShareRate(); - BigDecimal shareMoney = TaoBaoUtil.getShareGoodsHongBaoInfo(taoBaoLink.getGoods(), rate); + BigDecimal shareMoney = TaoBaoUtil.getShareGoodsHongBaoInfo(goods, rate); shareInfo.setShareMoney("楼" + shareMoney.toString()); try { ShareGoodsRecordDTO shareRecord = userShareGoodsRecordService.addRecordGoodsDetail(uid, auctionId, - Constant.SOURCE_TYPE_TAOBAO); + Constant.SOURCE_TYPE_TAOBAO, true); shareInfo.setShareId(shareRecord.getRedisKey()); } catch (Exception e) { try { @@ -484,6 +491,7 @@ out.print(JsonUtil.loadTrueResult(JsonUtil.getSimpleGson().toJson(shareInfo))); final TaoBaoLink taobaoLink = taoBaoLink; + final TaoBaoGoodsBrief finalGoods=goods; // 寮傛鎿嶄綔 com.yeshi.fanli.util.ThreadUtil.run(new Runnable() { @Override @@ -497,10 +505,10 @@ history.setTkCode(taobaoLink.getTaoToken()); history.setLink(taobaoLink.getClickUrl()); history.setQuanLink(taobaoLink.getCouponLink()); - history.setGoodsId(taobaoLink.getGoods().getAuctionId()); - history.setPostPicture(taobaoLink.getGoods().getPictUrl()); + history.setGoodsId(finalGoods.getAuctionId()); + history.setPostPicture(finalGoods.getPictUrl()); - List<String> imgList = taobaoLink.getGoods().getImgList(); + List<String> imgList = finalGoods.getImgList(); if (imgList == null) { imgList = new ArrayList<>(); } @@ -509,14 +517,9 @@ } }); return; - } catch (ShareGoodsException e) { + } catch (Exception e) { LogHelper.errorDetailInfo(e, "鍒嗕韩鍑洪敊:uid:" + uid + "auctionId:" + auctionId, ""); - // 鍒嗕韩鍑洪敊鎶ヨ - try { - monitorService.addClientAPIMonitor(MonitorFactory.createClientAPI(request, e.getCode(), 0, "鍒嗕韩鍑洪敊")); - } catch (Exception e1) { - } - out.print(JsonUtil.loadFalseResult(e.getCode(), e.getMessage())); + out.print(JsonUtil.loadFalseResult("鍒涘缓鍒嗕韩鍑洪敊")); businessEmergent110Service.shareTaoBaoGoodsError(StringUtil.Md5(auctionId + "")); } } @@ -533,60 +536,52 @@ * @param out */ public void createJDShare(AcceptData acceptData, Long uid, Long goodsId, String source, PrintWriter out) { - - JDGoods jdGoods = JDApiUtil.queryGoodsDetail(goodsId); - if (jdGoods == null) { - jdGoods = JDApiUtil.getGoodsDetail(goodsId); - } - + JDGoods jdGoods = jdGoodsCacheUtil.getGoodsInfo(goodsId); if (jdGoods == null) { out.print(JsonUtil.loadFalseResult(1, "璇ュ晢鍝佹窐宸蹭笅鏋�")); return; } - // TODO - ShareInfoVO shareInfo = new ShareInfoVO(); - String url = String.format("http://%s%s?uid=%s&id=%s&appType=flq&goodsType=%s", configService.getH5Host(), - Constant.systemCommonConfig.getShareGoodsPagePath(), AESUtil.encrypt(uid + "", Constant.UIDAESKEY), - goodsId + "", Constant.SOURCE_TYPE_JD); + // String url = String.format("http://%s%s?uid=%s&id=%s", + // configService.getH5Host(), + // Constant.systemCommonConfig.getShareGoodsPagePathJD(), + // AESUtil.encrypt(uid + "", Constant.UIDAESKEY), + // goodsId + ""); - // 鍒哥煭杩炴帴 - String shortLink = HttpUtil.getShortLink(url); - if (!StringUtil.isNullOrEmpty(shortLink)) { - url = shortLink; + String couponUrl = null; + JDCouponInfo couponInfo = jdGoods.getCouponInfo(); + if (couponInfo != null) { + couponUrl = couponInfo.getLink(); } + String materialId = "https://item.jd.com/" + goodsId + ".html"; + String jumpLink = JDApiUtil.convertShortLink(materialId, couponUrl, JDApiUtil.POSITION_SHARE + "", uid + ""); - shareInfo.setClickUrl(url); + ShareInfoVO shareInfo = new ShareInfoVO(); + shareInfo.setClickUrl(jumpLink); shareInfo.setRule(configService.get("share_rule_link_jd")); shareInfo.setPictUrl(jdGoods.getPicUrl()); String shareText = ""; - String shopType = "浜笢浠�"; + boolean hasCoupon = false; // 鍒嗕韩妯℃澘 - JDCouponInfo couponInfo = jdGoods.getCouponInfo(); - if (couponInfo == null) { - String text = shareGoodsTextTemplateService.getCommonTemplate(uid); - if (StringUtil.isNullOrEmpty(text)) { - text = configService.get("goods_share_text_nocoupon"); - } - shareText = text.replace("{鏍囬}", jdGoods.getSkuName()).replace("{鍟嗗搧鍘熶环}", - MoneyBigDecimalUtil.getWithNoZera(jdGoods.getPrice()) + ""); - } else// 鏈夊埜 - { - String text = shareGoodsTextTemplateService.geteCouponTemplate(uid); - if (StringUtil.isNullOrEmpty(text)) - text = configService.get("goods_share_text_coupon"); + ShareGoodsTextTemplate textTemplate = shareGoodsTextTemplateService.getShareGoodsTextTemplate(uid); + if (couponInfo == null) { // 鏃犲埜妯℃澘 + if (textTemplate != null) + shareText = textTemplate.getShareJDTextTemplate(); - shareText = text.replace("{鏍囬}", jdGoods.getSkuName()) - .replace("{鍟嗗搧鍘熶环}", MoneyBigDecimalUtil.getWithNoZera(jdGoods.getPrice()) + "") - .replace("{浼樻儬鍒搁潰棰潁", MoneyBigDecimalUtil.getWithNoZera(couponInfo.getDiscount()) + "") - .replace("{浼樻儬鍒镐环}", JDUtil.getQuanPrice(jdGoods) + ""); + if (StringUtil.isNullOrEmpty(shareText)) + shareText = configService.get("goods_share_text_nocoupon_jd"); + } else { // 鏈夊埜妯℃澘 + hasCoupon = true; + if (textTemplate != null) + shareText = textTemplate.getShareJDTextTemplateCoupon(); + + if (StringUtil.isNullOrEmpty(shareText)) + shareText = configService.get("goods_share_text_coupon_jd"); } - - shareText = shareText.replace("{搴楅摵绫诲瀷}", shopType) - .replace("{鏈堥攢閲弣", JDUtil.getSaleCount(jdGoods.getInOrderCount30Days())).replace("{棰嗗埜鐭摼}", shortLink) - .replace("{娣樺彛浠", null); + shareText = shareGoodsTextTemplateService.createContentByTemplateJD(shareText, uid, jdGoods, jumpLink, + hasCoupon); shareInfo.setShareText(shareText); String descText = shareText.replace(jdGoods.getSkuName(), "").trim(); @@ -595,7 +590,6 @@ } shareInfo.setDescText(descText); - // String imgs = configService.get("goods_share_notify_imgs"); JSONArray array = JSONArray.fromObject(imgs); int p = (int) (array.size() * Math.random()); @@ -610,7 +604,7 @@ shareInfo.setShareMoney("楼" + shareMoney.toString()); try { ShareGoodsRecordDTO shareRecord = userShareGoodsRecordService.addRecordGoodsDetail(uid, goodsId, - Constant.SOURCE_TYPE_JD); + Constant.SOURCE_TYPE_JD, false); shareInfo.setShareId(shareRecord.getRedisKey()); } catch (Exception e) { try { @@ -658,55 +652,49 @@ * @param out */ public void createPDDShare(AcceptData acceptData, Long uid, Long goodsId, String source, PrintWriter out) { - PDDGoodsDetail goods = PinDuoDuoApiUtil.getGoodsDetail(goodsId); + PDDGoodsDetail goods = pinDuoDuoCacheUtil.getGoodsInfo(goodsId); if (goods == null) { out.print(JsonUtil.loadFalseResult(1, "璇ュ晢鍝佸凡涓嬫灦")); return; } + // String url = String.format("http://%s%s?uid=%s&id=%s", + // configService.getH5Host(), + // Constant.systemCommonConfig.getShareGoodsPagePathPDD(), + // AESUtil.encrypt(uid + "", Constant.UIDAESKEY), + // goodsId + ""); + + String jumpLink = PinDuoDuoApiUtil.getPromotionUrl(goodsId, PinDuoDuoApiUtil.PID_SHARE + "", uid + ""); + ShareInfoVO shareInfo = new ShareInfoVO(); - - // TODO - String url = String.format("http://%s%s?uid=%s&id=%s&appType=flq&goodsType=%s", configService.getH5Host(), - Constant.systemCommonConfig.getShareGoodsPagePath(), AESUtil.encrypt(uid + "", Constant.UIDAESKEY), - goodsId + "", Constant.SOURCE_TYPE_PDD); - - String shortLink = HttpUtil.getShortLink(url); - if (!StringUtil.isNullOrEmpty(shortLink)) { - url = shortLink; - } - - shareInfo.setClickUrl(url); + shareInfo.setClickUrl(jumpLink); shareInfo.setRule(configService.get("share_rule_link_pdd")); shareInfo.setPictUrl(goods.getGoodsImageUrl()); - String shareText = ""; - String shopType = "鎷煎澶氫环"; - - // 鏃犲埜 + String template = ""; + boolean hasCoupon = false; + ShareGoodsTextTemplate textTemplate = shareGoodsTextTemplateService.getShareGoodsTextTemplate(uid); if (goods.getHasCoupon() == null || !goods.getHasCoupon()) { - String text = shareGoodsTextTemplateService.getCommonTemplate(uid); - if (StringUtil.isNullOrEmpty(text)) - text = configService.get("goods_share_text_nocoupon"); - shareText = text.replace("{鏍囬}", goods.getGoodsName()).replace("{鍟嗗搧鍘熶环}", - MoneyBigDecimalUtil.getWithNoZera(new BigDecimal(goods.getMinNormalPrice())) + ""); - } else// 鏈夊埜 - { - String text = shareGoodsTextTemplateService.geteCouponTemplate(uid); - if (StringUtil.isNullOrEmpty(text)) - text = configService.get("goods_share_text_coupon"); + if (textTemplate != null) + template = textTemplate.getSharePDDTextTemplate(); - shareText = text.replace("{鏍囬}", goods.getGoodsName()) - .replace("{鍟嗗搧鍘熶环}", - MoneyBigDecimalUtil.getWithNoZera(new BigDecimal(goods.getMinNormalPrice())) + "") - .replace("{浼樻儬鍒搁潰棰潁", - MoneyBigDecimalUtil.getWithNoZera(new BigDecimal(goods.getCouponDiscount())) + "") - .replace("{浼樻儬鍒镐环}", PinDuoDuoUtil.getQuanPrice(goods) + ""); + if (StringUtil.isNullOrEmpty(template)) + template = configService.get("goods_share_text_nocoupon_pdd"); + } else { + hasCoupon = true; + if (textTemplate != null) + template = textTemplate.getSharePDDTextTemplateCoupon(); + + if (StringUtil.isNullOrEmpty(template)) + template = configService.get("goods_share_text_coupon_pdd"); } - shareText = shareText.replace("{搴楅摵绫诲瀷}", shopType) - .replace("{鏈堥攢閲弣", goods.getSalesTip()).replace("{棰嗗埜鐭摼}", shortLink) - .replace("{娣樺彛浠", null); + // 鍒涘缓鍙d护 + String token = PinDuoDuoApiUtil.createGenerate(goodsId); + + // 鐢熸垚鍒嗕韩鍐呭 + String shareText = shareGoodsTextTemplateService.createContentByTemplatePDD(template, uid, goods, jumpLink, + hasCoupon, token); shareInfo.setShareText(shareText); String descText = shareText.replace(goods.getGoodsName(), "").trim(); @@ -731,7 +719,7 @@ try { ShareGoodsRecordDTO shareRecord = userShareGoodsRecordService.addRecordGoodsDetail(uid, goodsId, - Constant.SOURCE_TYPE_JD); + Constant.SOURCE_TYPE_PDD, false); shareInfo.setShareId(shareRecord.getRedisKey()); } catch (Exception e) { try { @@ -751,7 +739,7 @@ history.setUser(new UserInfo(uid)); history.setHongbao(shareMoney); history.setCreateTime(new Date()); - history.setGoodsType(Constant.SOURCE_TYPE_JD); + history.setGoodsType(Constant.SOURCE_TYPE_PDD); history.setTkCode(null); history.setLink(null); history.setQuanLink(null); @@ -805,12 +793,12 @@ return; } - if (goodsType == Constant.SOURCE_TYPE_TAOBAO) { + if (goodsType == Constant.SOURCE_TYPE_JD) { createJDViewText(goodsType, uid, template, goodsId, hasCoupon, out); return; } - if (goodsType == Constant.SOURCE_TYPE_TAOBAO) { + if (goodsType == Constant.SOURCE_TYPE_PDD) { createPDDViewText(goodsType, uid, template, goodsId, hasCoupon, out); return; } @@ -959,10 +947,13 @@ } } - String url = String.format("http://%s%s?uid=%s&id=%s&appType=flq", configService.getH5Host(), - Constant.systemCommonConfig.getShareGoodsPagePath(), AESUtil.encrypt(uid + "", Constant.UIDAESKEY), - goodsId + ""); - String shortLink = HttpUtil.getShortLink(url); + String couponUrl = null; + JDCouponInfo couponInfo = goods.getCouponInfo(); + if (couponInfo != null) { + couponUrl = couponInfo.getLink(); + } + String materialId = "https://item.jd.com/" + goodsId + ".html"; + String shortLink = JDApiUtil.convertShortLink(materialId, couponUrl, JDApiUtil.POSITION_SHARE + "", uid + ""); String content = shareGoodsTextTemplateService.createContentByTemplateJD(template, uid, goods, shortLink, hasCoupon); @@ -972,7 +963,7 @@ } /** - * 鍒涘缓浜笢鍒嗕韩妯℃澘 + * 鍒涘缓鎷煎澶氬垎浜ā鏉� * * @param uid * @param template @@ -1014,11 +1005,15 @@ } } - // 鍒涘缓h5杩炴帴 - String url = String.format("http://%s%s?uid=%s&id=%s&appType=flq", configService.getH5Host(), - Constant.systemCommonConfig.getShareGoodsPagePath(), AESUtil.encrypt(uid + "", Constant.UIDAESKEY), - goodsId + ""); - String shortLink = HttpUtil.getShortLink(url); + // // 鍒涘缓h5杩炴帴 + // String url = String.format("http://%s%s?uid=%s&id=%s&appType=flq", + // configService.getH5Host(), + // Constant.systemCommonConfig.getShareGoodsPagePath(), + // AESUtil.encrypt(uid + "", Constant.UIDAESKEY), + // goodsId + ""); + // String shortLink = HttpUtil.getShortLink(url); + + String shortLink = PinDuoDuoApiUtil.getPromotionUrl(goodsId, PinDuoDuoApiUtil.PID_SHARE + "", uid + ""); // 鍒涘缓鍙d护 String token = PinDuoDuoApiUtil.createGenerate(goodsId); @@ -1047,7 +1042,7 @@ if (tljId != null) { template = shareGoodsTextTemplateService.getTaoLiJinTemplate(uid); if (StringUtil.isNullOrEmpty(template)) - template = configTaoLiJinService.getValueByKey("goods_share_text"); + template = configTaoLiJinService.getValueByKey("goods_share_text", new Date()); } else { template = shareGoodsTextTemplateService.geteCouponTemplate(uid); if (StringUtil.isNullOrEmpty(template)) @@ -1140,7 +1135,8 @@ if (goodsType == Constant.SOURCE_TYPE_TAOBAO) { if (tljId != null) { - out.print(JsonUtil.loadTrueResult(configTaoLiJinService.getValueByKey("share_goods_rules"))); + out.print( + JsonUtil.loadTrueResult(configTaoLiJinService.getValueByKey("share_goods_rules", new Date()))); } else { out.print(JsonUtil.loadTrueResult(configService.get("share_goods_template_rules"))); } @@ -1221,7 +1217,8 @@ * * @param acceptData * @param uid - * @param hasCoupon -鏄惁鏈夊埜 + * @param hasCoupon + * -鏄惁鏈夊埜 * @param out */ @RequestMapping(value = "resetShareTextTemplate", method = RequestMethod.POST) @@ -1237,7 +1234,7 @@ return; } - if (goodsType == Constant.SOURCE_TYPE_TAOBAO) { + if (goodsType == Constant.SOURCE_TYPE_TAOBAO) { if (hasCoupon) { if (tljId != null) { shareGoodsTextTemplateService.resetTaoLijinTemplate(uid); @@ -1247,21 +1244,20 @@ } else { shareGoodsTextTemplateService.resetCommonTemplate(uid); } - } else if (goodsType == Constant.SOURCE_TYPE_JD) { - if (hasCoupon) { + } else if (goodsType == Constant.SOURCE_TYPE_JD) { + if (hasCoupon) { shareGoodsTextTemplateService.resetCouponTemplateJD(uid); } else { shareGoodsTextTemplateService.resetCommonTemplateJD(uid); } - } else if (goodsType == Constant.SOURCE_TYPE_PDD) { - if (hasCoupon) { + } else if (goodsType == Constant.SOURCE_TYPE_PDD) { + if (hasCoupon) { shareGoodsTextTemplateService.resetCouponTemplatePDD(uid); } else { shareGoodsTextTemplateService.resetCommonTemplatePDD(uid); } - } - - + } + if (goodsId != null) { viewShareTextTemplate(acceptData, uid, null, goodsType, goodsId, tljId, hasCoupon, out); return; -- Gitblit v1.8.0