1
zj
5 hours ago b426757e13490d9d88a75faf7ba94455b890f582
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.yami.trading.api.controller.exchange.job;
 
import com.yami.trading.service.ExchangeLeverProfitService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
 
@Component
@Slf4j
public class ExchangeLeverProfitJob {
    @Autowired
    ExchangeLeverProfitService exchangeLeverProfitService;
 
    @Scheduled(cron ="*/5 * * * * ?" )
    public void taskJob() {
        try {
            exchangeLeverProfitService.handleOrders();
        } catch (Exception e) {
            log.error("ExchangeLeverProfitJob run fail", e);
        }
    }
}