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/service/manger/goods/ConvertLinkManager.java | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/manger/goods/ConvertLinkManager.java b/fanli/src/main/java/com/yeshi/fanli/service/manger/goods/ConvertLinkManager.java index 04a00a9..8e0274c 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/manger/goods/ConvertLinkManager.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/manger/goods/ConvertLinkManager.java @@ -15,6 +15,7 @@ import org.yeshi.utils.StringUtil; import com.yeshi.fanli.dto.pdd.PDDPromotionUrl; +import com.yeshi.fanli.dto.taobao.api.TaoKeOfficialActivityConvertResultDTO; import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief; import com.yeshi.fanli.entity.taobao.TaoKeAppInfo; import com.yeshi.fanli.exception.goods.ConvertLinkExceptionException; @@ -250,7 +251,13 @@ String activityid = st.replace("{娣樺疂娲诲姩:", "").replace("}", ""); if (!StringUtil.isNullOrEmpty(activityid)) { String adzoneId = TaoBaoConstant.TAOBAO_RELATION_PID_DEFAULT.split("_")[3]; - String link = TaoKeApiUtil.officialActivityConvert(adzoneId, activityid, relationId); + TaoKeOfficialActivityConvertResultDTO dto = TaoKeApiUtil.officialActivityConvert(adzoneId, + activityid, relationId); + String link = dto.getShort_click_url(); + if (StringUtil.isNullOrEmpty(link)) { + link = dto.getClick_url(); + } + String token = TaoKeApiUtil.getTKToken("http://", "娣樺疂瀹樻柟娲诲姩", link); newText = newText.replace(st, TaoBaoUtil.filterTaoToken(token)); } -- Gitblit v1.8.0