| | |
| | | } |
| | | shareInfo.setCommentTexts(commentTexts); |
| | | |
| | | String shareText = ""; |
| | | // 无券 |
| | | String shopType = taoBaoLink.getGoods().getUserType() == 0 ? TaoBaoConstant.SHARE_PRICE_TAOBAO |
| | | : TaoBaoConstant.SHARE_PRICE_TM; |
| | | |
| | | if (StringUtil.isNullOrEmpty(taoBaoLink.getGoods().getCouponInfo())) { |
| | | String text = shareGoodsTextTemplateService.getCommonTemplate(uid); |
| | | if (StringUtil.isNullOrEmpty(text)) |
| | | text = configService.get(ConfigKeyEnum.goodsShareTextNoCoupon.getKey()); |
| | | shareText = text.replace("{标题}", taoBaoLink.getGoods().getTitle()).replace("{商品原价}", |
| | | MoneyBigDecimalUtil.getWithNoZera(taoBaoLink.getGoods().getZkPrice()) + ""); |
| | | } else// 有券 |
| | | { |
| | | String text = shareGoodsTextTemplateService.geteCouponTemplate(uid); |
| | | if (StringUtil.isNullOrEmpty(text)) |
| | | text = configService.get(ConfigKeyEnum.goodsShareTextCoupon.getKey()); |
| | | |
| | | shareText = text.replace("{标题}", taoBaoLink.getGoods().getTitle()) |
| | | .replace("{商品原价}", MoneyBigDecimalUtil.getWithNoZera(taoBaoLink.getGoods().getZkPrice()) + "") |
| | | .replace("{优惠券面额}", |
| | | MoneyBigDecimalUtil.getWithNoZera(taoBaoLink.getGoods().getCouponAmount()).toString()) |
| | | .replace("{优惠券价}", TaoBaoUtil.getAfterUseCouplePrice(taoBaoLink.getGoods()) + ""); |
| | | TaoBaoGoodsBrief goods = taoBaoLink.getGoods(); |
| | | |
| | | boolean coupon = false; |
| | | if (!StringUtil.isNullOrEmpty(taoBaoLink.getGoods().getCouponInfo())) { |
| | | coupon = true; |
| | | } |
| | | |
| | | shareText = shareText.replace("{店铺类型}", shopType) |
| | | .replace("{月销量}", TaoBaoUtil.getSaleCount(taoBaoLink.getGoods().getBiz30day())) |
| | | .replace("{领券短链}", shortLink).replace("{淘口令}", TaoBaoUtil.filterTaoToken(taoBaoLink.getTaoToken())); |
| | | |
| | | |
| | | String template = shareGoodsTextTemplateService.getTextTemplateByTB(uid); |
| | | String shareText = shareGoodsTextTemplateService.createContentTB(template, goods, taoBaoLink.getTaoToken(), coupon); |
| | | shareInfo.setShareText(shareText); |
| | | |
| | | |
| | | String descText = shareText.replace(taoBaoLink.getGoods().getTitle(), "").trim(); |
| | | if (descText.startsWith("\\r\\n")) { |
| | | descText = descText.substring(0); |
| | | } |
| | | shareInfo.setDescText(descText); |
| | | |
| | | shareInfo.setDescText(deleteBlankLine(descText)); |
| | | |
| | | // 测试 |
| | | // 2.0.2之前 |
| | |
| | | e1.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | String commentText = ""; |
| | | String recommendText = ""; |
| | | if (VersionUtil.greaterThan_2_0_7(platform, version)) { |
| | | TaoBaoGoodsBrief goods = taoBaoLink.getGoods(); |
| | | String template = configService.get(ConfigKeyEnum.quickShareGoodsText.getKey()); |
| | | recommendText = template.replace("[商品标题]", goods.getTitle()); |
| | | if (StringUtil.isNullOrEmpty(goods.getDescription())) { |
| | | String template2 = configService.get(ConfigKeyEnum.quickShareGoodsText.getKey()); |
| | | recommendText = template2.replace("[商品标题]", goods.getTitle()); |
| | | if (!coupon) { |
| | | recommendText = recommendText.replace("推荐理由:[推荐语]", ""); |
| | | } else { |
| | | recommendText = recommendText.replace("[推荐语]", goods.getDescription()); |
| | |
| | | if (StringUtil.isNullOrEmpty(taoBaoLink.getGoods().getCouponInfo())) { |
| | | commentText = commentText.replace("领券抢购", "抢购"); |
| | | commentText = commentText.replace("【券后价】[券后价]元", ""); |
| | | recommendText = recommendText.replace("优惠券:[券面额]元", ""); |
| | | } else { |
| | | commentText = commentText.replace("[券后价]", |
| | | TaoBaoUtil.getAfterUseCouplePrice(taoBaoLink.getGoods()) + ""); |
| | | } |
| | | |
| | | |
| | | if (StringUtil.isNullOrEmpty(taoBaoLink.getGoods().getCouponInfo())) { |
| | | recommendText = recommendText.replace("优惠券:[券面额]元", ""); |
| | | } else { |
| | | recommendText = recommendText.replace("[券面额]", |
| | | MoneyBigDecimalUtil.getWithNoZera(taoBaoLink.getGoods().getCouponAmount()).toString()); |
| | | } |
| | | } else { |
| | | recommendText = shareInfo.getDescText(); |
| | | commentText = shareInfo.getShareText(); |
| | | recommendText = shareInfo.getDescText(); |
| | | } |
| | | shareInfo.setCommentText(deleteBlankLine(commentText)); |
| | | shareInfo.setRecommendText(deleteBlankLine(recommendText)); |
| | |
| | | shareInfo.setGoodsInfo(GoodsDetailVOFactory.convertJDGoods(jdGoods, |
| | | hongBaoManageService.getShowComputeRate(acceptData.getPlatform(), acceptData.getVersion()))); |
| | | |
| | | String shareText = ""; |
| | | boolean hasCoupon = false; |
| | | |
| | | // 分享模板 |
| | | ShareGoodsTextTemplate textTemplate = shareGoodsTextTemplateService.getShareGoodsTextTemplate(uid); |
| | | if (couponInfo == null) { // 无券模板 |
| | | if (textTemplate != null) |
| | | shareText = textTemplate.getShareJDTextTemplate(); |
| | | |
| | | if (StringUtil.isNullOrEmpty(shareText)) |
| | | shareText = configService.get(ConfigKeyEnum.goodsShareTextNoCouponJD.getKey()); |
| | | } else { // 有券模板 |
| | | if (couponInfo != null) { |
| | | hasCoupon = true; |
| | | if (textTemplate != null) |
| | | shareText = textTemplate.getShareJDTextTemplateCoupon(); |
| | | |
| | | if (StringUtil.isNullOrEmpty(shareText)) |
| | | shareText = configService.get(ConfigKeyEnum.goodsShareTextCouponJD.getKey()); |
| | | } |
| | | shareText = shareGoodsTextTemplateService.createContentByTemplateJD(shareText, uid, jdGoods, jumpLink, |
| | | hasCoupon); |
| | | |
| | | String template = shareGoodsTextTemplateService.getTextTemplateByJD(uid); |
| | | String shareText = shareGoodsTextTemplateService.createContentJD(template, jdGoods, jumpLink, hasCoupon); |
| | | shareInfo.setShareText(shareText); |
| | | |
| | | String descText = shareText.replace(jdGoods.getSkuName(), "").trim(); |
| | |
| | | String commentText = ""; |
| | | String recommendText = ""; |
| | | if (VersionUtil.greaterThan_2_0_7(acceptData.getPlatform(), acceptData.getVersion())) { |
| | | String template = configService.get(ConfigKeyEnum.quickShareGoodsText.getKey()); |
| | | recommendText = template.replace("[商品标题]", jdGoods.getSkuName()); |
| | | String template2 = configService.get(ConfigKeyEnum.quickShareGoodsText.getKey()); |
| | | recommendText = template2.replace("[商品标题]", jdGoods.getSkuName()); |
| | | // 无推荐语 |
| | | recommendText = recommendText.replace("推荐理由:[推荐语]", ""); |
| | | |
| | |
| | | recommendText = recommendText.replace("销量:[销量]", ""); |
| | | } else { |
| | | recommendText = recommendText.replace("[销量]", sales.replace("万", "w")); |
| | | } |
| | | |
| | | String quickCommentText = configService.get(ConfigKeyEnum.quickShareJDCommentText.getKey()); |
| | | commentText = quickCommentText.replace("[原价]", jdGoods.getPrice().toString()); |
| | | commentText = commentText.replace("[链接]", jumpLink); |
| | | if (couponInfo == null) { |
| | | commentText = commentText.replace("领券抢购", "抢购"); |
| | | commentText = commentText.replace("【券后价】[券后价]元", ""); |
| | | recommendText = recommendText.replace("优惠券:[券面额]元", ""); |
| | | } else { |
| | | commentText = commentText.replace("[券后价]", |
| | | BigDecimalUtil.getWithNoZera(JDUtil.getQuanPrice(jdGoods)).toString()); |
| | | recommendText = recommendText.replace("[券面额]", |
| | | BigDecimalUtil.getWithNoZera(JDUtil.getShowCouponInfo(jdGoods).getDiscount()).toString()); |
| | | } |
| | | } else { |
| | | commentText = shareInfo.getShareText(); |
| | |
| | | hongBaoManageService.getVIPFanLiRate()))); |
| | | } |
| | | |
| | | String template = ""; |
| | | boolean hasCoupon = false; |
| | | ShareGoodsTextTemplate textTemplate = shareGoodsTextTemplateService.getShareGoodsTextTemplate(uid); |
| | | if (goods.getHasCoupon() == null || !goods.getHasCoupon()) { |
| | | if (textTemplate != null) |
| | | template = textTemplate.getSharePDDTextTemplate(); |
| | | |
| | | if (StringUtil.isNullOrEmpty(template)) |
| | | template = configService.get(ConfigKeyEnum.goodsShareTextNocouponPDD.getKey()); |
| | | } else { |
| | | hasCoupon = true; |
| | | if (textTemplate != null) |
| | | template = textTemplate.getSharePDDTextTemplateCoupon(); |
| | | |
| | | if (StringUtil.isNullOrEmpty(template)) |
| | | template = configService.get(ConfigKeyEnum.goodsShareTextCouponPDD.getKey()); |
| | | } |
| | | |
| | | // 创建口令 |
| | | String token = PinDuoDuoApiUtil.createGenerate(goodsId); |
| | | |
| | | // 生成分享内容 |
| | | String shareText = shareGoodsTextTemplateService.createContentByTemplatePDD(template, uid, goods, jumpLink, |
| | | hasCoupon, token); |
| | | // String token = PinDuoDuoApiUtil.createGenerate(goodsId); |
| | | |
| | | boolean hasCoupon = true; |
| | | if (goods.getHasCoupon() == null || !goods.getHasCoupon()) { |
| | | hasCoupon = false; |
| | | } |
| | | String template = shareGoodsTextTemplateService.getTextTemplateByPDD(uid); |
| | | String shareText = shareGoodsTextTemplateService.createContentPDD(template, goods, jumpLink, hasCoupon); |
| | | shareInfo.setShareText(shareText); |
| | | |
| | | String descText = shareText.replace(goods.getGoodsName(), "").trim(); |
| | |
| | | * @param hasCoupon |
| | | * @param out |
| | | */ |
| | | public void createTaoBaoViewText(Integer goodsType, Long uid, String template, Long goodsId, Long tljId, |
| | | private void createTaoBaoViewText(Integer goodsType, Long uid, String template, Long goodsId, Long tljId, |
| | | Boolean hasCoupon, PrintWriter out) { |
| | | TaoBaoGoodsBrief goods = taoBaoGoodsCacheUtil.getCommonTaoBaoGoodsInfo(goodsId); |
| | | if (goods == null) |
| | |
| | | template = getShareTemplate(goodsType, uid, hasCoupon, tljId); |
| | | } |
| | | |
| | | // 校验券模板是否正确 |
| | | if (hasCoupon) { |
| | | // 有券商品 |
| | | if (tljId != null) { |
| | | try { |
| | | shareGoodsTextTemplateService.isTaoLiJinTemplateRight(template); |
| | | } catch (ShareGoodsTextTemplateException e) { |
| | | out.print(JsonUtil.loadFalseResult(5, e.getMsg())); |
| | | return; |
| | | } |
| | | } else { |
| | | try { |
| | | shareGoodsTextTemplateService.isCouponTemplateRight(template); |
| | | } catch (ShareGoodsTextTemplateException e) { |
| | | out.print(JsonUtil.loadFalseResult(5, e.getMsg())); |
| | | return; |
| | | } |
| | | } |
| | | } else { |
| | | // 普通商品 |
| | | try { |
| | | shareGoodsTextTemplateService.isCommonTemplateRight(template); |
| | | } catch (ShareGoodsTextTemplateException e) { |
| | | out.print(JsonUtil.loadFalseResult(5, e.getMsg())); |
| | | return; |
| | | } |
| | | // 校验模板是否正确 |
| | | try { |
| | | shareGoodsTextTemplateService.verifyRightTB(template); |
| | | } catch (ShareGoodsTextTemplateException e) { |
| | | out.print(JsonUtil.loadFalseResult(5, e.getMsg())); |
| | | return; |
| | | } |
| | | |
| | | String url = null; |
| | | if (tljId != null) { |
| | | UserTaoLiJinRecord userTaoLiJinRecord = userTaoLiJinRecordService.selectByPrimaryKey(tljId); |
| | | if (userTaoLiJinRecord == null) { |
| | | out.print(JsonUtil.loadFalseResult(5, "淘礼金领取链接不存在")); |
| | | return; |
| | | } |
| | | url = userTaoLiJinRecord.getSendUrl(); |
| | | } else { |
| | | url = String.format("http://%s%s?uid=%s&id=%s&appType=flq", configService.getH5Host(), |
| | | Constant.systemCommonConfig.getShareGoodsPagePath(), AESUtil.encrypt(uid + "", Constant.UIDAESKEY), |
| | | goods.getAuctionId() + ""); |
| | | } |
| | | |
| | | String shortLink = HttpUtil.getShortLink(url); |
| | | |
| | | |
| | | // 查询是否有分享 |
| | | UserShareGoodsHistory userShareHistory = shareGoodsService.getShareGoodsHistory(uid, goods.getAuctionId()); |
| | | String token = ""; |
| | |
| | | StringUtil.isNullOrEmpty(goodsLink.getCouponLink()) ? goodsLink.getAuctionUrl() |
| | | : goodsLink.getCouponLink()); |
| | | } |
| | | String content = shareGoodsTextTemplateService.createContentByTemplate(template, uid, goods, token, shortLink, |
| | | hasCoupon, tljId); |
| | | String content = shareGoodsTextTemplateService.createContentTB(template, goods, token, hasCoupon); |
| | | JSONObject data = new JSONObject(); |
| | | data.put("content", content); |
| | | out.print(JsonUtil.loadTrueResult(data)); |
| | |
| | | * @param hasCoupon |
| | | * @param out |
| | | */ |
| | | public void createJDViewText(Integer goodsType, Long uid, String template, Long goodsId, Boolean hasCoupon, |
| | | private void createJDViewText(Integer goodsType, Long uid, String template, Long goodsId, Boolean hasCoupon, |
| | | PrintWriter out) { |
| | | JDGoods goods = jdGoodsCacheUtil.getGoodsInfo(goodsId); |
| | | if (goods == null) { |
| | |
| | | } |
| | | |
| | | // 校验券模板是否正确 |
| | | if (hasCoupon) { |
| | | // 有券商品 |
| | | try { |
| | | shareGoodsTextTemplateService.isCouponTemplateRightJD(template); |
| | | } catch (ShareGoodsTextTemplateException e) { |
| | | out.print(JsonUtil.loadFalseResult(5, e.getMsg())); |
| | | return; |
| | | } |
| | | |
| | | } else { |
| | | // 普通商品 |
| | | try { |
| | | shareGoodsTextTemplateService.isCommonTemplateRightJD(template); |
| | | } catch (ShareGoodsTextTemplateException e) { |
| | | out.print(JsonUtil.loadFalseResult(5, e.getMsg())); |
| | | return; |
| | | } |
| | | try { |
| | | shareGoodsTextTemplateService.verifyRightJD(template); |
| | | } catch (ShareGoodsTextTemplateException e) { |
| | | out.print(JsonUtil.loadFalseResult(5, e.getMsg())); |
| | | return; |
| | | } |
| | | |
| | | String couponUrl = null; |
| | |
| | | String shortLink = JDApiUtil.convertLinkWithSubUnionId(materialId, couponUrl, JDApiUtil.POSITION_SHARE + "", |
| | | uid + ""); |
| | | |
| | | String content = shareGoodsTextTemplateService.createContentByTemplateJD(template, uid, goods, shortLink, |
| | | hasCoupon); |
| | | String content = shareGoodsTextTemplateService.createContentJD(template, goods, shortLink, hasCoupon); |
| | | JSONObject data = new JSONObject(); |
| | | data.put("content", content); |
| | | out.print(JsonUtil.loadTrueResult(data)); |
| | |
| | | * @param hasCoupon |
| | | * @param out |
| | | */ |
| | | public void createPDDViewText(Integer goodsType, Long uid, String template, Long goodsId, Boolean hasCoupon, |
| | | private void createPDDViewText(Integer goodsType, Long uid, String template, Long goodsId, Boolean hasCoupon, |
| | | PrintWriter out) { |
| | | PDDGoodsDetail goods = pinDuoDuoCacheUtil.getGoodsInfo(goodsId); |
| | | if (goods == null) { |
| | |
| | | } |
| | | |
| | | // 校验券模板是否正确 |
| | | if (hasCoupon) { |
| | | // 有券商品 |
| | | try { |
| | | shareGoodsTextTemplateService.isCouponTemplateRightPDD(template); |
| | | } catch (ShareGoodsTextTemplateException e) { |
| | | out.print(JsonUtil.loadFalseResult(5, e.getMsg())); |
| | | return; |
| | | } |
| | | |
| | | } else { |
| | | // 普通商品 |
| | | try { |
| | | shareGoodsTextTemplateService.isCommonTemplateRightPDD(template); |
| | | } catch (ShareGoodsTextTemplateException e) { |
| | | out.print(JsonUtil.loadFalseResult(5, e.getMsg())); |
| | | return; |
| | | } |
| | | try { |
| | | shareGoodsTextTemplateService.verifyRightPDD(template); |
| | | } catch (ShareGoodsTextTemplateException e) { |
| | | out.print(JsonUtil.loadFalseResult(5, e.getMsg())); |
| | | return; |
| | | } |
| | | |
| | | // // 创建h5连接 |
| | |
| | | |
| | | String shortLink = PinDuoDuoApiUtil.getPromotionUrl(goodsId, PinDuoDuoApiUtil.PID_SHARE + "", uid + ""); |
| | | |
| | | // 创建口令 |
| | | String token = PinDuoDuoApiUtil.createGenerate(goodsId); |
| | | // // 创建口令 |
| | | // String token = PinDuoDuoApiUtil.createGenerate(goodsId); |
| | | |
| | | // 生成分享内容 |
| | | String content = shareGoodsTextTemplateService.createContentByTemplatePDD(template, uid, goods, shortLink, |
| | | hasCoupon, token); |
| | | String content = shareGoodsTextTemplateService.createContentPDD(template, goods, shortLink, hasCoupon); |
| | | |
| | | JSONObject data = new JSONObject(); |
| | | data.put("content", content); |
| | |
| | | private String getShareTemplate(int goodsType, Long uid, boolean hasCoupon, Long tljId) { |
| | | String template = ""; |
| | | if (goodsType == Constant.SOURCE_TYPE_TAOBAO) { |
| | | if (hasCoupon) { |
| | | if (tljId != null) { |
| | | template = shareGoodsTextTemplateService.getTaoLiJinTemplate(uid); |
| | | if (StringUtil.isNullOrEmpty(template)) |
| | | template = configTaoLiJinService.getValueByKey("goods_share_text", new Date()); |
| | | } else { |
| | | template = shareGoodsTextTemplateService.geteCouponTemplate(uid); |
| | | if (StringUtil.isNullOrEmpty(template)) |
| | | template = configService.get(ConfigKeyEnum.goodsShareTextCoupon.getKey()); |
| | | } |
| | | |
| | | } else { |
| | | template = shareGoodsTextTemplateService.getCommonTemplate(uid); |
| | | if (StringUtil.isNullOrEmpty(template)) |
| | | template = configService.get(ConfigKeyEnum.goodsShareTextNoCoupon.getKey()); |
| | | } |
| | | template = shareGoodsTextTemplateService.getTextTemplateByTB(uid); |
| | | } else if (goodsType == Constant.SOURCE_TYPE_JD) { |
| | | ShareGoodsTextTemplate textTemplate = shareGoodsTextTemplateService.getShareGoodsTextTemplate(uid); |
| | | if (hasCoupon) { |
| | | if (textTemplate != null) { |
| | | template = textTemplate.getShareJDTextTemplateCoupon(); |
| | | } |
| | | if (StringUtil.isNullOrEmpty(template)) { |
| | | template = configService.get(ConfigKeyEnum.goodsShareTextCouponJD.getKey()); |
| | | } |
| | | } else { |
| | | if (textTemplate != null) { |
| | | template = textTemplate.getShareJDTextTemplate(); |
| | | } |
| | | |
| | | if (StringUtil.isNullOrEmpty(template)) { |
| | | template = configService.get(ConfigKeyEnum.goodsShareTextNoCouponJD.getKey()); |
| | | } |
| | | } |
| | | template = shareGoodsTextTemplateService.getTextTemplateByJD(uid); |
| | | } else if (goodsType == Constant.SOURCE_TYPE_PDD) { |
| | | ShareGoodsTextTemplate textTemplate = shareGoodsTextTemplateService.getShareGoodsTextTemplate(uid); |
| | | if (hasCoupon) { |
| | | if (textTemplate != null) { |
| | | template = textTemplate.getSharePDDTextTemplateCoupon(); |
| | | } |
| | | if (StringUtil.isNullOrEmpty(template)) { |
| | | template = configService.get(ConfigKeyEnum.goodsShareTextCouponPDD.getKey()); |
| | | } |
| | | } else { |
| | | if (textTemplate != null) { |
| | | template = textTemplate.getSharePDDTextTemplate(); |
| | | } |
| | | |
| | | if (StringUtil.isNullOrEmpty(template)) { |
| | | template = configService.get(ConfigKeyEnum.goodsShareTextNocouponPDD.getKey()); |
| | | } |
| | | } |
| | | template = shareGoodsTextTemplateService.getTextTemplateByPDD(uid); |
| | | } |
| | | return template; |
| | | } |
| | |
| | | |
| | | try { |
| | | if (goodsType == Constant.SOURCE_TYPE_TAOBAO) { |
| | | // 校验券模板是否正确 |
| | | if (hasCoupon) { |
| | | // 有券商品 |
| | | if (tljId != null) { |
| | | shareGoodsTextTemplateService.isTaoLiJinTemplateRight(template); |
| | | shareGoodsTextTemplateService.saveTaoLiJinTemplate(uid, template); |
| | | } else { |
| | | shareGoodsTextTemplateService.isCouponTemplateRight(template); |
| | | shareGoodsTextTemplateService.saveCouponTemplate(uid, template); |
| | | } |
| | | } else { |
| | | // 普通商品 |
| | | shareGoodsTextTemplateService.isCommonTemplateRight(template); |
| | | shareGoodsTextTemplateService.saveCommonTemplate(uid, template); |
| | | } |
| | | shareGoodsTextTemplateService.saveTemplateTB(uid, template); |
| | | } else if (goodsType == Constant.SOURCE_TYPE_JD) { |
| | | if (hasCoupon) { |
| | | shareGoodsTextTemplateService.isCouponTemplateRightJD(template); |
| | | shareGoodsTextTemplateService.saveCouponTemplateJD(uid, template); |
| | | } else { |
| | | shareGoodsTextTemplateService.isCommonTemplateRightJD(template); |
| | | shareGoodsTextTemplateService.saveCommonTemplateJD(uid, template); |
| | | out.print(JsonUtil.loadTrueResult("")); |
| | | } |
| | | shareGoodsTextTemplateService.saveTemplateJD(uid, template); |
| | | } else if (goodsType == Constant.SOURCE_TYPE_PDD) { |
| | | if (hasCoupon) { |
| | | shareGoodsTextTemplateService.isCouponTemplateRightPDD(template); |
| | | shareGoodsTextTemplateService.saveCouponTemplatePDD(uid, template); |
| | | } else { |
| | | shareGoodsTextTemplateService.isCommonTemplateRightPDD(template); |
| | | shareGoodsTextTemplateService.saveCommonTemplatePDD(uid, template); |
| | | out.print(JsonUtil.loadTrueResult("")); |
| | | } |
| | | shareGoodsTextTemplateService.saveTemplatePDD(uid, template); |
| | | } |
| | | } catch (ShareGoodsTextTemplateException e) { |
| | | out.print(JsonUtil.loadFalseResult(5, e.getMsg())); |
| | |
| | | } |
| | | |
| | | if (goodsType == Constant.SOURCE_TYPE_TAOBAO) { |
| | | if (hasCoupon) { |
| | | if (tljId != null) { |
| | | shareGoodsTextTemplateService.resetTaoLijinTemplate(uid); |
| | | } else { |
| | | shareGoodsTextTemplateService.resetCouponTemplate(uid); |
| | | } |
| | | } else { |
| | | shareGoodsTextTemplateService.resetCommonTemplate(uid); |
| | | } |
| | | shareGoodsTextTemplateService.resetCommonTemplate(uid); |
| | | } else if (goodsType == Constant.SOURCE_TYPE_JD) { |
| | | if (hasCoupon) { |
| | | shareGoodsTextTemplateService.resetCouponTemplateJD(uid); |
| | | } else { |
| | | shareGoodsTextTemplateService.resetCommonTemplateJD(uid); |
| | | } |
| | | shareGoodsTextTemplateService.resetCommonTemplateJD(uid); |
| | | } else if (goodsType == Constant.SOURCE_TYPE_PDD) { |
| | | if (hasCoupon) { |
| | | shareGoodsTextTemplateService.resetCouponTemplatePDD(uid); |
| | | } else { |
| | | shareGoodsTextTemplateService.resetCommonTemplatePDD(uid); |
| | | } |
| | | shareGoodsTextTemplateService.resetCommonTemplatePDD(uid); |
| | | } |
| | | |
| | | if (goodsId != null) { |