提交 | 用户 | 时间
|
e7c126
|
1 |
package com.xxl.job.admin.dao; |
H |
2 |
|
|
3 |
import com.xxl.job.admin.core.model.XxlJobLogGlue; |
|
4 |
import org.junit.jupiter.api.Test; |
|
5 |
import org.springframework.boot.test.context.SpringBootTest; |
|
6 |
|
|
7 |
import javax.annotation.Resource; |
|
8 |
import java.util.Date; |
|
9 |
import java.util.List; |
|
10 |
|
|
11 |
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) |
|
12 |
public class XxlJobLogGlueDaoTest { |
|
13 |
|
|
14 |
@Resource |
|
15 |
private XxlJobLogGlueDao xxlJobLogGlueDao; |
|
16 |
|
|
17 |
@Test |
|
18 |
public void test(){ |
|
19 |
XxlJobLogGlue logGlue = new XxlJobLogGlue(); |
|
20 |
logGlue.setJobId(1); |
|
21 |
logGlue.setGlueType("1"); |
|
22 |
logGlue.setGlueSource("1"); |
|
23 |
logGlue.setGlueRemark("1"); |
|
24 |
|
|
25 |
logGlue.setAddTime(new Date()); |
|
26 |
logGlue.setUpdateTime(new Date()); |
|
27 |
int ret = xxlJobLogGlueDao.save(logGlue); |
|
28 |
|
|
29 |
List<XxlJobLogGlue> list = xxlJobLogGlueDao.findByJobId(1); |
|
30 |
|
|
31 |
int ret2 = xxlJobLogGlueDao.removeOld(1, 1); |
|
32 |
|
|
33 |
int ret3 =xxlJobLogGlueDao.deleteByJobId(1); |
|
34 |
} |
|
35 |
|
|
36 |
} |