mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-08 09:38:26 +08:00
fixed value is QueryColumn or RawValue
This commit is contained in:
parent
045b5fe106
commit
9777c71da9
@ -49,8 +49,16 @@ class WrapperUtil {
|
|||||||
if (condition == null) {
|
if (condition == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Object value = condition.getValue();
|
Object value = condition.getValue();
|
||||||
if (value != null) {
|
if (value == null
|
||||||
|
|| value instanceof QueryColumn
|
||||||
|
|| value instanceof RawValue) {
|
||||||
|
getValues(condition.next, paras);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (value.getClass().isArray()) {
|
if (value.getClass().isArray()) {
|
||||||
Object[] values = (Object[]) value;
|
Object[] values = (Object[]) value;
|
||||||
for (Object object : values) {
|
for (Object object : values) {
|
||||||
@ -73,7 +81,6 @@ class WrapperUtil {
|
|||||||
} else {
|
} else {
|
||||||
paras.add(value);
|
paras.add(value);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
getValues(condition.next, paras);
|
getValues(condition.next, paras);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,6 +59,14 @@ public class TenantTester {
|
|||||||
|
|
||||||
TenantAccountMapper mapper = MybatisFlexBootstrap.getInstance().getMapper(TenantAccountMapper.class);
|
TenantAccountMapper mapper = MybatisFlexBootstrap.getInstance().getMapper(TenantAccountMapper.class);
|
||||||
|
|
||||||
|
// mapper.selectListByQuery(QueryWrapper.create()
|
||||||
|
// .select(TENANT_ACCOUNT.ALL_COLUMNS)
|
||||||
|
// .from(TENANT_ACCOUNT.as("a"), TENANT_ACCOUNT1.as("b"))
|
||||||
|
// .where(TENANT_ACCOUNT.ID.eq(TENANT_ACCOUNT1.ID))
|
||||||
|
// .and(TENANT_ACCOUNT.ID.eq(1))
|
||||||
|
// );
|
||||||
|
|
||||||
|
|
||||||
//SELECT * FROM `tb_account` WHERE `tenant_id` = 1
|
//SELECT * FROM `tb_account` WHERE `tenant_id` = 1
|
||||||
List<TenantAccount> tenantAccounts = mapper.selectAll();
|
List<TenantAccount> tenantAccounts = mapper.selectAll();
|
||||||
System.out.println(tenantAccounts);
|
System.out.println(tenantAccounts);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user