Browse Source

spring-boot-demo-orm-mybatis-mapper-page 完成

pull/1/head
Yangkai.Shen 6 years ago
parent
commit
6b97e973a5
2 changed files with 22 additions and 2 deletions
  1. +11
    -1
      spring-boot-demo-orm-mybatis-mapper-page/README.md
  2. +11
    -1
      spring-boot-demo-orm-mybatis-mapper-page/src/test/java/com/xkcoding/orm/mybatis/MapperAndPage/mapper/UserMapperTest.java

+ 11
- 1
spring-boot-demo-orm-mybatis-mapper-page/README.md View File

@@ -271,7 +271,17 @@ public class UserMapperTest extends SpringBootDemoOrmMybatisMapperPageApplicatio
}

/**
* 测试通用Mapper - 查询
* 测试通用Mapper - 查询单个
*/
@Test
public void testQueryOne(){
User user = userMapper.selectByPrimaryKey(1L);
Assert.assertNotNull(user);
log.debug("【user】= {}", user);
}

/**
* 测试通用Mapper - 查询全部
*/
@Test
public void testQueryAll() {


+ 11
- 1
spring-boot-demo-orm-mybatis-mapper-page/src/test/java/com/xkcoding/orm/mybatis/MapperAndPage/mapper/UserMapperTest.java View File

@@ -95,7 +95,17 @@ public class UserMapperTest extends SpringBootDemoOrmMybatisMapperPageApplicatio
}

/**
* 测试通用Mapper - 查询
* 测试通用Mapper - 查询单个
*/
@Test
public void testQueryOne(){
User user = userMapper.selectByPrimaryKey(1L);
Assert.assertNotNull(user);
log.debug("【user】= {}", user);
}

/**
* 测试通用Mapper - 查询全部
*/
@Test
public void testQueryAll() {


Loading…
Cancel
Save