😎清理代码
This commit is contained in:
parent
7e773f11f2
commit
667417d789
@ -33,7 +33,7 @@
|
||||
".img": "application/octet-stream"
|
||||
},
|
||||
"LocalizationSettings": {
|
||||
"SupportedCultures": [ "zh-CN", "zh-HK", "en", "de", "es", "fi", "fr", "it", "ja", "ko", "no", "pl", "pt", "ru", "zh-TW", "id", "ms", "th","vi"], // 语言列表
|
||||
"SupportedCultures": [ "zh-CN", "zh-HK", "en", "de", "es", "fi", "fr", "it", "ja", "ko", "no", "pl", "pt", "ru", "zh-TW", "id", "ms", "th", "vi" ], // 语言列表
|
||||
"DefaultCulture": "zh-CN", // 默认语言
|
||||
"DateTimeFormatCulture": "zh-CN" // 固定时间区域为特定时区(多语言)
|
||||
},
|
||||
|
||||
@ -4,8 +4,6 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
using Admin.NET.Core.Service;
|
||||
using Furion.EventBus;
|
||||
using Furion.JsonSerialization;
|
||||
|
||||
namespace Admin.NET.Application;
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
<PackageReference Include="Magicodes.IE.Pdf" Version="2.7.5.2" />
|
||||
<PackageReference Include="Magicodes.IE.Word" Version="2.7.5.2" />
|
||||
<PackageReference Include="MailKit" Version="4.11.0" />
|
||||
<PackageReference Include="MiniExcel" Version="1.40.0" />
|
||||
<PackageReference Include="MiniExcel" Version="1.40.1" />
|
||||
<PackageReference Include="MiniWord" Version="0.9.2" />
|
||||
<PackageReference Include="MQTTnet.Server" Version="5.0.1.1416" />
|
||||
<PackageReference Include="MySqlBackup.NET.MySqlConnector" Version="2.3.9" />
|
||||
|
||||
@ -47,7 +47,7 @@ public class OnlineUserHub : Hub<IOnlineUserHub>
|
||||
loginMode = loginMode == 0 ? LoginModeEnum.PC : loginMode; // 默认PC登录模式
|
||||
var device = httpContext.GetClientDeviceInfo().Trim();
|
||||
var ipAddress = httpContext.Request.Headers["X-Forwarded-For"].FirstOrDefault();
|
||||
|
||||
|
||||
var user = new SysOnlineUser
|
||||
{
|
||||
ConnectionId = Context.ConnectionId,
|
||||
|
||||
@ -29,6 +29,7 @@ public class SysCodeGenConfigService : IDynamicApiController, ITransient
|
||||
/// 获取数据表列(实体属性)集合
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取数据表列(实体属性)集合")]
|
||||
public List<ColumnOuput> GetColumnList([FromQuery] AddCodeGenInput input)
|
||||
{
|
||||
return GetColumnList(input.TableName, input.ConfigId);
|
||||
@ -40,6 +41,7 @@ public class SysCodeGenConfigService : IDynamicApiController, ITransient
|
||||
/// <param name="EntityName"></param>
|
||||
/// <param name="ConfigId"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取数据表列(实体属性)集合")]
|
||||
public List<ColumnOuput> GetColumnList(string EntityName, string ConfigId)
|
||||
{
|
||||
var entityType = GetEntityInfos().GetAwaiter().GetResult().FirstOrDefault(u => u.EntityName == EntityName);
|
||||
@ -105,6 +107,7 @@ public class SysCodeGenConfigService : IDynamicApiController, ITransient
|
||||
/// </summary>
|
||||
/// <param name="excludeSysTable">是否排除带SysTable属性的表</param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取库表信息")]
|
||||
public async Task<IEnumerable<EntityInfo>> GetEntityInfos(bool excludeSysTable = false)
|
||||
{
|
||||
var types = new List<Type>();
|
||||
|
||||
@ -291,6 +291,7 @@ public class SysCommonService : IDynamicApiController, ITransient
|
||||
/// <param name="code">区划编码</param>
|
||||
/// <param name="level">级数(从当前code所在级别往下级数)</param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("从 china.sqlite 中获取区划数据")]
|
||||
public async Task GetRegionTree(string code, int level)
|
||||
{
|
||||
level = level > 5 ? 5 : level;
|
||||
|
||||
@ -296,14 +296,17 @@ public class SysDatabaseService : IDynamicApiController, ITransient
|
||||
/// <param name="Position"></param>
|
||||
/// <param name="BaseClassName"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("创建实体文件内容")]
|
||||
public string GenerateEntity(string ConfigId, string TableName, string Position, string BaseClassName)
|
||||
{
|
||||
var input = new CreateEntityInput();
|
||||
input.TableName = TableName;
|
||||
input.EntityName = TableName.ToFirstLetterUpperCase();
|
||||
input.ConfigId = ConfigId;
|
||||
input.Position = string.IsNullOrWhiteSpace(Position) ? "Admin.NET.Application" : Position;
|
||||
input.BaseClassName = string.IsNullOrWhiteSpace(BaseClassName) ? "EntityBaseId" : BaseClassName;
|
||||
var input = new CreateEntityInput
|
||||
{
|
||||
TableName = TableName,
|
||||
EntityName = TableName.ToFirstLetterUpperCase(),
|
||||
ConfigId = ConfigId,
|
||||
Position = string.IsNullOrWhiteSpace(Position) ? "Admin.NET.Application" : Position,
|
||||
BaseClassName = string.IsNullOrWhiteSpace(BaseClassName) ? "EntityBaseId" : BaseClassName
|
||||
};
|
||||
return GenerateEntity(input);
|
||||
}
|
||||
|
||||
@ -312,6 +315,7 @@ public class SysDatabaseService : IDynamicApiController, ITransient
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("创建实体文件内容")]
|
||||
public string GenerateEntity(CreateEntityInput input)
|
||||
{
|
||||
var config = App.GetOptions<DbConnectionOptions>().ConnectionConfigs.FirstOrDefault(u => u.ConfigId.ToString() == input.ConfigId);
|
||||
|
||||
@ -37,10 +37,10 @@ public class SysOpenAccessService : IDynamicApiController, ITransient
|
||||
public GenerateSignatureOutput GenerateSignature(GenerateSignatureInput input)
|
||||
{
|
||||
// 时间戳
|
||||
if (input.Timestamp == 0)
|
||||
if (input.Timestamp == 0)
|
||||
input.Timestamp = DateTimeUtil.ToUnixTimestampByMilliseconds(DateTime.Now);
|
||||
|
||||
// 密钥
|
||||
|
||||
// 密钥
|
||||
var appSecretByte = Encoding.UTF8.GetBytes(input.AccessSecret);
|
||||
|
||||
// 拼接参数
|
||||
|
||||
@ -160,7 +160,7 @@ public class SysWxOpenService : IDynamicApiController, ITransient
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
[HttpPost]
|
||||
[DisplayName("设置小程序用户昵称"), HttpPost]
|
||||
public async Task SetNickName(SetNickNameInput input)
|
||||
{
|
||||
var wxUser = await _sysOAuthUserRep.GetFirstAsync(u => u.OpenId == input.OpenId);
|
||||
@ -178,6 +178,7 @@ public class SysWxOpenService : IDynamicApiController, ITransient
|
||||
/// <param name="openid"></param>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
[DisplayName("获取小程序用户信息")]
|
||||
public async Task<dynamic> GetUserInfo(string openid)
|
||||
{
|
||||
var wxUser = await _sysOAuthUserRep.GetFirstAsync(u => u.OpenId == openid);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "admin.net.pro",
|
||||
"type": "module",
|
||||
"version": "2.4.33",
|
||||
"lastBuildTime": "2025.04.17",
|
||||
"lastBuildTime": "2025.04.19",
|
||||
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
|
||||
"author": "zuohuaijun",
|
||||
"license": "MIT",
|
||||
@ -19,8 +19,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "^2.3.1",
|
||||
"@logicflow/core": "^2.0.12",
|
||||
"@logicflow/extension": "^2.0.16",
|
||||
"@logicflow/core": "^2.0.13",
|
||||
"@logicflow/extension": "^2.0.17",
|
||||
"@microsoft/signalr": "^8.0.7",
|
||||
"@vue-office/docx": "^1.6.2",
|
||||
"@vue-office/excel": "^1.7.14",
|
||||
@ -37,7 +37,7 @@
|
||||
"echarts": "^5.6.0",
|
||||
"echarts-gl": "^2.0.9",
|
||||
"echarts-wordcloud": "^2.1.0",
|
||||
"element-plus": "^2.9.7",
|
||||
"element-plus": "^2.9.8",
|
||||
"exceljs": "^4.4.0",
|
||||
"ezuikit-js": "^8.1.9-beta.3",
|
||||
"gcoord": "^1.0.7",
|
||||
@ -96,7 +96,7 @@
|
||||
"@vitejs/plugin-vue": "^5.2.3",
|
||||
"@vitejs/plugin-vue-jsx": "^4.1.2",
|
||||
"@vue/compiler-sfc": "^3.5.13",
|
||||
"code-inspector-plugin": "^0.20.9",
|
||||
"code-inspector-plugin": "^0.20.10",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-plugin-vue": "^10.0.0",
|
||||
"globals": "^16.0.0",
|
||||
@ -107,7 +107,7 @@
|
||||
"sass": "^1.86.3",
|
||||
"terser": "^5.39.0",
|
||||
"typescript": "^5.8.3",
|
||||
"vite": "^6.3.1",
|
||||
"vite": "^6.3.2",
|
||||
"vite-plugin-cdn-import": "^1.0.1",
|
||||
"vite-plugin-compression2": "^1.3.3",
|
||||
"vite-plugin-vue-setup-extend": "^0.4.0",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user