|
@@ -4,12 +4,14 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
-import com.baomidou.mybatisplus.test.base.entity.LogicTestData;
|
|
|
-import com.baomidou.mybatisplus.test.base.entity.TestData;
|
|
|
-import com.baomidou.mybatisplus.test.base.mapper.LogicTestDataMapper;
|
|
|
-import com.baomidou.mybatisplus.test.base.mapper.TestDataMapper;
|
|
|
-import com.baomidou.mybatisplus.test.base.service.ILogicTestDataService;
|
|
|
+import com.baomidou.mybatisplus.test.base.entity.CommonData;
|
|
|
+import com.baomidou.mybatisplus.test.base.entity.CommonLogicData;
|
|
|
+import com.baomidou.mybatisplus.test.base.entity.mysql.MysqlData;
|
|
|
+import com.baomidou.mybatisplus.test.base.mapper.commons.CommonDataMapper;
|
|
|
+import com.baomidou.mybatisplus.test.base.mapper.commons.CommonLogicDataMapper;
|
|
|
+import com.baomidou.mybatisplus.test.base.mapper.mysql.MysqlDataMapper;
|
|
|
import com.baomidou.mybatisplus.test.mysql.config.MysqlDb;
|
|
|
import org.junit.Assert;
|
|
|
import org.junit.BeforeClass;
|
|
@@ -19,10 +21,6 @@ import org.springframework.test.context.ContextConfiguration;
|
|
|
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
-import java.math.BigDecimal;
|
|
|
-import java.time.LocalDate;
|
|
|
-import java.time.LocalDateTime;
|
|
|
-import java.time.LocalTime;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
@@ -41,12 +39,11 @@ import java.util.Map;
|
|
|
public class MysqlTestDataMapperTest {
|
|
|
|
|
|
@Resource
|
|
|
- private TestDataMapper mapper;
|
|
|
+ private CommonDataMapper commonMapper;
|
|
|
@Resource
|
|
|
- private LogicTestDataMapper logicMapper;
|
|
|
-
|
|
|
+ private CommonLogicDataMapper commonLogicMapper;
|
|
|
@Resource
|
|
|
- private ILogicTestDataService logicTestDataService;
|
|
|
+ private MysqlDataMapper mysqlMapper;
|
|
|
|
|
|
@BeforeClass
|
|
|
public static void init() throws Exception {
|
|
@@ -55,249 +52,169 @@ public class MysqlTestDataMapperTest {
|
|
|
|
|
|
@Test
|
|
|
public void insertForeach() {
|
|
|
- LocalDateTime nowDateTime = LocalDateTime.now();
|
|
|
- LocalDate nowDate = nowDateTime.toLocalDate();
|
|
|
- LocalTime nowTime = nowDateTime.toLocalTime();
|
|
|
- for (int i = 0; i < 20; i++) {
|
|
|
- mapper.insert(new TestData().setTestInt(i).setTestStr(String.format("第%s条数据", i))
|
|
|
- .setTestDouble(BigDecimal.valueOf(3.3).multiply(BigDecimal.valueOf(i)).doubleValue())
|
|
|
- .setTestBoolean((i + 3) % 2 == 0).setTestDate(nowDate)
|
|
|
- .setTestTime(nowTime).setTestDateTime(nowDateTime));
|
|
|
- logicMapper.insert(new LogicTestData().setTestInt(i).setTestStr(String.format("第%s条数据", i))
|
|
|
- .setTestDouble(BigDecimal.valueOf(3.3).multiply(BigDecimal.valueOf(i)).doubleValue())
|
|
|
- .setTestBoolean((i + 3) % 2 == 0).setTestDate(nowDate)
|
|
|
- .setTestTime(nowTime).setTestDateTime(nowDateTime));
|
|
|
+ for (int i = 1; i < 30; i++) {
|
|
|
+ Long id = (long) i;
|
|
|
+ commonMapper.insert(new CommonData().setTestInt(i).setTestStr(String.format("第%s条数据", i)).setId(id));
|
|
|
+ commonLogicMapper.insert(new CommonLogicData().setTestInt(i).setTestStr(String.format("第%s条数据", i)).setId(id));
|
|
|
+ mysqlMapper.insert(new MysqlData().setOrder(1).setGroup(2).setId(id));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
public void deleteById() {
|
|
|
- mapper.deleteById(1014132604940615682L);
|
|
|
- logicMapper.deleteById(1014132604940615682L);
|
|
|
+ Assert.assertEquals(1, commonMapper.deleteById(1L));
|
|
|
+ Assert.assertEquals(1, commonLogicMapper.deleteById(1L));
|
|
|
+ Assert.assertEquals(1, mysqlMapper.deleteById(1L));
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
public void deleteByMap() {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
- map.put("id", 1014361515785568258L);
|
|
|
+ map.put("id", 2);
|
|
|
map.put("test_int", 5);
|
|
|
- mapper.deleteByMap(map);
|
|
|
- logicMapper.deleteByMap(map);
|
|
|
- }
|
|
|
-
|
|
|
- @Test
|
|
|
- public void other() {
|
|
|
- logicMapper.update(new LogicTestData().setDeleted(true), null);
|
|
|
+ Assert.assertEquals(0, commonMapper.deleteByMap(map));
|
|
|
+ Assert.assertEquals(0, commonLogicMapper.deleteByMap(map));
|
|
|
+ Assert.assertEquals(0, mysqlMapper.deleteByMap(map));
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
public void delete() {
|
|
|
- mapper.delete(new QueryWrapper<TestData>().lambda()
|
|
|
- .eq(TestData::getId, 1014132604940615682L)
|
|
|
- .eq(TestData::getTestInt, 1));
|
|
|
- logicMapper.delete(new QueryWrapper<LogicTestData>().lambda()
|
|
|
- .eq(LogicTestData::getId, 1014132604940615682L)
|
|
|
- .eq(LogicTestData::getTestInt, 1));
|
|
|
+ Assert.assertEquals(1, commonMapper.delete(new QueryWrapper<CommonData>().lambda()
|
|
|
+ .eq(CommonData::getId, 2L)
|
|
|
+ .eq(CommonData::getTestInt, 2)));
|
|
|
+ Assert.assertEquals(1, commonLogicMapper.delete(new QueryWrapper<CommonLogicData>().lambda()
|
|
|
+ .eq(CommonLogicData::getId, 2L)
|
|
|
+ .eq(CommonLogicData::getTestInt, 2)));
|
|
|
+ Assert.assertEquals(1, mysqlMapper.delete(new QueryWrapper<MysqlData>().lambda()
|
|
|
+ .eq(MysqlData::getId, 2L)
|
|
|
+ .eq(MysqlData::getOrder, 2)));
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
public void deleteBatchIds() {
|
|
|
- List<Long> ids = Arrays.asList(1014132604940615682L, 1014132604940615652L);
|
|
|
- mapper.deleteBatchIds(ids);
|
|
|
- logicMapper.deleteBatchIds(ids);
|
|
|
+ List<Long> ids = Arrays.asList(3L, 4L);
|
|
|
+ Assert.assertEquals(1, commonMapper.deleteBatchIds(ids));
|
|
|
+ Assert.assertEquals(1, commonLogicMapper.deleteBatchIds(ids));
|
|
|
+ Assert.assertEquals(1, mysqlMapper.deleteBatchIds(ids));
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
- public void updateTimeIssue() {
|
|
|
-// mapper.updateById(new TestData().setId(1014132604940615682L).setTestInt(1111111111));
|
|
|
- LogicTestData et = new LogicTestData()
|
|
|
- .setTestInt(9991122)
|
|
|
- .setVersion(19);
|
|
|
- System.out.println("====1=====>>>" + JSON.toJSONString(et, true));
|
|
|
- boolean r = logicTestDataService.saveOrUpdate(et);
|
|
|
- System.out.println("====2-1==r==>>>" + r);
|
|
|
- System.out.println("====2-2=====>>>" + JSON.toJSONString(et, true));
|
|
|
+ public void updateById() {
|
|
|
+ Assert.assertEquals(1, commonMapper.updateById(new CommonData().setId(5L).setTestInt(555)));
|
|
|
+ Assert.assertEquals(1, commonLogicMapper.updateById(new CommonLogicData().setId(5L).setTestInt(555)));
|
|
|
+ Assert.assertEquals(1, mysqlMapper.updateById(new MysqlData().setId(5L).setOrder(555)));
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
public void optimisticUpdateById() {
|
|
|
-// mapper.updateById(new TestData().setId(1014132604940615682L).setTestInt(1111111111));
|
|
|
- LogicTestData et = new LogicTestData()
|
|
|
- .setTestInt(999)
|
|
|
- .setVersion(17);
|
|
|
- System.out.println("====1=====>>>" + JSON.toJSONString(et, true));
|
|
|
- int r = logicMapper.updateById(et);
|
|
|
- System.out.println("====2-1==r==>>>" + r);
|
|
|
- System.out.println("====2-2=====>>>" + JSON.toJSONString(et, true));
|
|
|
- }
|
|
|
-
|
|
|
- @Test
|
|
|
- public void updateById() {
|
|
|
- mapper.updateById(new TestData().setTestInt(1111111111));
|
|
|
- logicMapper.updateById(new LogicTestData().setTestInt(1111111111));
|
|
|
+ Assert.assertEquals(1, commonMapper.updateById(new CommonData().setId(5L).setTestInt(556)
|
|
|
+ .setVersion(0)));
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
public void update() {
|
|
|
- // type 1
|
|
|
- mapper.update(new TestData(), null);
|
|
|
- logicMapper.update(new LogicTestData(), null);
|
|
|
- // type 2
|
|
|
- mapper.update(new TestData(), new UpdateWrapper<TestData>()
|
|
|
- .set("test_int", 5));
|
|
|
- logicMapper.update(new LogicTestData(), new UpdateWrapper<LogicTestData>()
|
|
|
- .set("test_int", 5));
|
|
|
-// // type 3
|
|
|
- mapper.update(new TestData(), new UpdateWrapper<TestData>()
|
|
|
- .set("test_int", 5).eq("id", 1014361515554881538L));
|
|
|
- logicMapper.update(new LogicTestData(), new UpdateWrapper<LogicTestData>()
|
|
|
- .set("test_int", 5).eq("id", 1014361515554881538L));
|
|
|
-// // type 4
|
|
|
- mapper.update(new TestData(), new UpdateWrapper<TestData>()
|
|
|
- .eq("id", 1014361515554881538L));
|
|
|
- logicMapper.update(new LogicTestData(), new UpdateWrapper<LogicTestData>()
|
|
|
- .eq("id", 1014361515554881538L));
|
|
|
-// // type 5
|
|
|
- mapper.update(new TestData(), new UpdateWrapper<TestData>()
|
|
|
- .setEntity(new TestData().setTestInt(1)));
|
|
|
- logicMapper.update(new LogicTestData(), new UpdateWrapper<LogicTestData>()
|
|
|
- .setEntity(new LogicTestData().setTestInt(1)));
|
|
|
-// // type 6
|
|
|
- mapper.update(new TestData(), new UpdateWrapper<TestData>()
|
|
|
- .setEntity(new TestData().setTestInt(1))
|
|
|
- .eq("id", 1014361515554881538L));
|
|
|
- logicMapper.update(new LogicTestData(), new UpdateWrapper<LogicTestData>()
|
|
|
- .setEntity(new LogicTestData().setTestInt(1))
|
|
|
- .eq("id", 1014361515554881538L));
|
|
|
-// // type 7
|
|
|
- mapper.update(new TestData(), new UpdateWrapper<TestData>()
|
|
|
- .setEntity(new TestData().setTestInt(1))
|
|
|
- .set("test_int", 55555)
|
|
|
- .eq("id", 1014361515554881538L));
|
|
|
- logicMapper.update(new LogicTestData(), new UpdateWrapper<LogicTestData>()
|
|
|
- .setEntity(new LogicTestData().setTestInt(1))
|
|
|
- .set("test_int", 55555)
|
|
|
- .eq("id", 1014361515554881538L));
|
|
|
+ Assert.assertEquals(1, commonMapper.update(
|
|
|
+ new CommonData().setTestInt(666),
|
|
|
+ new UpdateWrapper<CommonData>().lambda().eq(CommonData::getId, 6L)
|
|
|
+ .eq(CommonData::getTestInt, 6)));
|
|
|
+ Assert.assertEquals(1, commonLogicMapper.update(
|
|
|
+ new CommonLogicData().setTestInt(666),
|
|
|
+ new UpdateWrapper<CommonLogicData>().lambda().eq(CommonLogicData::getId, 6L)
|
|
|
+ .eq(CommonLogicData::getTestInt, 6)));
|
|
|
+ Assert.assertEquals(1, mysqlMapper.update(
|
|
|
+ new MysqlData().setOrder(666),
|
|
|
+ new UpdateWrapper<MysqlData>().lambda().eq(MysqlData::getId, 6L)
|
|
|
+ .eq(MysqlData::getOrder, 6)));
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
public void getAllNoTenant() {
|
|
|
- mapper.getAllNoTenant();
|
|
|
+ commonMapper.getAllNoTenant();
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
public void selectById() {
|
|
|
- mapper.selectById(1L);
|
|
|
- logicMapper.selectById(1L);
|
|
|
+ long id = 6L;
|
|
|
+ Assert.assertNotNull(commonMapper.selectById(id));
|
|
|
+ Assert.assertNotNull(commonLogicMapper.selectById(id));
|
|
|
+ Assert.assertNotNull(mysqlMapper.selectById(id));
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
public void selectBatchIds() {
|
|
|
- List<Long> ids = Arrays.asList(1014132604940615682L, 1014132604940615652L);
|
|
|
- mapper.selectBatchIds(ids);
|
|
|
- logicMapper.selectBatchIds(ids);
|
|
|
+ List<Long> ids = Arrays.asList(7L, 8L);
|
|
|
+ Assert.assertTrue(CollectionUtils.isNotEmpty(commonMapper.selectBatchIds(ids)));
|
|
|
+ Assert.assertTrue(CollectionUtils.isNotEmpty(commonLogicMapper.selectBatchIds(ids)));
|
|
|
+ Assert.assertTrue(CollectionUtils.isNotEmpty(mysqlMapper.selectBatchIds(ids)));
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
public void selectByMap() {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
- map.put("id", 1L);
|
|
|
- map.put("test_int", 1);
|
|
|
- mapper.selectByMap(map);
|
|
|
- logicMapper.selectByMap(map);
|
|
|
+ map.put("id", 9L);
|
|
|
+ map.put("test_int", 9);
|
|
|
+ Assert.assertTrue(CollectionUtils.isNotEmpty(commonMapper.selectByMap(map)));
|
|
|
+ Assert.assertTrue(CollectionUtils.isNotEmpty(commonLogicMapper.selectByMap(map)));
|
|
|
+ Assert.assertTrue(CollectionUtils.isNotEmpty(mysqlMapper.selectByMap(map)));
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
public void selectOne() {
|
|
|
- mapper.selectOne(new QueryWrapper<TestData>().lambda()
|
|
|
- .eq(TestData::getId, 1L).eq(TestData::getTestInt, 1));
|
|
|
- logicMapper.selectOne(new QueryWrapper<LogicTestData>().lambda()
|
|
|
- .eq(LogicTestData::getId, 1L).eq(LogicTestData::getTestInt, 1));
|
|
|
+ Assert.assertNotNull(commonMapper.selectOne(new QueryWrapper<CommonData>().lambda()
|
|
|
+ .eq(CommonData::getId, 10L).eq(CommonData::getTestInt, 10)));
|
|
|
+ Assert.assertNotNull(commonLogicMapper.selectOne(new QueryWrapper<CommonLogicData>().lambda()
|
|
|
+ .eq(CommonLogicData::getId, 10L).eq(CommonLogicData::getTestInt, 10)));
|
|
|
+ Assert.assertNotNull(mysqlMapper.selectOne(new QueryWrapper<MysqlData>().lambda()
|
|
|
+ .eq(MysqlData::getId, 10L).eq(MysqlData::getOrder, 10)));
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
public void selectList() {
|
|
|
- mapper.selectList(new QueryWrapper<TestData>().lambda()
|
|
|
- .eq(TestData::getId, 1L).eq(TestData::getTestInt, 1));
|
|
|
- logicMapper.selectList(new QueryWrapper<LogicTestData>().lambda()
|
|
|
- .eq(LogicTestData::getId, 1L).eq(LogicTestData::getTestInt, 1));
|
|
|
- logicMapper.selectList(null);
|
|
|
- }
|
|
|
-
|
|
|
- @Test
|
|
|
- public void commonSelectList() {
|
|
|
- println(mapper.selectList(new QueryWrapper<TestData>()
|
|
|
- .eq("id", 1L)
|
|
|
- .like("test_str", 1)
|
|
|
- .between("test_double", 1L, 2L)));
|
|
|
- }
|
|
|
-
|
|
|
- @Test
|
|
|
- public void specialSelectList() {
|
|
|
- println(mapper.selectList(new QueryWrapper<TestData>().lambda()
|
|
|
- .nested(i -> i.eq(TestData::getId, 1L))
|
|
|
- .or(i -> i.between(TestData::getTestDouble, 1L, 2L))
|
|
|
- .or(i -> i.eq(TestData::getTestInt, 1)
|
|
|
- .or().eq(TestData::getTestDate, 1)
|
|
|
- )
|
|
|
- .eq(TestData::getTestBoolean, true)
|
|
|
- .eq(TestData::getTestDate, LocalDate.of(2008, 8, 8))
|
|
|
- .between(TestData::getTestDate, LocalDate.of(2008, 1, 1),
|
|
|
- LocalDate.of(2008, 12, 12))));
|
|
|
+ Assert.assertTrue(CollectionUtils.isNotEmpty(commonMapper.selectList(new QueryWrapper<CommonData>()
|
|
|
+ .lambda().eq(CommonData::getId, 10L).eq(CommonData::getTestInt, 10))));
|
|
|
+ Assert.assertTrue(CollectionUtils.isNotEmpty(commonLogicMapper.selectList(new QueryWrapper<CommonLogicData>()
|
|
|
+ .lambda().eq(CommonLogicData::getId, 10L).eq(CommonLogicData::getTestInt, 10))));
|
|
|
+ Assert.assertTrue(CollectionUtils.isNotEmpty(mysqlMapper.selectList(new QueryWrapper<MysqlData>()
|
|
|
+ .lambda().eq(MysqlData::getId, 10L).eq(MysqlData::getOrder, 10))));
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
public void selectPage() {
|
|
|
- IPage<TestData> page = new Page<>();
|
|
|
+ IPage<CommonData> page = new Page<>();
|
|
|
page.setSize(5).setCurrent(1);
|
|
|
- IPage<TestData> dataPage = mapper.selectPage(page, null);
|
|
|
+ IPage<CommonData> dataPage = commonMapper.selectPage(page, null);
|
|
|
Assert.assertSame(dataPage, page);
|
|
|
- System.out.println(String.format("total = {%s}", dataPage.getTotal()));
|
|
|
- System.out.println(String.format("data.size = {%s}", dataPage.getRecords().size()));
|
|
|
- println(page.getRecords());
|
|
|
- System.out.println(JSON.toJSONString(page));
|
|
|
+ Assert.assertNotEquals(0L, dataPage.getTotal());
|
|
|
+ Assert.assertNotEquals(0, dataPage.getRecords().size());
|
|
|
+ Assert.assertTrue(CollectionUtils.isNotEmpty(dataPage.getRecords()));
|
|
|
+ System.out.println(JSON.toJSONString(dataPage));
|
|
|
|
|
|
- IPage<LogicTestData> logicPage = new Page<>();
|
|
|
- logicPage.setSize(5).setCurrent(1);
|
|
|
- IPage<LogicTestData> logicDataPage = logicMapper.selectPage(logicPage, null);
|
|
|
+ IPage<CommonData> logicPage = new Page<>();
|
|
|
+ page.setSize(5).setCurrent(1);
|
|
|
+ IPage<CommonData> logicDataPage = commonMapper.selectPage(page, null);
|
|
|
Assert.assertSame(logicDataPage, logicPage);
|
|
|
- System.out.println(String.format("total = {%s}", logicDataPage.getTotal()));
|
|
|
- System.out.println(String.format("data.size = {%s}", logicDataPage.getRecords().size()));
|
|
|
- println(logicDataPage.getRecords());
|
|
|
+ Assert.assertNotEquals(0L, logicDataPage.getTotal());
|
|
|
+ Assert.assertNotEquals(0, logicDataPage.getRecords().size());
|
|
|
+ Assert.assertTrue(CollectionUtils.isNotEmpty(logicDataPage.getRecords()));
|
|
|
System.out.println(JSON.toJSONString(logicDataPage));
|
|
|
|
|
|
- }
|
|
|
-
|
|
|
- @Test
|
|
|
- public void testIn() {
|
|
|
- println(mapper.selectList(new QueryWrapper<TestData>()
|
|
|
-// .in("test_int", Arrays.asList(1, 2, 3))//ok
|
|
|
-// .notIn("test_int", Arrays.asList(1, 2, 3)//ok
|
|
|
-// .in("test_int", 1, 2, 3)//ok
|
|
|
-// .notIn("test_int", 1, 2, 3)//ok
|
|
|
- .inSql("test_int", "1,2,3")//ok
|
|
|
- .notInSql("test_int", "2,3")//ok
|
|
|
- ));
|
|
|
- }
|
|
|
-
|
|
|
- @Test
|
|
|
- public void testExists() {
|
|
|
- println(mapper.selectList(new QueryWrapper<TestData>()
|
|
|
- .exists("select * from tb_test_data")//ok
|
|
|
- .or()
|
|
|
- .notExists("select * from tb_test_data")//ok
|
|
|
- ));
|
|
|
- /* exists 连着用是可行的 */
|
|
|
+ IPage<CommonData> mysqlPage = new Page<>();
|
|
|
+ page.setSize(5).setCurrent(1);
|
|
|
+ IPage<CommonData> mysqlDataPage = commonMapper.selectPage(page, null);
|
|
|
+ Assert.assertSame(mysqlDataPage, mysqlPage);
|
|
|
+ Assert.assertNotEquals(0L, mysqlDataPage.getTotal());
|
|
|
+ Assert.assertNotEquals(0, mysqlDataPage.getRecords().size());
|
|
|
+ Assert.assertTrue(CollectionUtils.isNotEmpty(mysqlDataPage.getRecords()));
|
|
|
+ System.out.println(JSON.toJSONString(mysqlDataPage));
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
public void testApply() {
|
|
|
- println(mapper.selectList(new QueryWrapper<TestData>()
|
|
|
- .apply("test_int = 1")
|
|
|
- ));
|
|
|
- }
|
|
|
-
|
|
|
- private <T> void println(List<T> list) {
|
|
|
- list.forEach(System.out::println);
|
|
|
+ Assert.assertTrue(CollectionUtils.isNotEmpty(commonMapper.selectList(new QueryWrapper<CommonData>()
|
|
|
+ .apply("test_int = 12"))));
|
|
|
+ Assert.assertTrue(CollectionUtils.isNotEmpty(commonLogicMapper.selectList(new QueryWrapper<CommonLogicData>()
|
|
|
+ .apply("test_int = 12"))));
|
|
|
+ Assert.assertTrue(CollectionUtils.isNotEmpty(mysqlMapper.selectList(new QueryWrapper<MysqlData>()
|
|
|
+ .apply("order = 12"))));
|
|
|
}
|
|
|
}
|