lyh
3 天以前 3ce27b7faf8850d101a1511a685250fe562dca18
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
package com.lxzn.nc.dao;
 
import com.lxzn.framework.domain.nc.ComponentInfo;
import com.lxzn.framework.domain.nc.ext.ComponentExt;
import com.lxzn.framework.model.response.CommonJsonTree;
import com.lxzn.nc.service.IComponentInfoService;
import com.lxzn.nc.service.support.ComponentTreeWrapper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
 
import java.util.List;
 
@RunWith(SpringRunner.class)
@SpringBootTest
public class ComponentInfoMapperTest {
    @Autowired
    private ComponentInfoMapper componentInfoMapper;
    @Autowired
    private IComponentInfoService componentInfoService;
 
    @Test
    public void testFindExtAll() {
        List<ComponentExt> list = componentInfoMapper.getByUserPerms("1254773336467689474");
        System.out.println(list);
    }
 
    @Test
    public void testGetPermsByParentId() {
        List<ComponentExt> list = componentInfoMapper.getByParentIdAndUserPerms("1257611309634617345", "1254773336467689474");
        System.out.println(list);
    }
 
    @Test
    public void testGetByParentId() {
        List<ComponentInfo> list = componentInfoService.getByParentId("1257512491769503745");
        list.forEach(System.out::println);
    }
}