|
|
@@ -220,7 +220,7 @@ public class SysCodeGenService : IDynamicApiController, ITransient
|
|
|
var propertyInfo = entityProperties.FirstOrDefault(p => (p.GetCustomAttribute<SugarColumn>()?.ColumnName ?? "").ToLower() == columnOutput.ColumnName.ToLower());
|
|
|
// 如果找不到就再找自动生成字段名的(并且过滤掉没有SugarColumn的属性)
|
|
|
if (propertyInfo == null)
|
|
|
- propertyInfo = entityProperties.FirstOrDefault(p => p.GetCustomAttribute<SugarColumn>() != null && p.Name.ToLower() == (config.DbSettings.EnableUnderLine ? CodeGenUtil.CamelColumnName(columnOutput.ColumnName, entityBasePropertyNames) : columnOutput.ColumnName.ToLower()));
|
|
|
+ propertyInfo = entityProperties.FirstOrDefault(p => p.GetCustomAttribute<SugarColumn>() != null && p.Name.ToLower() == (config.DbSettings.EnableUnderLine ? CodeGenUtil.CamelColumnName(columnOutput.ColumnName, entityBasePropertyNames).ToLower() : columnOutput.ColumnName.ToLower()));
|
|
|
if (propertyInfo != null)
|
|
|
{
|
|
|
columnOutput.PropertyName = propertyInfo.Name;
|