ソースを参照

订单插入定时(存入测试表)同 提取公共url

zhaoxian 11 ヶ月 前
コミット
f3b8217105

+ 24 - 12
ruixuan-live/src/main/java/com/ruixuan/isc/controller/SupplyChainController.java

@@ -2145,12 +2145,18 @@ public class SupplyChainController extends BaseController {
      */
     @GetMapping("/insertOrderList")
     @ApiOperation(value = "新增分销团长订单列表(游标方式)")
-    public void insertOrderList(Integer queryType, String beginDate, String endDate) {
-        try {
-            supplyChainService.insertOrderList(queryType, beginDate, endDate);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+    public void insertOrderList(Long tokenId, Integer queryType, String beginDate, String endDate) {
+        Thread thread = new Thread() {
+            @Override
+            public void run() {
+                try {
+                    supplyChainService.insertOrderList(tokenId, queryType, beginDate, endDate);
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+        };
+        thread.start();
     }
 
     /**
@@ -2161,12 +2167,18 @@ public class SupplyChainController extends BaseController {
      */
     @GetMapping("/insertNowdayOrderList")
     @ApiOperation(value = "新增当天分销团长订单列表(游标方式)")
-    public void insertNowdayOrderList() {
-        try {
-            supplyChainService.insertNowdayOrderList();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+    public void insertNowdayOrderList(Long tokenId) {
+        Thread thread = new Thread() {
+            @Override
+            public void run() {
+                try {
+                    supplyChainService.insertNowdayOrderList(tokenId);
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+        };
+        thread.start();
     }
 
     static ExecutorService fxNowService = Executors.newFixedThreadPool(10);

+ 8 - 4
ruixuan-live/src/main/java/com/ruixuan/isc/entity/KuaishouSupplyChain.java

@@ -150,7 +150,7 @@ public class KuaishouSupplyChain {
      */
     @Excel(name = "分成比例", width = 15)
     @ApiModelProperty(value = "分成比例")
-    private Long shareRate;
+    private String shareRate;
     /**
      * 货款基数
      */
@@ -280,7 +280,9 @@ public class KuaishouSupplyChain {
         this.setOrderAmount(info.getLong("orderTradeAmount"));
         this.setPayAmount(info.getLong("payAmount"));
         this.setRegimentalPromotionRate(info.getLong("regimentalPromotionRate"));
-        this.setShareRate(info.getLong("shareRateStr"));
+        if (!info.getString("shareRateStr").contains("正在计算中")) {
+            this.setShareRate(info.getString("shareRateStr"));
+        }
         this.setBaseAmount(info.getLong("baseAmount"));
         this.setServiceAmount(info.getLong("serviceAmount"));
         this.setRegimentalPromotionAmount(info.getLong("regimentalPromotionAmount"));
@@ -294,7 +296,7 @@ public class KuaishouSupplyChain {
         this.setPromoterCommissionRate(info.getLong("promoterCommissionRate"));
     }
 
-    public KuaishouSupplyChain(JSONObject info,String type) {
+    public KuaishouSupplyChain(JSONObject info, String type) {
         this.setOid(info.getLong("oid"));
         this.setRegimentalId(info.getLong("activityUserId"));
         this.setActivityId(info.getLong("activityId"));
@@ -328,7 +330,9 @@ public class KuaishouSupplyChain {
         this.setExpendEstimateSettleAmount(info.getLong("expendEstimateSettleAmount"));
         this.setExpendRegimentalPromotionRate(info.getLong("expendRegimentalPromotionRate"));
         this.setBaseAmount(info.getLong("baseAmount"));
-        this.setShareRate(info.getLong("shareRateStr"));
+        if (!info.getString("shareRateStr").contains("正在计算中")) {
+            this.setShareRate(info.getString("shareRateStr"));
+        }
         this.setExcitationIncome(info.getLong("excitationInCome"));
         this.setServiceIncome(info.getLong("serviceIncome"));
         this.setSettlementBizType(info.getInteger("settlementBizType"));

+ 2 - 2
ruixuan-live/src/main/java/com/ruixuan/isc/service/ISupplyChainService.java

@@ -180,9 +180,9 @@ public interface ISupplyChainService {
      */
     void addList(String beginDate, String endDate, String pcursor) throws InterruptedException;
 
-    void insertOrderList(Integer queryType, String beginDate, String endDate) throws Exception;
+    void insertOrderList(Long tokenId,Integer queryType, String beginDate, String endDate) throws Exception;
 
-    void insertNowdayOrderList()throws Exception;
+    void insertNowdayOrderList(Long tokenId)throws Exception;
 
     /*
      *团长查询招商活动列表

+ 3 - 8
ruixuan-live/src/main/java/com/ruixuan/isc/service/impl/KuaishouItemListServiceImpl.java

@@ -54,10 +54,6 @@ public class KuaishouItemListServiceImpl implements IKuaishouItemListService {
     @Autowired
     private MongoTemplate mongoTemplate;
 
-
-    private static final String URL = "https://openapi.kwaixiaodian.com";
-
-
     @Override
     public List<KuaishouItemList> getItemList(Map<String, Object> requestMap) {
         List<KuaishouItemList> itemList = kuaishouItemListMapper.getItemList(requestMap);
@@ -262,7 +258,7 @@ public class KuaishouItemListServiceImpl implements IKuaishouItemListService {
 
     @Override
     public int addCategoryId(KuaishouAccessToken accessToken) throws KsMerchantApiException {
-        AccessTokenKsMerchantClient client = new AccessTokenKsMerchantClient(URL, accessToken.getAppKey(), accessToken.getSignSecret());
+        AccessTokenKsMerchantClient client = new AccessTokenKsMerchantClient(KuaiShouConstants.KFX_URL, accessToken.getAppKey(), accessToken.getSignSecret());
         OpenDistributionPublicCategoryListRequest request = new OpenDistributionPublicCategoryListRequest();
         request.setAccessToken(accessToken.getAccessToken());
         request.setApiMethodVersion(1L);
@@ -429,8 +425,7 @@ public class KuaishouItemListServiceImpl implements IKuaishouItemListService {
     @Override
     public JSONObject getInvalidItemList(Long activityId, Long itemId, KuaishouAccessToken accessToken) {
         JSONObject returnJson = new JSONObject();
-
-        AccessTokenKsMerchantClient client = new AccessTokenKsMerchantClient(URL, accessToken.getAppKey(), accessToken.getSignSecret());
+        AccessTokenKsMerchantClient client = new AccessTokenKsMerchantClient(KuaiShouConstants.KFX_URL, accessToken.getAppKey(), accessToken.getSignSecret());
         OpenDistributionInvestmentActivityInvalidItemListRequest request = new OpenDistributionInvestmentActivityInvalidItemListRequest();
         request.setAccessToken(accessToken.getAccessToken());
         request.setApiMethodVersion(1L);
@@ -461,7 +456,7 @@ public class KuaishouItemListServiceImpl implements IKuaishouItemListService {
     @Override
     public JSONObject getInvestmentActivityOpenItemList(Long activityId, Long itemId, KuaishouAccessToken accessToken) {
         JSONObject returnJson = new JSONObject();
-        AccessTokenKsMerchantClient client = new AccessTokenKsMerchantClient(URL, accessToken.getAppKey(), accessToken.getSignSecret());
+        AccessTokenKsMerchantClient client = new AccessTokenKsMerchantClient(KuaiShouConstants.KFX_URL, accessToken.getAppKey(), accessToken.getSignSecret());
 
         OpenDistributionInvestmentActivityOpenItemListRequest request = new OpenDistributionInvestmentActivityOpenItemListRequest();
         request.setAccessToken(accessToken.getAccessToken());

+ 43 - 123
ruixuan-live/src/main/java/com/ruixuan/isc/service/impl/SupplyChainServiceImpl.java

@@ -16,6 +16,7 @@ import com.kuaishou.merchant.open.api.response.distribution.OpenDistributionInve
 import com.kuaishou.merchant.open.api.response.distribution.OpenDistributionInvestmentActivityOpenListResponse;
 import com.ruixuan.common.utils.Check;
 import com.ruixuan.common.utils.DateUtils;
+import com.ruixuan.isc.constants.KuaiShouConstants;
 import com.ruixuan.isc.entity.ItemCheck;
 import com.ruixuan.isc.entity.KuaiShouActivityInfo;
 import com.ruixuan.isc.entity.KuaiShouActivityOpenItemList;
@@ -37,8 +38,6 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
 
 @Slf4j
 @Service
@@ -837,7 +836,7 @@ public class SupplyChainServiceImpl implements ISupplyChainService {
 
     @Override
     public void addList(String beginDate, String endDate, String pcursor) throws InterruptedException {
-        String url = "https://openapi.kwaixiaodian.com";
+        String url = KuaiShouConstants.KFX_URL;
         Long beginTime = DateUtils.getStartLongTime(beginDate);
         Long endTime = DateUtils.getEndLongTime(endDate);
 //        Map<Long, Long> itemMap = getItemMap();
@@ -877,112 +876,27 @@ public class SupplyChainServiceImpl implements ISupplyChainService {
 
     }
 
-    static ExecutorService ruixuanService = Executors.newFixedThreadPool(6);
-    static ExecutorService miaogousiService = Executors.newFixedThreadPool(3);
-    static ExecutorService rocketService = Executors.newFixedThreadPool(3);
-    static ExecutorService yufuService = Executors.newFixedThreadPool(3);
-    static ExecutorService yuxiuService = Executors.newFixedThreadPool(3);
-    static ExecutorService zhishuiService = Executors.newFixedThreadPool(3);
-
     @Override
-    public void insertOrderList(Integer queryType, String beginDate, String endDate) throws Exception {
-        String url = "https://openapi.kwaixiaodian.com";
+    public void insertOrderList(Long tokenId, Integer queryType, String beginDate, String endDate) throws Exception {
         Long beginTime = DateUtils.getStartLongTime(beginDate);
         Long endTime = DateUtils.getEndLongTime(endDate);
-
-        /* List<KuaishouAccessToken> tokens = accessTokenService.getTokenInfos();
-        tokens.forEach(token -> ruixuanService.submit(() -> {
-            insertRuixuanOrderList(queryType, token, beginTime, endTime, url, "", 1);
-        }));
-        //秒构思
-        Thread.sleep(3000);
-        List<KuaishouAccessToken> mgsTokens = accessTokenService.getMgsTokenInfos();
-        mgsTokens.forEach(token -> miaogousiService.submit(() -> {
-            insertRuixuanOrderList(queryType, token, beginTime, endTime, url, "", 1);
-        }));
-        */
-        //TODO 测完放开
-        //王炸
-        Thread.sleep(3000);
-        List<KuaishouAccessToken> rocketTokens = accessTokenService.getRocketTokenInfos();
-        rocketTokens.forEach(token -> rocketService.submit(() -> {
-            insertRuixuanOrderList(queryType, token, beginTime, endTime, url, "", 1);
-        }));
-        //TODO 测完放开
-       /*//预付
-        Thread.sleep(3000);
-        List<KuaishouAccessToken> yufuTokens = accessTokenService.getYufuTokenInfos();
-        yufuTokens.forEach(token -> yufuService.submit(() -> {
-            insertRuixuanOrderList(queryType, token, beginTime, endTime, url, "", 1);
-        }));
-
-        //毓秀
-        Thread.sleep(3000);
-        List<KuaishouAccessToken> yuxiuTokens = accessTokenService.getYuxiuTokenInfos();
-        yuxiuTokens.forEach(token -> yuxiuService.submit(() -> {
-            insertRuixuanOrderList(queryType, token, beginTime, endTime, url, "", 1);
-        }));
-
-        //止水
-        Thread.sleep(3000);
-        List<KuaishouAccessToken> zhishuiTokens = accessTokenService.getZhishuiTokenInfos();
-        zhishuiTokens.forEach(token -> zhishuiService.submit(() -> {
-            insertRuixuanOrderList(queryType, token, beginTime, endTime, url, "", 1);
-        }));*/
-
+        KuaishouAccessToken token = accessTokenService.getAccessToken(tokenId);
+        insertRuixuanOrderList(queryType, token, beginTime, endTime, KuaiShouConstants.KFX_URL, "", 1);
     }
 
     @Override
-    public void insertNowdayOrderList() throws Exception {
-        String url = "https://openapi.kwaixiaodian.com";
+    public void insertNowdayOrderList(Long tokenId) throws Exception {
         //2小时前 时间戳
         Long beginTime = DateUtils.getTimeStamp(DateUtils.getHourTime(-2));
         //当前时间
         Long endTime = DateUtils.getTimeStamp(DateUtils.getTime());
-        /* List<KuaishouAccessToken> tokens = accessTokenService.getTokenInfos();
-        tokens.forEach(token -> ruixuanService.submit(() -> {
-            insertRuixuanOrderList(queryType, token, beginTime, endTime, url, "", 1);
-        }));
-        //秒构思
-        Thread.sleep(3000);
-        List<KuaishouAccessToken> mgsTokens = accessTokenService.getMgsTokenInfos();
-        mgsTokens.forEach(token -> miaogousiService.submit(() -> {
-            insertRuixuanOrderList(queryType, token, beginTime, endTime, url, "", 1);
-        }));
-        */
-        //TODO 测完放开
-        //王炸
-        Thread.sleep(3000);
-        List<KuaishouAccessToken> rocketTokens = accessTokenService.getRocketTokenInfos();
-        rocketTokens.forEach(token -> rocketService.submit(() -> {
-            insertRuixuanOrderList(1, token, beginTime, endTime, url, "", 1);
-        }));
-        //TODO 测完放开
-       /*//预付
-        Thread.sleep(3000);
-        List<KuaishouAccessToken> yufuTokens = accessTokenService.getYufuTokenInfos();
-        yufuTokens.forEach(token -> yufuService.submit(() -> {
-            insertRuixuanOrderList(queryType, token, beginTime, endTime, url, "", 1);
-        }));
-
-        //毓秀
-        Thread.sleep(3000);
-        List<KuaishouAccessToken> yuxiuTokens = accessTokenService.getYuxiuTokenInfos();
-        yuxiuTokens.forEach(token -> yuxiuService.submit(() -> {
-            insertRuixuanOrderList(queryType, token, beginTime, endTime, url, "", 1);
-        }));
-
-        //止水
-        Thread.sleep(3000);
-        List<KuaishouAccessToken> zhishuiTokens = accessTokenService.getZhishuiTokenInfos();
-        zhishuiTokens.forEach(token -> zhishuiService.submit(() -> {
-            insertRuixuanOrderList(queryType, token, beginTime, endTime, url, "", 1);
-        }));*/
-
+        KuaishouAccessToken token = accessTokenService.getAccessToken(tokenId);
+        insertRuixuanOrderList(1, token, beginTime, endTime, KuaiShouConstants.KFX_URL, "", 1);
     }
 
     private void insertRuixuanOrderList(Integer queryType, KuaishouAccessToken accessToken, Long beginTime, Long endTime, String url, String pcursor, int counts) {
         try {
+            List<KuaishouSupplyChain> commonlist = new ArrayList<>();
             List<KuaishouSupplyChain> ruixuanList = new ArrayList<>();
             List<KuaishouSupplyChain> mgsList = new ArrayList<>();
             List<KuaishouSupplyChain> rocketList = new ArrayList<>();
@@ -1029,32 +943,31 @@ public class SupplyChainServiceImpl implements ISupplyChainService {
                     KuaishouSupplyChain supplyChain = new KuaishouSupplyChain(info, "1");
 
                     String ownership = null;
-                    Criteria criteria = new Criteria();
-                    criteria = Criteria.where("_id").is(supplyChain.getItemId());
-                    Query query = new Query(criteria);
-                    ItemCheck itemCheck = mongoTemplate.findOne(query, ItemCheck.class);
-                    if (!Check.isNull(itemCheck)) {
-                        ownership = itemCheck.getOwnership();
-                    }
-                    //TODO 放开下面代码
-                  /*  if (Check.isNull(ownership) || "ruixuan".equals(ownership)) {
-                        ruixuanList.add(supplyChain);
-                    }
-                    if ("miaogousi".equals(ownership)) {
-                        mgsList.add(supplyChain);
-                    }*/
-                    if ("rocket".equals(ownership)) {
-                        rocketList.add(supplyChain);
-                    }
-                    /*if ("yufu".equals(ownership)) {
-                        yufuList.add(supplyChain);
-                    }
-                    if ("yuxiu".equals(ownership)) {
-                        yuxiuList.add(supplyChain);
+//                    Criteria criteria = new Criteria();
+//                    criteria = Criteria.where("_id").is(supplyChain.getItemId());
+//                    Query query = new Query(criteria);
+//                    ItemCheck itemCheck = mongoTemplate.findOne(query, ItemCheck.class);
+//                    if (!Check.isNull(itemCheck)) {
+//                        ownership = itemCheck.getOwnership();
+//                    }
+
+                    if (Check.isNull(ownership)) {
+                        commonlist.add(supplyChain);
+                    } else {
+                        if ("ruixuan".equals(ownership)) {
+                            ruixuanList.add(supplyChain);
+                        } else if ("miaogousi".equals(ownership)) {
+                            mgsList.add(supplyChain);
+                        } else if ("rocket".equals(ownership)) {
+                            rocketList.add(supplyChain);
+                        } else if ("yufu".equals(ownership)) {
+                            yufuList.add(supplyChain);
+                        } else if ("yuxiu".equals(ownership)) {
+                            yuxiuList.add(supplyChain);
+                        } else if ("zhishui".equals(ownership)) {
+                            zhishuiList.add(supplyChain);
+                        }
                     }
-                    if ("zhishui".equals(ownership)) {
-                        zhishuiList.add(supplyChain);
-                    }*/
                 }
             } else {
                 log.error("===查询分销团长订单列表(open.distribution.cps.leader.order.cursor.list)失败,信息:{}", obj.getString("msg"));
@@ -1063,6 +976,10 @@ public class SupplyChainServiceImpl implements ISupplyChainService {
                     insertRuixuanOrderList(queryType, accessToken, beginTime, endTime, url, pcursor, counts + 1);
                 }
             }
+            //入库操作
+            if (!Check.isNull(commonlist)) {
+                supplyChainMapper.replaceBatchOrder(null, commonlist);
+            }
             if (!Check.isNull(ruixuanList)) {
                 supplyChainMapper.replaceBatchOrder("ruixuan", ruixuanList); //TODO 测试完 修改该方法数据表
             }
@@ -1081,6 +998,7 @@ public class SupplyChainServiceImpl implements ISupplyChainService {
             if (!Check.isNull(zhishuiList)) {
                 supplyChainMapper.replaceBatchOrder("zhishui", zhishuiList);
             }
+
             if (!"nomore".equals(pcursor)) {
                 insertRuixuanOrderList(queryType, accessToken, beginTime, endTime, url, pcursor, 1);
             }
@@ -1785,7 +1703,9 @@ public class SupplyChainServiceImpl implements ISupplyChainService {
         supplyChain.setOrderAmount(jsonObject.getLong("payAmount"));
         supplyChain.setPayAmount(jsonObject.getLong("payAmount"));
         supplyChain.setRegimentalPromotionRate(jsonObject.getLong("regimentalPromotionRate"));
-        supplyChain.setShareRate(jsonObject.getLong("shareRateStr"));
+        if (!jsonObject.getString("shareRateStr").contains("正在计算中")) {
+            supplyChain.setShareRate(jsonObject.getString("shareRateStr"));
+        }
         supplyChain.setBaseAmount(jsonObject.getLong("baseAmount"));
         supplyChain.setRegimentalPromotionAmount(jsonObject.getLong("regimentalPromotionAmount") / 1000);
         supplyChain.setTotalRegimentalSettleAmount(jsonObject.getLong("settlementAmount"));
@@ -1814,7 +1734,7 @@ public class SupplyChainServiceImpl implements ISupplyChainService {
 
     @Override
     public void addListKuaishouActivityInfo() throws InterruptedException {
-        String url = "https://openapi.kwaixiaodian.com";
+        String url = KuaiShouConstants.KFX_URL;
         List<KuaishouAccessToken> mgsTokens = accessTokenService.getMgsTokenInfos();
         for (KuaishouAccessToken mgsToken : mgsTokens) {
             getMgsInfoKuaishouActivityInfo(mgsToken, url);
@@ -1850,7 +1770,7 @@ public class SupplyChainServiceImpl implements ISupplyChainService {
 
     @Override
     public void addKuaishouActivityOpenItemList() throws InterruptedException {
-        String url = "https://openapi.kwaixiaodian.com";
+        String url = KuaiShouConstants.KFX_URL;
         List<Long> mgsActivityIds = supplyChainMapper.getMgsKuaishouActivityInfoList();
         List<KuaishouAccessToken> mgsTokens = accessTokenService.getMgsTokenInfos();
         for (KuaishouAccessToken mgsToken : mgsTokens) {

+ 2 - 2
ruixuan-live/src/main/java/com/ruixuan/open/service/impl/KuaishouOpenPhotoCountServiceImpl.java

@@ -6,6 +6,7 @@ import com.kuaishou.merchant.open.api.client.AccessTokenKsMerchantClient;
 import com.kuaishou.merchant.open.api.common.utils.GsonUtils;
 import com.kuaishou.merchant.open.api.request.video.OpenPhotoCountRequest;
 import com.kuaishou.merchant.open.api.response.video.OpenPhotoCountResponse;
+import com.ruixuan.isc.constants.KuaiShouConstants;
 import com.ruixuan.isc.entity.JYAccessToken;
 import com.ruixuan.isc.mapper.AccessTokenMapper;
 import com.ruixuan.open.entity.KuaishouOpenPhotoCount;
@@ -65,11 +66,10 @@ public class KuaishouOpenPhotoCountServiceImpl implements IKuaishouOpenPhotoCoun
 
     private void insertInfo(JYAccessToken token, String cursor) {
         try {
-            String url = "https://openapi.kwaixiaodian.com";
             String appKey = token.getAppKey();
             String signSecret = token.getSignSecret();
             String accessToken = token.getAccessToken();
-            AccessTokenKsMerchantClient client = new AccessTokenKsMerchantClient(url, appKey, signSecret);
+            AccessTokenKsMerchantClient client = new AccessTokenKsMerchantClient(KuaiShouConstants.KFX_URL, appKey, signSecret);
 
             OpenPhotoCountRequest request = new OpenPhotoCountRequest();
             request.setAccessToken(accessToken);

+ 2 - 3
ruixuan-live/src/main/java/com/ruixuan/open/service/impl/KuaishouOpenPhotoListServiceImpl.java

@@ -8,6 +8,7 @@ import com.kuaishou.merchant.open.api.request.video.OpenPhotoListRequest;
 import com.kuaishou.merchant.open.api.response.video.OpenPhotoListResponse;
 import com.ruixuan.common.utils.Check;
 import com.ruixuan.common.utils.DateUtils;
+import com.ruixuan.isc.constants.KuaiShouConstants;
 import com.ruixuan.isc.entity.JYAccessToken;
 import com.ruixuan.isc.mapper.AccessTokenMapper;
 import com.ruixuan.open.entity.KuaishouOpenPhotoList;
@@ -76,12 +77,10 @@ public class KuaishouOpenPhotoListServiceImpl implements IKuaishouOpenPhotoListS
 
     private void insertInfo(JYAccessToken token, String cursor) {
         try {
-            String url = "https://openapi.kwaixiaodian.com";
-
             String appKey = token.getAppKey();
             String signSecret = token.getSignSecret();
             String accessToken = token.getAccessToken();
-            AccessTokenKsMerchantClient client = new AccessTokenKsMerchantClient(url, appKey, signSecret);
+            AccessTokenKsMerchantClient client = new AccessTokenKsMerchantClient(KuaiShouConstants.KFX_URL, appKey, signSecret);
 
             OpenPhotoListRequest request = new OpenPhotoListRequest();
             request.setAccessToken(accessToken);

+ 2 - 2
ruixuan-live/src/main/java/com/ruixuan/open/service/impl/KuaishouOpenUserInfoServiceImpl.java

@@ -6,6 +6,7 @@ import com.kuaishou.merchant.open.api.client.AccessTokenKsMerchantClient;
 import com.kuaishou.merchant.open.api.common.utils.GsonUtils;
 import com.kuaishou.merchant.open.api.request.user.OpenUserInfoGetRequest;
 import com.kuaishou.merchant.open.api.response.user.OpenUserInfoGetResponse;
+import com.ruixuan.isc.constants.KuaiShouConstants;
 import com.ruixuan.isc.entity.JYAccessToken;
 import com.ruixuan.isc.mapper.AccessTokenMapper;
 import com.ruixuan.open.entity.KuaishouOpenUserInfo;
@@ -64,11 +65,10 @@ public class KuaishouOpenUserInfoServiceImpl implements IKuaishouOpenUserInfoSer
 
     private void insertInfo(JYAccessToken token, String cursor) {
         try {
-            String url = "https://openapi.kwaixiaodian.com";
             String appKey = token.getAppKey();
             String signSecret = token.getSignSecret();
             String accessToken = token.getAccessToken();
-            AccessTokenKsMerchantClient client = new AccessTokenKsMerchantClient(url, appKey, signSecret);
+            AccessTokenKsMerchantClient client = new AccessTokenKsMerchantClient(KuaiShouConstants.KFX_URL, appKey, signSecret);
 
             OpenUserInfoGetRequest request = new OpenUserInfoGetRequest();
             request.setAccessToken(accessToken);

+ 1 - 1
ruixuan-live/src/main/resources/mapper/isc/SupplyChainMapper.xml

@@ -4245,7 +4245,7 @@
         replace into
         <choose>
             <when test='ownership == null '>
-                ruixuan.kuaishou_supply_chain_ceshi
+                kuaishou_supply_chain_ceshi
             </when>
             <otherwise>
                 ${ownership}.kuaishou_supply_chain_ceshi