Explorar o código

录入店铺名称

zhaoxian hai 6 meses
pai
achega
537b363756

+ 31 - 0
job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/RuixuanJob.java

@@ -17,6 +17,7 @@ public class RuixuanJob {
 
     private static final String RX_IP = "http://ruixuan.api.tjyourong.com.cn/";
     private static final String COMMON_IP = ".api.tjyourong.com.cn/isv/supply_chain/insertNowdayOrderList";
+    private static final String SHOP_IP = ".api.tjyourong.com.cn/isv/supply_chain/insertShopInfo";
 
     /**
      * 昨天的数据 kwaixiaodian_order_cursor_list
@@ -217,4 +218,34 @@ public class RuixuanJob {
         }
     }
 
+    /**
+     * 插入店铺名称
+     * 昨天+今天 kuaishou_activity_shop_info
+     */
+    @XxlJob("insertShopInfo")
+    public void insertShopInfo() {
+        String param = XxlJobHelper.getJobParam(); // 执行参数
+        if (Check.isNull(param)) {
+            log.error("入参为空");
+            return;
+        }
+        String[] arr = param.split("_");
+        if (arr.length > 1) {
+            String dbType = arr[0];
+            String tokenId = arr[1];
+            String url = null;
+            if ("miaogousi".equals(dbType)) {
+                url = "http://mgs" + SHOP_IP;
+            } else {
+                url = "http://" + dbType + SHOP_IP;
+            }
+            log.info("---tokenId:{},订单URL:{}", tokenId, url);
+            Map<String, Object> createMap = new HashMap<>();
+            createMap.put("tokenId", tokenId);
+            createMap.put("bdtype", dbType);
+            //录入店铺名称
+            HttpUtils.httpGet(url, createMap, null);
+        }
+    }
+
 }