From 81da61b828e29b7745e1382dfbbaeb685dc083ef Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 23 一月 2024 17:17:55 +0800
Subject: [PATCH] 抖音转链修改

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java
index 4584763..843f4a7 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java
@@ -45,6 +45,8 @@
 import com.yeshi.fanli.util.cache.PinDuoDuoCacheUtil;
 import com.yeshi.fanli.util.factory.CommonGoodsFactory;
 import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
+import com.yeshi.fanli.util.goods.douyin.vo.DYGoods;
+import com.yeshi.fanli.util.goods.douyin.vo.DYGoodsDetail;
 import com.yeshi.fanli.util.jd.JDApiUtil;
 import com.yeshi.fanli.util.jd.JDUtil;
 import com.yeshi.fanli.util.pinduoduo.PinDuoDuoApiUtil;
@@ -2187,7 +2189,7 @@
         // 鐢熸垚鍙d护
         String token = null;
         try {
-            TaoBaoLink taoBaoLink = taoBaoLinkManager.getTaoBaoLinkForShare(system, Constant.LINK_TOKEN_VERIFY_UID, goodsBrief.getAuctionId(), "1", null);
+            TaoBaoLink taoBaoLink = taoBaoLinkManager.getTaoBaoLinkForShare(system, Constant.LINK_TOKEN_VERIFY_UID, goodsBrief.getAuctionId(), Constant.LINK_TOKEN_VERIFY_RELATION_ID, null);
             token = taoBaoLink.getTaoToken();
         } catch (TaoBaoConvertLinkException e) {
             e.printStackTrace();
@@ -2777,6 +2779,25 @@
     }
 
     @Override
+    public void updateDYGoods(DYGoodsDetail goods) {
+        if (goods == null) {
+            return;
+        }
+        for (SystemEnum system : SystemEnum.values()) {
+            List<GoodsEvaluate> queryExist = goodsEvaluateDao.queryExist(Constant.SOURCE_TYPE_DY,
+                    goods.getProduct_id()+"", system);
+            if (queryExist == null || queryExist.size() == 0) {
+                continue;
+            }
+
+            GoodsMoneyConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate("android", "55", system);
+            paramsDTO.setBaseFanliRate(hongBaoManageService.getBaseFanliRate(system));
+            GoodsDetailVO goodsNew = GoodsDetailVOFactory.convertDYGoods(goods, paramsDTO);
+            updateGoods(queryExist, goodsNew);
+        }
+    }
+
+    @Override
     public void updateSuningGoods(SuningGoodsInfo goods) {
         if (goods == null) {
             return;

--
Gitblit v1.8.0