完成基本京粉功能推送,订单统计,订单拉取的稳定版初版

This commit is contained in:
Leo
2024-11-11 00:02:27 +08:00
parent 19f1095a7c
commit 9c1c18b71d
38 changed files with 4628 additions and 185 deletions

View File

@@ -0,0 +1,39 @@
package cn.van.business.controller.jd;
import cn.van.business.util.JDUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* @author Leo
* @version 1.0
* @create 2024/11/7 13:39
* @description
*/
@RestController
@RequestMapping("order")
public class OrderController {
public static String TOKEN = "cc0313";
@Resource
private JDUtils jdUtils;
public boolean checkToken (String token){
return TOKEN.equals(token);
}
@RequestMapping("/refreshHistory")
@ResponseBody
public String refreshHistory(String token) throws Exception {
if (checkToken(token)) {
jdUtils.fetchHistoricalOrders();
}
return "OK";
}
}