luoyisheng
2025-03-25 b03d89e792a34c486f0afeab69e837f85d8cbe16
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
36
37
38
39
40
41
42
43
44
45
46
import com.sinata.RuoYiApplication;
import com.sinata.system.mapper.SysDepartmentMapper;
import com.sinata.system.service.ISysDictTypeService;
import com.sinata.system.service.SysDepartmentService;
import com.sinata.system.service.biz.TaskService;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
 
import javax.annotation.Resource;
 
/**
 * @author mitao
 * @date 2024/12/3
 */
@SpringBootTest(classes = RuoYiApplication.class)
public class DepartmentTest {
    @Resource
    private SysDepartmentMapper departmentMapper;
    @Resource
    private ISysDictTypeService sysDictTypeService;
    @Resource
    private TaskService taskService;
 
    @Resource
    private SysDepartmentService sysDepartmentService;
 
    @Test
    public void test(){
        System.out.println(departmentMapper.getDepartmentByUserId(1L));
    }
    @Test
    public void test2(){
 
        System.out.println(sysDictTypeService.list());
    }
 
    @Test
    public void testTask() {
        taskService.checkoutOverTime();
    }
 
    @Test
    public void test3() {
        System.out.println(sysDepartmentService.getRegionName(sysDepartmentService.getById(21)));
    }
}