Jay
8 天以前 eca625c35d5ed64c98277d2f83963e46438f50ce
提交 | 用户 | 时间
e7c126 1 package com.xxl.job.admin.dao;
H 2
3 import com.xxl.job.admin.core.model.XxlJobLog;
4 import org.apache.ibatis.annotations.Mapper;
5 import org.apache.ibatis.annotations.Param;
6
7 import java.util.Date;
8 import java.util.List;
9 import java.util.Map;
10
11 /**
12  * job log
13  * @author xuxueli 2016-1-12 18:03:06
14  */
15 @Mapper
16 public interface XxlJobLogDao {
17
18     // exist jobId not use jobGroup, not exist use jobGroup
19     public List<XxlJobLog> pageList(@Param("offset") int offset,
20                                     @Param("pagesize") int pagesize,
21                                     @Param("jobGroup") int jobGroup,
22                                     @Param("jobId") int jobId,
23                                     @Param("triggerTimeStart") Date triggerTimeStart,
24                                     @Param("triggerTimeEnd") Date triggerTimeEnd,
25                                     @Param("logStatus") int logStatus);
26     public int pageListCount(@Param("offset") int offset,
27                              @Param("pagesize") int pagesize,
28                              @Param("jobGroup") int jobGroup,
29                              @Param("jobId") int jobId,
30                              @Param("triggerTimeStart") Date triggerTimeStart,
31                              @Param("triggerTimeEnd") Date triggerTimeEnd,
32                              @Param("logStatus") int logStatus);
33     
34     public XxlJobLog load(@Param("id") long id);
35
36     public long save(XxlJobLog xxlJobLog);
37
38     public int updateTriggerInfo(XxlJobLog xxlJobLog);
39
40     public int updateHandleInfo(XxlJobLog xxlJobLog);
41     
42     public int delete(@Param("jobId") int jobId);
43
44     public Map<String, Object> findLogReport(@Param("from") Date from,
45                                              @Param("to") Date to);
46
47     public List<Long> findClearLogIds(@Param("jobGroup") int jobGroup,
48                                       @Param("jobId") int jobId,
49                                       @Param("clearBeforeTime") Date clearBeforeTime,
50                                       @Param("clearBeforeNum") int clearBeforeNum,
51                                       @Param("pagesize") int pagesize);
52     public int clearLog(@Param("logIds") List<Long> logIds);
53
54     public List<Long> findFailJobLogIds(@Param("pagesize") int pagesize);
55
56     public int updateAlarmStatus(@Param("logId") long logId,
57                                  @Param("oldAlarmStatus") int oldAlarmStatus,
58                                  @Param("newAlarmStatus") int newAlarmStatus);
59
60     public List<Long> findLostJobIds(@Param("losedTime") Date losedTime);
61
62 }