提交 28c2fd61 authored 作者: 吴德鹏's avatar 吴德鹏

paypal token

上级 e00c1ddd
...@@ -85,10 +85,10 @@ public class QuartzMethod { ...@@ -85,10 +85,10 @@ public class QuartzMethod {
exchangeRepository.updateByType(type, rate); exchangeRepository.updateByType(type, rate);
} }
@Scheduled(cron = "0 0 0/3 * * ? ") @Scheduled(cron = "0 0 0/2 * * ?")
public void getToken() throws IOException { public void getToken() throws IOException {
Optional<Token> firstToken = tokenRepository.findFirstToken(); Optional<Token> firstToken = tokenRepository.findFirstToken();
String token = PayPalUtil.getToken(firstToken.get().getToken(),mode); String token = PayPalUtil.getToken(firstToken.get().getToken(), mode);
if (!tokenRepository.existsByToken(token)) { if (!tokenRepository.existsByToken(token)) {
Token t = new Token(); Token t = new Token();
t.setId(IdUtil.createIdbyUUID()); t.setId(IdUtil.createIdbyUUID());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论