mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-13 07:33:42 +08:00
1.剔除转换器修改
2.groupBy直接调用MPJ自动解析
This commit is contained in:
parent
768a0d9801
commit
9ed4cf1bfc
@ -75,16 +75,13 @@ public final class LambdaJoinQueryBuilder<T> {
|
||||
return this;
|
||||
}
|
||||
for (SFunction<E, ?> column : columns) {
|
||||
// 无别名时,解析字段所属实体表名作为默认前缀,避免同名列歧义
|
||||
String effectiveAlias = alias;
|
||||
if (StringUtils.isBlank(effectiveAlias)) {
|
||||
Class<?> entityClass = LambdaUtils.getEntityClass(column);
|
||||
TableInfo tableInfo = TableInfoHelper.getTableInfo(entityClass);
|
||||
if (tableInfo != null) {
|
||||
effectiveAlias = tableInfo.getTableName();
|
||||
}
|
||||
if (StringUtils.isNotBlank(alias)) {
|
||||
// 使用 MPJ 的别名重载
|
||||
wrapper.groupBy(alias, column);
|
||||
} else {
|
||||
// 无别名:交给 MPJ 自动解析
|
||||
wrapper.groupBy(column);
|
||||
}
|
||||
wrapper.groupBy(qualifiedColumn(effectiveAlias, column));
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ public class DictTypeTranslationImpl implements TranslationInterface<String> {
|
||||
*/
|
||||
@Override
|
||||
public String translation(Object key, String other) {
|
||||
if (Convert.toStr(key) instanceof String dictValue && StringUtils.isNotBlank(other)) {
|
||||
if (key instanceof String dictValue && StringUtils.isNotBlank(other)) {
|
||||
return dictService.getDictLabel(other, dictValue);
|
||||
}
|
||||
return null;
|
||||
@ -55,7 +55,7 @@ public class DictTypeTranslationImpl implements TranslationInterface<String> {
|
||||
Map<String, String> dictMap = dictService.getAllDictByDictType(other);
|
||||
Map<Object, String> result = new LinkedHashMap<>(keys.size());
|
||||
for (Object key : keys) {
|
||||
if (Convert.toStr(key) instanceof String dictValue) {
|
||||
if (key instanceof String dictValue) {
|
||||
result.put(key, StreamUtils.join(
|
||||
StreamUtils.filter(Arrays.asList(dictValue.split(",")), StringUtils::isNotBlank),
|
||||
value -> dictMap.get(value.trim())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user