Update json 2 sql

This commit is contained in:
sunkaixuan
2023-11-03 17:40:04 +08:00
parent cef8cd4c8b
commit 5e667d9f43

View File

@@ -43,7 +43,11 @@ namespace SqlSugar
orderByModel.AsName = orderByModel.AsName.Trim('[').Trim(']'); orderByModel.AsName = orderByModel.AsName.Trim('[').Trim(']');
return this.SqlTranslationLeft + orderByModel.AsName + this.SqlTranslationRight; return this.SqlTranslationLeft + orderByModel.AsName + this.SqlTranslationRight;
} }
return this.GetTranslationColumnName(orderByModel.AsName); if (this.SqlTranslationLeft != null && orderByModel.AsName?.Contains(this.SqlTranslationLeft) == true)
{
return orderByModel.AsName;
}
return this.SqlTranslationLeft + orderByModel.AsName + this.SqlTranslationRight;
} }
private void AppendFiledName(StringBuilder sql, SelectModel orderByModel) private void AppendFiledName(StringBuilder sql, SelectModel orderByModel)