feat(userscore): 新增用户评分功能
- 添加 UserScore20250801 相关实体、DTO 和 API 控制器 - 实现用户评分列表、专家列表和提交评分的功能- 添加前端页面以展示和提交评分数据 - 优化评分计算逻辑,处理最高分和最低分
This commit is contained in:
@@ -33,8 +33,7 @@ namespace Ewide.Core
|
||||
InitKeyType = InitKeyType.Attribute,
|
||||
MoreSettings = new ConnMoreSettings()
|
||||
{
|
||||
IsAutoRemoveDataCache = true//自动清理缓存
|
||||
|
||||
IsAutoRemoveDataCache = true //自动清理缓存
|
||||
},
|
||||
ConfigureExternalServices = new ConfigureExternalServices()
|
||||
{
|
||||
@@ -50,10 +49,11 @@ namespace Ewide.Core
|
||||
EntityService = (type, column) =>
|
||||
{
|
||||
var attributes = type.GetCustomAttributes(true);
|
||||
if (attributes.Any(it => it is KeyAttribute))// by attribute set primarykey
|
||||
if (attributes.Any(it => it is KeyAttribute)) // by attribute set primarykey
|
||||
{
|
||||
column.IsPrimarykey = true; //有哪些特性可以看 1.2 特性明细
|
||||
}
|
||||
|
||||
if (attributes.Any(it => it is ColumnAttribute))
|
||||
{
|
||||
column.DbColumnName = (attributes.First(it => it is ColumnAttribute) as ColumnAttribute).Name;
|
||||
@@ -97,19 +97,25 @@ namespace Ewide.Core
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Green;
|
||||
}
|
||||
|
||||
if (sql.StartsWith("UPDATE") || sql.StartsWith("INSERT"))
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.White;
|
||||
}
|
||||
|
||||
if (sql.StartsWith("DELETE"))
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Blue;
|
||||
}
|
||||
|
||||
//Console.WriteLine("Sql:" + "\r\n\r\n" + UtilMethods.GetSqlString(c.DbType, sql, pars));
|
||||
App.PrintToMiniProfiler("SqlSugar", "Info", UtilMethods.GetSqlString(c.DbType, sql, pars));
|
||||
$"DB:{c.ConfigId}, Sql:\r\n\r\n {UtilMethods.GetSqlString(c.DbType, sql, pars)}".LogInformation();
|
||||
|
||||
|
||||
Debugger.Log(1, "", $"===================CurrentConfigId:{db.CurrentConnectionConfig.ConfigId} SqlSugar log started ===================\r\n");
|
||||
Debugger.Log(2, "语句:", sql);
|
||||
Debugger.Log(3, "参数:", string.Join(",", pars?.Select(it => it.ParameterName + ":" + it.Value)));
|
||||
Debugger.Log(4, "", $"===================CurrentConfigId:{db.CurrentConnectionConfig.ConfigId} SqlSugar log end ===================\r\n");
|
||||
};
|
||||
|
||||
dbProvider.Aop.DataExecuting = (oldValue, entityInfo) =>
|
||||
@@ -160,7 +166,7 @@ namespace Ewide.Core
|
||||
//}
|
||||
};
|
||||
|
||||
/*
|
||||
/*
|
||||
* 使用 SqlSugarScope 循环配置此项的时候会覆盖整个 ConfigureExternalServices,
|
||||
* 移动到 New ConnectionConfig中配置
|
||||
*/
|
||||
@@ -197,7 +203,6 @@ namespace Ewide.Core
|
||||
// }); //将Lambda传入过滤器
|
||||
// }
|
||||
//}
|
||||
|
||||
}
|
||||
});
|
||||
services.AddSingleton<ISqlSugarClient>(sqlSugarScope);
|
||||
@@ -235,6 +240,7 @@ namespace Ewide.Core
|
||||
if (App.User == null) return false;
|
||||
return App.User.FindFirst(ClaimConst.CLAINM_SUPERADMIN)?.Value == AdminType.SuperAdmin.GetHashCode().ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加 SqlSugar 拓展
|
||||
/// </summary>
|
||||
@@ -280,4 +286,4 @@ namespace Ewide.Core
|
||||
public bool Enabled { get; set; }
|
||||
public string ProviderName { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user