赵士淞
2023-01-19 a7d2699e22b685ffb8a8f521dd725a6fdfbdf3de
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package me.zhengjie.modules.quartz.task;
 
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.modules.quartz.service.impl.DingTalkServiceImpl;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
/**
 * 钉钉定时任务(取考勤记录)
 */
@Slf4j
@Service
@RequiredArgsConstructor
@Async
public class OapiDingTalkMethod {
 
    private final DingTalkServiceImpl dingTalkService;
 
    /**
     * 每天0点执行,新增用户考勤信息
     *
     * @throws Exception
     */
    public void getDingTalkAttendanceList() throws Exception {
        dingTalkService.getDingTalkAttendanceList(null);
    }
 
    /**
     *中午晚上定时任务调用
     */
    public void getDingTalkAttendance() throws Exception {
        dingTalkService.getDingTalkAttendanceListOfNoonOrNight(null,null);
    }
 
}