lyh
7 小时以前 7126eab629d31beb5164b576a44b865a6a00f07c
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
package com.lxzn.ucenter.dao;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lxzn.framework.domain.ucenter.User;
import com.lxzn.framework.domain.ucenter.ext.UserExt;
import com.lxzn.ucenter.dao.UserMapper;
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 UserMapperTest {
    @Autowired
    private UserMapper userMapper;
 
    @Test
    public void testFindUserExtByUsername() {
        QueryWrapper<User> ew = new QueryWrapper<>();
        ew.eq("u.username", "wangwagn");
        List<UserExt> list = userMapper.findUserExtByUsername(ew);
        list.forEach(System.out::println);
    }
 
}