|
@@ -0,0 +1,25 @@
|
|
|
|
|
+package cn.com.ctop.job.adq.handler;
|
|
|
|
|
+
|
|
|
|
|
+import cn.com.ctop.job.adq.data.utils.HttpUtils;
|
|
|
|
|
+import com.xxl.job.core.handler.annotation.XxlJob;
|
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * 定时更新产品库
|
|
|
|
|
+ * https://youhuo.tencent.com/yh/u/58117453/commodity/product_manage/feed_detail/catalog/1075547/feed/37390
|
|
|
|
|
+ */
|
|
|
|
|
+@Slf4j
|
|
|
|
|
+@Component
|
|
|
|
|
+public class ProductJob {
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 调取接口上传商品库文件到oss
|
|
|
|
|
+ */
|
|
|
|
|
+ @XxlJob("upProductFile")
|
|
|
|
|
+ public void flowDetailsDaily() throws Exception {
|
|
|
|
|
+ log.info("[upProductFile] 任务启动...");
|
|
|
|
|
+ String url = "https://api.deepthink.artlinkworld.cn/ossUp/upProductFile?id=hrsj2025";
|
|
|
|
|
+ String result = HttpUtils.httpGet(url, null, null);
|
|
|
|
|
+ log.info("[upProductFile] 任务完成! 结果:{}", result);
|
|
|
|
|
+ }
|
|
|
|
|
+}
|