完成基本京粉功能推送,订单统计,订单拉取的稳定版初版
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user