Commit f50f031d authored by hewei's avatar hewei

bugfix[issues#16]:修复选择返回插件对于自定义column异常问题,不能直接使用resultType而只能使用resultMap进行

parent 21743bf0
...@@ -82,6 +82,9 @@ public class SelectSelectivePluginTest { ...@@ -82,6 +82,9 @@ public class SelectSelectivePluginTest {
Assert.assertEquals(list.size(), 3); Assert.assertEquals(list.size(), 3);
int index = 0; int index = 0;
for (Object obj : list) { for (Object obj : list) {
if (index == 1) {
Assert.assertNull(obj);
} else {
ObjectUtil objectUtil = new ObjectUtil(obj); ObjectUtil objectUtil = new ObjectUtil(obj);
// 没有查询这两个字段 // 没有查询这两个字段
if (objectUtil.get("id") != null || objectUtil.get("field2") != null) { if (objectUtil.get("id") != null || objectUtil.get("field2") != null) {
...@@ -89,11 +92,10 @@ public class SelectSelectivePluginTest { ...@@ -89,11 +92,10 @@ public class SelectSelectivePluginTest {
} }
if (index == 0) { if (index == 0) {
Assert.assertEquals(objectUtil.get("field1"), "fd1"); Assert.assertEquals(objectUtil.get("field1"), "fd1");
} else if (index == 1) {
Assert.assertNull(objectUtil.get("field1"));
} else { } else {
Assert.assertEquals(objectUtil.get("field1"), "fd3"); Assert.assertEquals(objectUtil.get("field1"), "fd3");
} }
}
index++; index++;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment