1.剔除转换器修改

2.groupBy直接调用MPJ自动解析
This commit is contained in:
Du YinHong 2026-08-24 14:56:56 +08:00
parent 768a0d9801
commit 9ed4cf1bfc
2 changed files with 8 additions and 11 deletions

View File

@ -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;
}

View File

@ -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())