package com.lxzn.ucenter.dao; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.lxzn.framework.domain.ucenter.Menu; import com.lxzn.framework.domain.ucenter.ext.MenuExt; import com.lxzn.ucenter.dao.MenuMapper; 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 MenuMapperTest { @Autowired private MenuMapper menuMapper; @Test public void testFindByUserId() { QueryWrapper ew = new QueryWrapper<>(); ew.eq("u.user_id", "1250343734206377985l"); List list = menuMapper.findByUserId(ew); list.forEach(System.out::println); } @Test public void testFindByParentId() { List list = menuMapper.findByParentId("123l"); list.forEach(System.out::println); } @Test public void testFindExtAll() { List list = menuMapper.findExtAll(); list.forEach(System.out::println); } @Test public void testFindExtAllBySingleSelect() { List list = menuMapper.findExtAllBySingleSelect(); list.forEach(System.out::println); } }