This commit is contained in:
雷欧(林平凡)
2024-11-08 09:18:27 +08:00
parent 87e0e7693f
commit 19f1095a7c
9 changed files with 414 additions and 51 deletions

View File

@@ -0,0 +1,39 @@
package cn.van.business.controller;
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";
}
}