|
|
@ -32,7 +32,8 @@ public class Condition extends org.springblade.core.mp.support.Condition { |
|
|
|
QueryWrapper<T> queryWrapper = getQueryWrapper(query,clazz); |
|
|
|
QueryWrapper<T> queryWrapper = getQueryWrapper(query,clazz); |
|
|
|
List<Field> fields = getFieldList(query); |
|
|
|
List<Field> fields = getFieldList(query); |
|
|
|
// 填充排序字段
|
|
|
|
// 填充排序字段
|
|
|
|
orderFields.forEach((fieldName,order) -> { |
|
|
|
orderFields.forEach((fieldNames,order) -> { |
|
|
|
|
|
|
|
Func.toStrList(",",fieldNames).stream().forEach(fieldName -> { |
|
|
|
Optional<Field> existField = fields.stream().filter(field -> camel2under(fieldName).equals(camel2under(field.getName()))).findAny(); |
|
|
|
Optional<Field> existField = fields.stream().filter(field -> camel2under(fieldName).equals(camel2under(field.getName()))).findAny(); |
|
|
|
if(existField.isPresent()) { |
|
|
|
if(existField.isPresent()) { |
|
|
|
if(Order.ASC.equals(order)) { |
|
|
|
if(Order.ASC.equals(order)) { |
|
|
@ -43,6 +44,7 @@ public class Condition extends org.springblade.core.mp.support.Condition { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
return queryWrapper.lambda(); |
|
|
|
return queryWrapper.lambda(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|