Commit 0d926e17 by 程裕兵

feat:task paycenter

parent f05dc586
......@@ -47,6 +47,11 @@
<artifactId>cam-api</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.jiejing.paycenter</groupId>
<artifactId>api</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<!-- ======================= jiejing api end ======================= -->
......
......@@ -15,6 +15,10 @@
<artifactId>cam-api</artifactId>
</dependency>
<dependency>
<groupId>com.jiejing.paycenter</groupId>
<artifactId>api</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
</dependency>
......
......@@ -14,7 +14,10 @@ import org.springframework.scheduling.annotation.EnableScheduling;
@Slf4j
@EnableAsync
@EnableScheduling
@EnableFeignClients(basePackages = {"com.jiejing.cam.api"})
@EnableFeignClients(basePackages = {
"com.jiejing.cam.api",
"com.jiejing.paycenter.api"
})
@SpringBootApplication(scanBasePackages = "com.jiejing")
public class CrontabBffApplication {
......
package com.jiejing.bff.crontab.server.paycenter;
import com.jiejing.paycenter.api.task.PayCenterTaskApi;
import javax.annotation.Resource;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
/**
* @author chengyubing
* @since 2024/4/7 11:03
*/
@Component
public class PayCenterJob {
@Resource
private PayCenterTaskApi payCenterTaskApi;
@Scheduled(cron = "0 0/5 * * * ?")
public void autoApplyMerchant() {
payCenterTaskApi.autoApplyMerchant();
}
@Scheduled(cron = "0 0/1 * * * ?")
public void closePay() {
payCenterTaskApi.closePay();
}
@Scheduled(cron = "0 0/1 * * * ?")
public void syncPay() {
payCenterTaskApi.syncPay();
}
@Scheduled(cron = "0 0 3 * * ?")
public void syncSettle() {
payCenterTaskApi.syncSettle();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment