- 添加微信登录功能,支持通过微信小程序登录 - 实现用户信息管理接口,包括获取用户信息和统计数据 - 新增投资组合列表和总资产统计接口 - 完善JWT令牌生成逻辑,支持可选用户名 - 添加数据库初始化配置和连接字符串 - 移除传统登录和注册功能,专注微信登录方案
28 lines
838 B
C#
28 lines
838 B
C#
using SqlSugar;
|
|
|
|
namespace AssetManager.Data;
|
|
|
|
public class SqlSugarConfig
|
|
{
|
|
public static ISqlSugarClient GetSqlSugarClient()
|
|
{
|
|
return new SqlSugarScope(new ConnectionConfig()
|
|
{
|
|
ConnectionString = "server=43.167.226.216;Database=assetmanager;Uid=AssetManager;Pwd=2XpcnYGTpB5BhJyG;CharSet=utf8mb4;",
|
|
DbType = DbType.MySql,
|
|
IsAutoCloseConnection = true,
|
|
InitKeyType = InitKeyType.Attribute,
|
|
ConfigureExternalServices = new ConfigureExternalServices
|
|
{
|
|
EntityService = (property, column) =>
|
|
{
|
|
if (property.PropertyType == typeof(DateTime))
|
|
{
|
|
column.DataType = "datetime(3)";
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|