Merge pull request 'v2' (#4) from Admin.NET/Admin.NET.Pro:v2 into v2

Reviewed-on: http://101.43.53.74:3000/ir0nmax/Admin.NET.Pro/pulls/4
This commit is contained in:
薛原 2025-01-24 21:37:07 +08:00
commit a941346531
62 changed files with 3175 additions and 753 deletions

View File

@ -3,16 +3,32 @@
// https://openhome.alipay.com/develop/sandbox/app
"Alipay": {
"AppId": "9000000000000000", // APPID
"AlipayWebsocketUrl": "openchannel-sandbox.dl.alipaydev.com", // websocket
"ServerUrl": "https://openapi-sandbox.dl.alipaydev.com/gateway.do", //
"AuthUrl": "https://openauth.alipay.com/oauth2/publicAppAuthorize.htm", //
"NotifyUrl": "http://xxxx.xxx/api/Alipay/Notify", //
"PrivateKey": "xxxxxxxxx", //
"SignType": "RSA2", //
"EncryptKey": "xxxxxxxx", //
"AlipayPublicCertPath": "/AlipayCrt/alipayPublicCert.crt", //
"RootCertPath": "/AlipayCrt/alipayRootCert.crt", //
"AppCertPath": "/AlipayCrt/appPublicCert.crt" //
"WebsocketUrl": "openchannel-sandbox.dl.alipaydev.com", // websocket
//"AuthUrl": "https://openauth.alipay.com/oauth2/publicAppAuthorize.htm", //
"AuthUrl": "https://openauth-sandbox.dl.alipaydev.com/oauth2/publicAppAuthorize.htm", //
"AppAuthUrl": "http://xxxxxxxxxx", //
"NotifyUrl": "http://xxxxxxxxx/api/sysAlipay/Notify", //
"RootCertPath": "Alipaycrt/alipayRootCert.crt", //
"AccountList": [
{
"Name": "sandbox 默认应用",
"AppId": "xxxxxxxxxxxxxx",
"SignType": "RSA2",
"PrivateKey": "xxxxxxxxxxxxxxxxx",
"EncryptKey": "xxxxxxxxxxxxxxxxxxxx",
"AppCertPath": "Alipaycrt/appPublicCert.crt", //
"AlipayPublicCertPath": "Alipaycrt/alipayPublicCert.crt" //
},
{
"Name": "sandbox 默认应用2",
"AppId": "xxxxxxxxxxxxxx",
"SignType": "RSA2",
"PrivateKey": "xxxxxxxxxxxxxxxxx",
"EncryptKey": "xxxxxxxxxxxxxxxxxxxx",
"AppCertPath": "Alipaycrt/appPublicCert.crt", //
"AlipayPublicCertPath": "Alipaycrt/alipayPublicCert.crt" //
}
]
}
}

View File

@ -27,7 +27,7 @@
"Servers": [
{
"Url": "http://ip/xxx",
"Description": "应用程序名"
"Description": "二级目录应用程序名"
}
],
"LoginInfo": {

View File

@ -20,9 +20,9 @@
<PackageReference Include="AspNetCoreRateLimit" Version="5.0.0" />
<PackageReference Include="BouncyCastle.Cryptography" Version="2.5.0" Aliases="BouncyCastleV2" />
<PackageReference Include="Elastic.Clients.Elasticsearch" Version="8.17.1" />
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.6.20" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.6.20" />
<PackageReference Include="Furion.Pure" Version="4.9.6.20" />
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.7.1" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.7.1" />
<PackageReference Include="Furion.Pure" Version="4.9.7.1" />
<PackageReference Include="Hardware.Info" Version="101.0.0" />
<PackageReference Include="Hashids.net" Version="1.7.0" />
<PackageReference Include="IPTools.China" Version="1.6.0" />
@ -33,7 +33,7 @@
<PackageReference Include="Magicodes.IE.Word" Version="2.7.5.2" />
<PackageReference Include="MailKit" Version="4.9.0" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.4.6" />
<PackageReference Include="MiniExcel" Version="1.36.1" />
<PackageReference Include="MiniExcel" Version="1.37.0" />
<PackageReference Include="MiniWord" Version="0.9.2" />
<PackageReference Include="MQTTnet" Version="5.0.1.1416" />
<PackageReference Include="MySqlBackup.NET.MySqlConnector" Version="2.3.8" />
@ -49,7 +49,7 @@
<PackageReference Include="SSH.NET" Version="2024.2.0" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.5.1" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1166" />
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1170" />
<PackageReference Include="UAParser" Version="3.1.47" />
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
</ItemGroup>

View File

@ -0,0 +1,149 @@
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
namespace Admin.NET.Core;
/// <summary>
/// 支付宝授权记录表
/// </summary>
[SugarTable(null, "支付宝授权记录表")]
[SysTable]
[SugarIndex("index_{table}_U", nameof(UserId), OrderByType.Asc)]
[SugarIndex("index_{table}_T", nameof(OpenId), OrderByType.Asc)]
public class SysAlipayAuthInfo : EntityBase
{
/// <summary>
/// 商户AppId
/// </summary>
[SugarColumn(ColumnDescription = "商户AppId", Length = 64)]
public string? AppId { get; set; }
/// <summary>
/// 开放ID
/// </summary>
[SugarColumn(ColumnDescription = "开放ID", Length = 64)]
public string? OpenId { get; set; }
/// <summary>
/// 用户ID
/// </summary>
[SugarColumn(ColumnDescription = "用户ID", Length = 64)]
public string? UserId { get; set; }
/// <summary>
/// 性别
/// </summary>
[SugarColumn(ColumnDescription = "性别", Length = 8)]
public GenderEnum Gender { get; set; }
/// <summary>
/// 年龄
/// </summary>
[SugarColumn(ColumnDescription = "年龄", Length = 16)]
public int Age { get; set; }
/// <summary>
/// 手机号
/// </summary>
[SugarColumn(ColumnDescription = "手机号", Length = 32)]
public string Mobile { get; set; }
/// <summary>
/// 显示名称
/// </summary>
[SugarColumn(ColumnDescription = "显示名称", Length = 128)]
public string DisplayName { get; set; }
/// <summary>
/// 昵称
/// </summary>
[SugarColumn(ColumnDescription = "昵称", Length = 64)]
public string NickName { get; set; }
/// <summary>
/// 用户名
/// </summary>
[SugarColumn(ColumnDescription = "用户名", Length = 64)]
public string UserName { get; set; }
/// <summary>
/// 头像
/// </summary>
[SugarColumn(ColumnDescription = "头像", Length = 512)]
public string? Avatar { get; set; }
/// <summary>
/// 邮箱
/// </summary>
[SugarColumn(ColumnDescription = "邮箱", Length = 128)]
public string? Email { get; set; }
/// <summary>
/// 用户民族
/// </summary>
[SugarColumn(ColumnDescription = "用户民族", Length = 32)]
public string? UserNation { get; set; }
/// <summary>
/// 淘宝ID
/// </summary>
[SugarColumn(ColumnDescription = "淘宝ID", Length = 64)]
public string? TaobaoId { get; set; }
/// <summary>
/// 电话
/// </summary>
[SugarColumn(ColumnDescription = "电话", Length = 32)]
public string? Phone { get; set; }
/// <summary>
/// 生日
/// </summary>
[SugarColumn(ColumnDescription = "生日", Length = 32)]
public string? PersonBirthday { get; set; }
/// <summary>
/// 职业
/// </summary>
[SugarColumn(ColumnDescription = "职业", Length = 64)]
public string? Profession { get; set; }
/// <summary>
/// 省份
/// </summary>
[SugarColumn(ColumnDescription = "省份", Length = 64)]
public string? Province { get; set; }
/// <summary>
/// 用户状态
/// </summary>
[SugarColumn(ColumnDescription = "用户状态", Length = 32)]
public string? UserStatus { get; set; }
/// <summary>
/// 学历
/// </summary>
[SugarColumn(ColumnDescription = "学历", Length = 32)]
public string? Degree { get; set; }
/// <summary>
/// 用户类型
/// </summary>
[SugarColumn(ColumnDescription = "用户类型", Length = 32)]
public string? UserType { get; set; }
/// <summary>
/// 邮编
/// </summary>
[SugarColumn(ColumnDescription = "邮编", Length = 16)]
public string? Zip { get; set; }
/// <summary>
/// 地址
/// </summary>
[SugarColumn(ColumnDescription = "地址", Length = 256)]
public string? Address { get; set; }
}

View File

@ -0,0 +1,108 @@
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
namespace Admin.NET.Core;
/// <summary>
/// 支付宝交易记录表
/// </summary>
[SugarTable(null, "支付宝交易记录表")]
[SysTable]
[SugarIndex("index_{table}_U", nameof(UserId), OrderByType.Asc)]
[SugarIndex("index_{table}_T", nameof(TradeNo), OrderByType.Asc)]
[SugarIndex("index_{table}_O", nameof(OutTradeNo), OrderByType.Asc)]
public class SysAlipayTransaction : EntityBase
{
/// <summary>
/// 用户Id
/// </summary>
[SugarColumn(ColumnDescription = "用户Id", Length = 64)]
public long UserId { get; set; }
/// <summary>
/// 交易号
/// </summary>
[SugarColumn(ColumnDescription = "交易号", Length = 64)]
public string? TradeNo { get; set; }
/// <summary>
/// 商户订单号
/// </summary>
[SugarColumn(ColumnDescription = "商户订单号", Length = 64)]
public string OutTradeNo { get; set; }
/// <summary>
/// 交易金额
/// </summary>
[SugarColumn(ColumnDescription = "交易金额", Length = 20)]
public decimal TotalAmount { get; set; }
/// <summary>
/// 交易状态
/// </summary>
[SugarColumn(ColumnDescription = "交易状态", Length = 32)]
public string TradeStatus { get; set; }
/// <summary>
/// 交易完成时间
/// </summary>
[SugarColumn(ColumnDescription = "交易完成时间")]
public DateTime? FinishTime { get; set; }
/// <summary>
/// 交易标题
/// </summary>
[SugarColumn(ColumnDescription = "交易标题", Length = 256)]
public string Subject { get; set; }
/// <summary>
/// 交易描述
/// </summary>
[SugarColumn(ColumnDescription = "交易描述", Length = 512)]
public string? Body { get; set; }
/// <summary>
/// 买家支付宝账号
/// </summary>
[SugarColumn(ColumnDescription = "买家支付宝账号", Length = 128)]
public string? BuyerLogonId { get; set; }
/// <summary>
/// 买家支付宝用户ID
/// </summary>
[SugarColumn(ColumnDescription = "买家支付宝用户ID", Length = 32)]
public string? BuyerUserId { get; set; }
/// <summary>
/// 卖家支付宝用户ID
/// </summary>
[SugarColumn(ColumnDescription = "卖家支付宝用户ID", Length = 32)]
public string? SellerUserId { get; set; }
/// <summary>
/// 商户AppId
/// </summary>
[SugarColumn(ColumnDescription = "商户AppId", Length = 64)]
public string? AppId { get; set; }
/// <summary>
/// 交易扩展信息
/// </summary>
[SugarColumn(ColumnDescription = "交易扩展信息", Length = 1024)]
public string? ExtendInfo { get; set; }
/// <summary>
/// 交易异常信息
/// </summary>
[SugarColumn(ColumnDescription = "交易扩展信息", Length = 1024)]
public string? ErrorInfo { get; set; }
/// <summary>
/// 交易备注
/// </summary>
[SugarColumn(ColumnDescription = "交易备注", Length = 512)]
public string? Remark { get; set; }
}

View File

@ -130,6 +130,13 @@ public partial class SysCodeGenConfig : EntityBase
[MaxLength(8)]
public string? WhetherSortable { get; set; }
/// <summary>
/// 是否是统计字段
/// </summary>
[SugarColumn(ColumnDescription = "是否是统计字段", Length = 8)]
[MaxLength(8)]
public string? Statistical { get; set; }
/// <summary>
/// 是否是查询条件
/// </summary>

View File

@ -171,11 +171,11 @@ public partial class SysTenant : EntityBase
/// 图形验证码
/// </summary>
[SugarColumn(ColumnDescription = "图形验证码")]
public virtual bool Captcha { get; set; } = true;
public virtual bool? Captcha { get; set; } = true;
/// <summary>
/// 登录二次验证
/// </summary>
[SugarColumn(ColumnDescription = "登录二次验证")]
public virtual bool SecondVer { get; set; } = false;
public virtual bool? SecondVer { get; set; } = false;
}

View File

@ -0,0 +1,45 @@
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
//namespace Admin.NET.Core;
///// <summary>
///// 系统租户轮播图表
///// </summary>
//[SugarTable(null, "系统租户轮播图表")]
//[SysTable]
//public partial class SysTenantCarousel : EntityBaseId
//{
// /// <summary>
// /// 租户Id
// /// </summary>
// [SugarColumn(ColumnDescription = "租户Id")]
// public long TenantId { get; set; }
// ///// <summary>
// ///// 文件Id
// ///// </summary>
// //[SugarColumn(ColumnDescription = "文件Id")]
// //public long? FileId { get; set; }
// /// <summary>
// /// 文件名称
// /// </summary>
// [SugarColumn(ColumnDescription = "文件名称", Length = 64), MaxLength(64)]
// public string? FileName { get; set; }
// /// <summary>
// /// 文件路径
// /// </summary>
// [SugarColumn(ColumnDescription = "文件路径", Length = 256), MaxLength(256)]
// public string? FilePath { get; set; }
// /// <summary>
// /// 排序
// /// </summary>
// [SugarColumn(ColumnDescription = "排序", DefaultValue = "100")]
// public int OrderNo { get; set; } = 100;
//}

View File

@ -98,6 +98,17 @@ public static class StringExtension
return char.ToLower(input[0]) + input[1..];
}
/// <summary>
/// 转首字母大写
/// </summary>
public static string ToFirstLetterUpperCase(this string input)
{
if (string.IsNullOrWhiteSpace(input)) return input;
if (input.Length == 1) return input.ToUpper(); // 处理单字符字符串
return char.ToUpper(input[0]) + input[1..];
}
/// <summary>
/// 渲染字符串,替换占位符
/// </summary>

View File

@ -6,7 +6,6 @@
global using Admin.NET.Core.Service;
global using Furion;
global using Furion.ClayObject;
global using Furion.ConfigurableOptions;
global using Furion.DatabaseAccessor;
global using Furion.DataEncryption;
@ -15,10 +14,11 @@ global using Furion.DependencyInjection;
global using Furion.DynamicApiController;
global using Furion.EventBus;
global using Furion.FriendlyException;
global using Furion.HttpRemote;
global using Furion.JsonSerialization;
global using Furion.Logging;
global using Furion.HttpRemote;
global using Furion.Schedule;
global using Furion.Shapeless;
global using Furion.UnifyResult;
global using Furion.ViewEngine;
global using Magicodes.ExporterAndImporter.Core;

View File

@ -4,6 +4,8 @@
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
using Aop.Api;
namespace Admin.NET.Core;
/// <summary>
@ -12,57 +14,106 @@ namespace Admin.NET.Core;
public sealed class AlipayOptions : IConfigurableOptions
{
/// <summary>
/// 支付宝 APPID必填
/// 支付宝网关地址
/// </summary>
public string AppId { get; set; }
public string ServerUrl { get; init; }
/// <summary>
/// 支付宝 websocket 服务地址 (必填)
/// 支付宝授权回调地址
/// </summary>
public string AlipayWebsocketUrl { get; set; }
public string AuthUrl { get; init; }
/// <summary>
/// 支付宝网关地址 (必填)
/// 应用授权回调地址
/// </summary>
public string ServerUrl { get; set; }
public string AppAuthUrl { get; init; }
/// <summary>
/// 支付宝授权回调地址 (必填)
/// 支付宝 websocket 服务地址
/// </summary>
public string AuthUrl { get; set; }
public string WebsocketUrl { get; init; }
/// <summary>
/// 应用回调地址
/// </summary>
public string NotifyUrl { get; set; }
public string NotifyUrl { get; init; }
/// <summary>
/// 加密算法(必填)
/// 支付宝根证书存放路径
/// </summary>
public string SignType { get; set; }
public string RootCertPath { get; init; }
/// <summary>
/// 支付宝商户账号列表
/// </summary>
public List<AlipayMerchantAccount> AccountList { get; init; }
/// <summary>
/// 获取支付宝客户端
/// </summary>
/// <param name="account"></param>
public DefaultAopClient GetClient(AlipayMerchantAccount account)
{
account = account ?? throw new Exception("未找到支付宝商户账号");
string path = App.WebHostEnvironment.ContentRootPath;
return new DefaultAopClient(new AlipayConfig
{
Format = "json",
Charset = "UTF-8",
ServerUrl = ServerUrl,
AppId = account.AppId,
SignType = account.SignType,
PrivateKey = account.PrivateKey,
EncryptKey = account.EncryptKey,
RootCertPath = Path.Combine(path, RootCertPath),
AppCertPath = Path.Combine(path, account.AppCertPath),
AlipayPublicCertPath = Path.Combine(path, account.AlipayPublicCertPath)
});
}
}
/// <summary>
/// 支付宝商户账号信息
/// </summary>
public class AlipayMerchantAccount
{
/// <summary>
/// 配置Id
/// </summary>
public long Id { get; init; }
/// <summary>
/// 商户名称
/// </summary>
public string Name { get; init; }
/// <summary>
/// 商户AppId
/// </summary>
public string AppId { get; init; }
/// <summary>
/// 应用私钥
/// </summary>
public string PrivateKey { get; init; }
/// <summary>
/// 从支付宝获取敏感信息时的加密密钥(可选)
/// </summary>
public string EncryptKey { get; set; }
public string EncryptKey { get; init; }
/// <summary>
/// 应用私钥 (必填)
/// 加密算法
/// </summary>
public string PrivateKey { get; set; }
public string SignType { get; init; }
/// <summary>
/// 支付宝公钥证书存放路径(证书加签方式必填)
/// 应用公钥证书路径
/// </summary>
public string AlipayPublicCertPath { get; set; }
public string AppCertPath { get; init; }
/// <summary>
/// 支付宝根证书存放路径(证书加签方式必填)
/// 支付宝公钥证书路径
/// </summary>
public string RootCertPath { get; set; }
/// <summary>
/// 应用公钥证书存放路径(证书加签方式必填)
/// </summary>
public string AppCertPath { get; set; }
public string AlipayPublicCertPath { get; init; }
}

View File

@ -25,7 +25,7 @@ public class SysCodeGenTemplateSeedData : ISqlSugarEntitySeedData<SysCodeGenTemp
""SysFlag"": 1,
""IsDefault"": true,
""OutputFile"": ""api/{PagePath}/{TableNameLower}.ts"",
""Describe"": ""(WEB)"",
""Describe"": ""(WEB)"",
""OrderNo"": 100,
""CreateTime"": ""1900-01-01 00:00:00"",
""UpdateTime"": ""2025-01-13 23:02:29"",
@ -34,7 +34,7 @@ public class SysCodeGenTemplateSeedData : ISqlSugarEntitySeedData<SysCodeGenTemp
""UpdateUserId"": null,
""UpdateUserName"": null,
""IsDelete"": false,
""Id"": 36036980201001
""Id"": 1300000000101
},
{
""Name"": ""web_views_index.vue.vm"",
@ -42,7 +42,7 @@ public class SysCodeGenTemplateSeedData : ISqlSugarEntitySeedData<SysCodeGenTemp
""SysFlag"": 1,
""IsDefault"": true,
""OutputFile"": ""views/{PagePath}/{TableNameLower}/index.vue"",
""Describe"": ""(WEB)"",
""Describe"": ""(WEB)"",
""OrderNo"": 100,
""CreateTime"": ""1900-01-01 00:00:00"",
""UpdateTime"": ""2025-01-13 23:02:29"",
@ -51,7 +51,24 @@ public class SysCodeGenTemplateSeedData : ISqlSugarEntitySeedData<SysCodeGenTemp
""UpdateUserId"": null,
""UpdateUserName"": null,
""IsDelete"": false,
""Id"": 36036980201002
""Id"": 1300000000111
},
{
""Name"": ""web_views_List.vue.vm"",
""Type"": 1,
""SysFlag"": 1,
""IsDefault"": true,
""OutputFile"": ""views/{PagePath}/{TableNameLower}/component/{TableNameLower}List.vue"",
""Describe"": ""(WEB)"",
""OrderNo"": 100,
""CreateTime"": ""1900-01-01 00:00:00"",
""UpdateTime"": ""2025-01-13 21:25:43"",
""CreateUserId"": null,
""CreateUserName"": null,
""UpdateUserId"": null,
""UpdateUserName"": null,
""IsDelete"": false,
""Id"": 1300000000121
},
{
""Name"": ""web_views_editDialog.vue.vm"",
@ -68,7 +85,7 @@ public class SysCodeGenTemplateSeedData : ISqlSugarEntitySeedData<SysCodeGenTemp
""UpdateUserId"": null,
""UpdateUserName"": null,
""IsDelete"": false,
""Id"": 36036980201003
""Id"": 1300000000131
},
{
""Name"": ""service_Service.cs.vm"",
@ -76,7 +93,7 @@ public class SysCodeGenTemplateSeedData : ISqlSugarEntitySeedData<SysCodeGenTemp
""SysFlag"": 1,
""IsDefault"": true,
""OutputFile"": ""Service/{TableName}/{TableName}Service.cs"",
""Describe"": ""()"",
""Describe"": ""()"",
""OrderNo"": 100,
""CreateTime"": ""1900-01-01 00:00:00"",
""UpdateTime"": ""2025-01-13 23:02:29"",
@ -85,7 +102,7 @@ public class SysCodeGenTemplateSeedData : ISqlSugarEntitySeedData<SysCodeGenTemp
""UpdateUserId"": null,
""UpdateUserName"": null,
""IsDelete"": false,
""Id"": 36036980202001
""Id"": 1300000000141
},
{
""Name"": ""service_InputDto.cs.vm"",
@ -102,7 +119,7 @@ public class SysCodeGenTemplateSeedData : ISqlSugarEntitySeedData<SysCodeGenTemp
""UpdateUserId"": null,
""UpdateUserName"": null,
""IsDelete"": false,
""Id"": 36036980202002
""Id"": 1300000000151
},
{
""Name"": ""service_OutputDto.cs.vm"",
@ -119,7 +136,7 @@ public class SysCodeGenTemplateSeedData : ISqlSugarEntitySeedData<SysCodeGenTemp
""UpdateUserId"": null,
""UpdateUserName"": null,
""IsDelete"": false,
""Id"": 36036980202003
""Id"": 1300000000161
},
{
""Name"": ""sys_menu_seed_data.cs.vm"",
@ -127,7 +144,7 @@ public class SysCodeGenTemplateSeedData : ISqlSugarEntitySeedData<SysCodeGenTemp
""SysFlag"": 1,
""IsDefault"": true,
""OutputFile"": ""SeedData/{TableName}MenuSeedData.cs"",
""Describe"": ""()"",
""Describe"": ""()"",
""OrderNo"": 100,
""CreateTime"": ""1900-01-01 00:00:00"",
""UpdateTime"": ""2025-01-13 23:02:29"",
@ -136,7 +153,7 @@ public class SysCodeGenTemplateSeedData : ISqlSugarEntitySeedData<SysCodeGenTemp
""UpdateUserId"": null,
""UpdateUserName"": null,
""IsDelete"": false,
""Id"": 36036980202004
""Id"": 1300000000171
},
{
""Name"": ""web_views_el_table_index.vue.vm"",
@ -144,7 +161,7 @@ public class SysCodeGenTemplateSeedData : ISqlSugarEntitySeedData<SysCodeGenTemp
""SysFlag"": 1,
""IsDefault"": false,
""OutputFile"": ""views/{PagePath}/{TableNameLower}/index.vue"",
""Describe"": ""(WEB),el-table"",
""Describe"": ""(WEB),el-tablevxetable互斥"",
""OrderNo"": 100,
""CreateTime"": ""1900-01-01 00:00:00"",
""UpdateTime"": ""2025-01-13 23:02:29"",
@ -153,41 +170,7 @@ public class SysCodeGenTemplateSeedData : ISqlSugarEntitySeedData<SysCodeGenTemp
""UpdateUserId"": null,
""UpdateUserName"": null,
""IsDelete"": false,
""Id"": 36036980203001
},
{
""Name"": ""PartialService_Service.cs.vm"",
""Type"": 2,
""SysFlag"": 1,
""IsDefault"": false,
""OutputFile"": ""PartialService/{TableName}/{TableName}Service.cs"",
""Describe"": ""()Partial业务"",
""OrderNo"": 100,
""CreateTime"": ""1900-01-01 00:00:00"",
""UpdateTime"": ""2025-01-13 21:25:43"",
""CreateUserId"": null,
""CreateUserName"": null,
""UpdateUserId"": null,
""UpdateUserName"": null,
""IsDelete"": false,
""Id"": 36036980203002
},
{
""Name"": ""web_views_Tree.vue.vm"",
""Type"": 1,
""SysFlag"": 1,
""IsDefault"": false,
""OutputFile"": ""views/{PagePath}/{TableNameLower}/component/{TableNameLower}Tree.vue"",
""Describe"": ""(WEB)"",
""OrderNo"": 100,
""CreateTime"": ""1900-01-01 00:00:00"",
""UpdateTime"": ""2025-01-13 21:25:43"",
""CreateUserId"": null,
""CreateUserName"": null,
""UpdateUserId"": null,
""UpdateUserName"": null,
""IsDelete"": false,
""Id"": 36036980203004
""Id"": 1300000000181
},
{
""Name"": ""PartialEntity_Entity.cs.vm"",
@ -195,7 +178,7 @@ public class SysCodeGenTemplateSeedData : ISqlSugarEntitySeedData<SysCodeGenTemp
""SysFlag"": 1,
""IsDefault"": false,
""OutputFile"": ""PartialEntity/{TableName}Entity.cs"",
""Describe"": ""()Partial"",
""Describe"": ""()Partial实体"",
""OrderNo"": 100,
""CreateTime"": ""1900-01-01 00:00:00"",
""UpdateTime"": ""2025-01-13 21:25:43"",
@ -204,15 +187,32 @@ public class SysCodeGenTemplateSeedData : ISqlSugarEntitySeedData<SysCodeGenTemp
""UpdateUserId"": null,
""UpdateUserName"": null,
""IsDelete"": false,
""Id"": 36036980203005
""Id"": 1300000000191
},
{
""Name"": ""web_views_List.vue.vm"",
""Name"": ""PartialService_Service.cs.vm"",
""Type"": 2,
""SysFlag"": 1,
""IsDefault"": false,
""OutputFile"": ""PartialService/{TableName}/{TableName}Service.cs"",
""Describe"": ""()Partial服务"",
""OrderNo"": 100,
""CreateTime"": ""1900-01-01 00:00:00"",
""UpdateTime"": ""2025-01-13 21:25:43"",
""CreateUserId"": null,
""CreateUserName"": null,
""UpdateUserId"": null,
""UpdateUserName"": null,
""IsDelete"": false,
""Id"": 1300000000201
},
{
""Name"": ""web_views_Tree.vue.vm"",
""Type"": 1,
""SysFlag"": 1,
""IsDefault"": false,
""OutputFile"": ""views/{PagePath}/{TableNameLower}/component/{TableNameLower}List.vue"",
""Describe"": ""(WEB)"",
""OutputFile"": ""views/{PagePath}/{TableNameLower}/component/{TableNameLower}Tree.vue"",
""Describe"": ""(WEB)"",
""OrderNo"": 100,
""CreateTime"": ""1900-01-01 00:00:00"",
""UpdateTime"": ""2025-01-13 21:25:43"",
@ -221,7 +221,7 @@ public class SysCodeGenTemplateSeedData : ISqlSugarEntitySeedData<SysCodeGenTemp
""UpdateUserId"": null,
""UpdateUserName"": null,
""IsDelete"": false,
""Id"": 36036980203006
""Id"": 1300000000211
}
]
";

View File

@ -1,279 +0,0 @@
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
using Aop.Api;
using Aop.Api.Domain;
using Aop.Api.Request;
using Aop.Api.Response;
using Aop.Api.Util;
using Microsoft.AspNetCore.Hosting;
namespace Admin.NET.Core.Service;
/// <summary>
/// 支付宝支付服务 🧩
/// </summary>
[ApiDescriptionSettings(Order = 240)]
public class AlipayService : IDynamicApiController, ITransient
{
private readonly IEnumerable<IAlipayNotify> _alipayNotifyList;
private readonly IWebHostEnvironment _webHostEnvironment;
private readonly SysConfigService _sysConfigService;
private readonly IHttpContextAccessor _httpContext;
private readonly AlipayOptions _alipayOptions;
private readonly IAopClient _alipayClient;
private readonly UserManager _userManager;
public AlipayService(
UserManager userManager,
IHttpContextAccessor httpContext,
SysConfigService sysConfigService,
IWebHostEnvironment webHostEnvironment,
IOptions<AlipayOptions> alipayOptions)
{
_userManager = userManager;
_httpContext = httpContext;
_sysConfigService = sysConfigService;
_alipayOptions = alipayOptions.Value;
_webHostEnvironment = webHostEnvironment;
_alipayNotifyList = App.GetServices<IAlipayNotify>();
// 初始化支付宝客户端
string path = App.WebHostEnvironment.ContentRootPath;
_alipayClient = new DefaultAopClient(new AlipayConfig
{
Format = "json",
Charset = "UTF-8",
AppId = _alipayOptions.AppId,
SignType = _alipayOptions.SignType,
ServerUrl = _alipayOptions.ServerUrl,
PrivateKey = _alipayOptions.PrivateKey,
EncryptKey = _alipayOptions.EncryptKey,
AppCertPath = Path.Combine(path, _alipayOptions.AppCertPath),
RootCertPath = Path.Combine(path, _alipayOptions.RootCertPath),
AlipayPublicCertPath = Path.Combine(path, _alipayOptions.AlipayPublicCertPath)
});
}
/// <summary>
/// 获取授权信息 🔖
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[NonUnify]
[AllowAnonymous]
[DisplayName("获取授权信息")]
[ApiDescriptionSettings(Name = "GetAuthInfo"), HttpGet]
public ActionResult GetAuthInfo([FromQuery] AlipayAuthInfoInput input)
{
var type = input.UserId.Split('-').FirstOrDefault().ToInt();
var userId = input.UserId.Split('-').LastOrDefault().ToLong();
// 当前网页接口地址
var currentUrl = $"{_httpContext.HttpContext!.Request.GetOrigin()}{_httpContext.HttpContext!.Request.Path}?userId={input.UserId}";
if (string.IsNullOrEmpty(input.AuthCode))
{
// 重新授权
var url = $"{_alipayOptions.AuthUrl}?app_id={_alipayOptions.AppId}&scope=auth_user&redirect_uri={currentUrl}";
return new RedirectResult(url);
}
// 组装授权请求参数
AlipaySystemOauthTokenRequest request = new()
{
GrantType = AlipayConst.GrantType,
Code = input.AuthCode
};
AlipaySystemOauthTokenResponse response = _alipayClient.CertificateExecute(request);
// token换取用户信息
AlipayUserInfoShareRequest infoShareRequest = new();
AlipayUserInfoShareResponse info = _alipayClient.CertificateExecute(infoShareRequest, response.AccessToken);
// 循环执行扫码后需要执行的业务逻辑需要至少一个继承方法返回true否则抛出异常
var pass = false;
foreach (var notify in _alipayNotifyList)
if (notify.ScanCallback(type, userId, info)) pass = true;
if (!pass) throw Oops.Oh("未处理的授权逻辑");
// 执行完,重定向到指定界面
var authPageUrl = _sysConfigService.GetConfigValueByCode<string>(ConfigConst.AlipayAuthPageUrl + type).Result;
return new RedirectResult(authPageUrl);
}
/// <summary>
/// 支付回调 🔖
/// </summary>
/// <returns></returns>
[AllowAnonymous]
[DisplayName("支付回调")]
[ApiDescriptionSettings(Name = "Notify"), HttpPost]
public string Notify()
{
SortedDictionary<string, string> sorted = [];
foreach (string key in _httpContext.HttpContext!.Request.Form.Keys)
sorted.Add(key, _httpContext.HttpContext.Request.Form[key]);
string alipayPublicKey = Path.Combine(_webHostEnvironment.ContentRootPath, _alipayOptions.AlipayPublicCertPath!.Replace('/', '\\').TrimStart('\\'));
bool signVerified = AlipaySignature.RSACertCheckV1(sorted, alipayPublicKey, "UTF-8", _alipayOptions.SignType); // 调用SDK验证签名
if (!signVerified) throw Oops.Oh("交易失败");
var outTradeNo = sorted.GetValueOrDefault("out_trade_no");
try
{
// 记录回调日志
File.AppendAllText($"{_webHostEnvironment.ContentRootPath}\\AlipayLog\\Notify-{DateTime.Today:yyyy-MM-dd}.txt",
$"支付宝支付到平台({DateTime.Now:yyyy-MM-dd HH:mm:ss}){Environment.NewLine} " +
$"登录人:{_userManager.UserId}-{_userManager.RealName}{Environment.NewLine} " +
$"IP{App.HttpContext?.GetRemoteIpAddressToIPv4(true)} {Environment.NewLine} " +
$"交易号:{outTradeNo}{Environment.NewLine} " +
$"参数:{JSON.Serialize(sorted)}{Environment.NewLine} " +
$"-----------------------------------------------------------------------------------------------------------------------" +
$"{Environment.NewLine}{Environment.NewLine}{Environment.NewLine}");
}
catch (Exception ex)
{
Log.Error("支付宝支付回调日志写入失败:", ex);
}
if (sorted.GetValueOrDefault(AlipayConst.TradeStatus) == AlipayConst.TradeSuccess)
{
// 约定交易码前四位为类型码,后面为订单号
var tradeNo = long.Parse(outTradeNo);
var type = long.Parse(outTradeNo[..4]);
// 循环执行业务逻辑,若都未处理(回调全部返回false)则交易失败
var isError = true;
foreach (var notify in _alipayNotifyList)
if (notify.TopUpCallback(type, tradeNo)) isError = false;
if (isError) throw Oops.Oh("交易失败");
}
return "success";
}
/// <summary>
/// 统一收单下单并支付页面接口 🔖
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[DisplayName("统一收单下单并支付页面接口")]
[ApiDescriptionSettings(Name = "AlipayTradePagePay"), HttpPost]
public string AlipayTradePagePay(AlipayTradePagePayInput input)
{
AlipayTradeWapPayRequest request = new();
// 组装业务参数model
AlipayTradeWapPayModel model = new()
{
Subject = input.Subject,
OutTradeNo = input.OutTradeNo,
TotalAmount = input.TotalAmount,
Body = input.Body,
ProductCode = "QUICK_WAP_WAY",
TimeExpire = input.TimeoutExpress
};
request.SetBizModel(model);
// 设置异步通知接收地址
request.SetNotifyUrl(_alipayOptions.NotifyUrl);
var response = _alipayClient.SdkExecute(request);
if (response.IsError) throw Oops.Oh(response.SubMsg);
return $"{_alipayOptions.ServerUrl}?{response.Body}";
}
/// <summary>
/// 交易预创建 🔖
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[DisplayName("交易预创建")]
[ApiDescriptionSettings(Name = "AlipayPreCreate"), HttpPost]
public string AlipayPreCreate(AlipayPreCreateInput input)
{
AlipayTradePrecreateRequest request = new();
// 设置异步通知接收地址
request.SetNotifyUrl(_alipayOptions.NotifyUrl);
// 组装业务参数model
AlipayTradePrecreateModel model = new()
{
Subject = input.Subject,
OutTradeNo = input.OutTradeNo,
TotalAmount = input.TotalAmount,
TimeoutExpress = input.TimeoutExpress
};
request.SetBizModel(model);
var response = _alipayClient.CertificateExecute(request);
if (response.IsError) throw Oops.Oh(response.SubMsg);
return response.QrCode;
}
/// <summary>
/// 单笔转账到支付宝账户
/// https://opendocs.alipay.com/open/62987723_alipay.fund.trans.uni.transfer
/// </summary>
[NonAction]
public Task<AlipayFundTransUniTransferResponse> Transfer(AlipayFundTransUniTransferInput input)
{
// 构造请求参数以调用接口
AlipayFundTransUniTransferRequest request = new();
AlipayFundTransUniTransferModel model = new()
{
BizScene = AlipayConst.BizScene,
ProductCode = AlipayConst.ProductCode,
// 设置商家侧唯一订单号
OutBizNo = input.OutBizNo,
// 设置订单总金额
TransAmount = input.TransAmount.ToString(),
// 设置转账业务的标题
OrderTitle = input.OrderTitle
};
// 设置收款方信息
Participant payeeInfo = new()
{
CertType = input.CertType.ToString(),
CertNo = input.CertNo,
Identity = input.Identity,
Name = input.Name,
IdentityType = input.IdentityType.ToString()
};
model.PayeeInfo = payeeInfo;
// 设置业务备注
model.Remark = input.Remark;
// 设置转账业务请求的扩展参数
string payerShowNameUseAlias = input.PayerShowNameUseAlias.ToString().ToLower();
model.BusinessParams = $"{{\"payer_show_name_use_alias\":\"{payerShowNameUseAlias}\"}}";
request.SetBizModel(model);
var response = _alipayClient.CertificateExecute(request);
try
{
File.AppendAllText($"{_webHostEnvironment.ContentRootPath}\\AlipayLog\\{DateTime.Today:yyyy-MM-dd}.txt",
$"支付宝付款到账户({DateTime.Now:yyyy-MM-dd HH:mm:ss}){Environment.NewLine} " +
$"登录人:{_userManager.UserId}-{_userManager.RealName}{Environment.NewLine} " +
$"IP{App.HttpContext?.GetRemoteIpAddressToIPv4(true)} {Environment.NewLine} " +
$"参数:{JSON.Serialize(model)}{Environment.NewLine} " +
$"返回:{JSON.Serialize(response)}{Environment.NewLine}" +
$"-----------------------------------------------------------------------------------------------------------------------" +
$"{Environment.NewLine}{Environment.NewLine}{Environment.NewLine}");
}
catch (Exception ex)
{
Log.Error("单笔转账到支付宝账户日志写入失败:", ex);
}
return Task.FromResult(response);
}
}

View File

@ -5,27 +5,36 @@
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
using Aop.Api.Domain;
using Newtonsoft.Json;
using System.Text.Json.Serialization;
namespace Admin.NET.Core.Service;
public class AlipayFundTransUniTransferInput
{
/// <summary>
/// 商家侧唯一订单号
/// 用户ID
/// </summary>
public long UserId { get; set; }
/// <summary>
/// 商户AppId
/// </summary>
public string AppId { get; set; }
/// <summary>
/// 商家订单号
/// </summary>
[Required(ErrorMessage = "订单号不能为空")]
public string OutBizNo { get; set; }
/// <summary>
/// 转账金额
/// </summary>
[Required(ErrorMessage = "转账金额不能为空")]
public decimal? TransAmount { get; set; }
public decimal TransAmount { get; set; }
/// <summary>
/// 转账业务标题
/// 业务标题
/// </summary>
[Required(ErrorMessage = "业务标题不能为空")]
public string OrderTitle { get; set; }
/// <summary>
@ -46,25 +55,21 @@ public class AlipayFundTransUniTransferInput
/// <summary>
/// 收款方证件号码,条件必填
/// </summary>
[CommonValidation($"{nameof(CertType)} != null && string.IsNullOrWhiteSpace({nameof(CertNo)})", "", ErrorMessage = "证件号码不能为空")]
public string CertNo { get; set; }
/// <summary>
/// 收款方身份标识
/// </summary>
[Required(ErrorMessage = "身份标识不能为空")]
public string Identity { get; set; }
/// <summary>
/// 收款方真实姓名
/// </summary>
[Required(ErrorMessage = "真实姓名不能为空")]
public string Name { get; set; }
/// <summary>
/// 收款方身份标识类型
/// </summary>
[Required(ErrorMessage = "身份标识类型不能为空")]
public AlipayIdentityTypeEnum? IdentityType { get; set; }
}
@ -159,10 +164,17 @@ public class AlipayAuthInfoInput
/// <summary>
/// 用户Id
/// </summary>
[JsonProperty("user_id")]
[JsonPropertyName("user_id")]
[FromQuery(Name = "user_id")]
public string UserId { get; set; }
/// <summary>
/// 授权码
/// </summary>
[JsonProperty("auth_code")]
[JsonPropertyName("auth_code")]
[FromQuery(Name = "auth_code")]
public string AuthCode { get; set; }
}

View File

@ -0,0 +1,271 @@
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
using Aop.Api;
using Aop.Api.Domain;
using Aop.Api.Request;
using Aop.Api.Response;
using Aop.Api.Util;
using Microsoft.AspNetCore.Hosting;
using NewLife.Reflection;
namespace Admin.NET.Core.Service;
/// <summary>
/// 支付宝支付服务 🧩
/// </summary>
[ApiDescriptionSettings(Order = 240)]
public class SysAlipayService : IDynamicApiController, ITransient
{
private readonly IWebHostEnvironment _webHostEnvironment;
private readonly SysConfigService _sysConfigService;
private readonly List<IAopClient> _alipayClientList;
private readonly IHttpContextAccessor _httpContext;
private readonly AlipayOptions _option;
private readonly ISqlSugarClient _db;
public SysAlipayService(
ISqlSugarClient db,
IHttpContextAccessor httpContext,
SysConfigService sysConfigService,
IWebHostEnvironment webHostEnvironment,
IOptions<AlipayOptions> alipayOptions)
{
_db = db;
_httpContext = httpContext;
_sysConfigService = sysConfigService;
_option = alipayOptions.Value;
_webHostEnvironment = webHostEnvironment;
// 初始化支付宝客户端列表
_alipayClientList = [];
foreach (var account in _option.AccountList) _alipayClientList.Add(_option.GetClient(account));
}
/// <summary>
/// 获取授权信息 🔖
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[NonUnify]
[AllowAnonymous]
[DisplayName("获取授权信息")]
[ApiDescriptionSettings(Name = "AuthInfo"), HttpGet]
public ActionResult GetAuthInfo([FromQuery] AlipayAuthInfoInput input)
{
var type = input.UserId?.Split('-').FirstOrDefault().ToInt();
var userId = input.UserId?.Split('-').LastOrDefault().ToLong();
var account = _option.AccountList.FirstOrDefault();
var alipayClient = _alipayClientList.First();
// 当前网页接口地址
var currentUrl = $"{_option.AppAuthUrl}{_httpContext.HttpContext!.Request.Path}?userId={input.UserId}";
if (string.IsNullOrEmpty(input.AuthCode))
{
// 重新授权
var url = $"{_option.AuthUrl}?app_id={account!.AppId}&scope=auth_user&redirect_uri={currentUrl}";
return new RedirectResult(url);
}
// 组装授权请求参数
AlipaySystemOauthTokenRequest request = new()
{
GrantType = AlipayConst.GrantType,
Code = input.AuthCode
};
AlipaySystemOauthTokenResponse response = alipayClient.CertificateExecute(request);
// token换取用户信息
AlipayUserInfoShareRequest infoShareRequest = new();
AlipayUserInfoShareResponse info = alipayClient.CertificateExecute(infoShareRequest, response.AccessToken);
// 记录授权信息
var entity = _db.Queryable<SysAlipayAuthInfo>().First(u =>
(!string.IsNullOrWhiteSpace(u.UserId) && u.UserId == info.UserId) ||
(!string.IsNullOrWhiteSpace(u.OpenId) && u.OpenId == info.OpenId)) ?? new();
entity.Copy(info, excludes: [nameof(SysAlipayAuthInfo.Gender), nameof(SysAlipayAuthInfo.Age)]);
entity.Age = int.Parse(info.Age);
entity.Gender = info.Gender switch
{
"m" => GenderEnum.Male,
"f" => GenderEnum.Female,
_ => GenderEnum.Unknown
};
entity.AppId = account!.AppId;
if (entity.Id <= 0) _db.Insertable(entity).ExecuteCommand();
else _db.Updateable(entity).ExecuteCommand();
// 执行完,重定向到指定界面
//var authPageUrl = _sysConfigService.GetConfigValueByCode<string>(ConfigConst.AlipayAuthPageUrl + type).Result;
//return new RedirectResult(authPageUrl);
return new RedirectResult(_option.AppAuthUrl + "/index.html");
}
/// <summary>
/// 支付回调 🔖
/// </summary>
/// <returns></returns>
[AllowAnonymous]
[DisplayName("支付回调")]
[ApiDescriptionSettings(Name = "Notify"), HttpPost]
public string Notify()
{
SortedDictionary<string, string> sorted = [];
foreach (string key in _httpContext.HttpContext!.Request.Form.Keys)
sorted.Add(key, _httpContext.HttpContext.Request.Form[key]);
var account = _option.AccountList.FirstOrDefault();
string alipayPublicKey = Path.Combine(_webHostEnvironment.ContentRootPath, account!.AlipayPublicCertPath!.Replace('/', '\\').TrimStart('\\'));
bool signVerified = AlipaySignature.RSACertCheckV1(sorted, alipayPublicKey, "UTF-8", account.SignType); // 调用SDK验证签名
if (!signVerified) throw Oops.Oh("交易失败");
// 更新交易记录
var outTradeNo = sorted.GetValueOrDefault("out_trade_no");
var transaction = _db.Queryable<SysAlipayTransaction>().First(x => x.OutTradeNo == outTradeNo) ?? throw Oops.Oh("交易记录不存在");
transaction.TradeNo = sorted.GetValueOrDefault("trade_no");
transaction.TradeStatus = sorted.GetValueOrDefault("trade_status");
transaction.FinishTime = sorted.ContainsKey("gmt_payment") ? DateTime.Parse(sorted.GetValueOrDefault("gmt_payment")) : null;
transaction.BuyerLogonId = sorted.GetValueOrDefault("buyer_logon_id");
transaction.BuyerUserId = sorted.GetValueOrDefault("buyer_user_id");
transaction.SellerUserId = sorted.GetValueOrDefault("seller_id");
transaction.Remark = sorted.GetValueOrDefault("remark");
_db.Updateable(transaction).ExecuteCommand();
return "success";
}
/// <summary>
/// 统一收单下单并支付页面接口 🔖
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[DisplayName("统一收单下单并支付页面接口")]
[ApiDescriptionSettings(Name = "AlipayTradePagePay"), HttpPost]
public string AlipayTradePagePay(AlipayTradePagePayInput input)
{
// 创建交易记录,状态为等待支付
var transactionRecord = new SysAlipayTransaction
{
AppId = _option.AccountList.First().AppId,
OutTradeNo = input.OutTradeNo,
TotalAmount = input.TotalAmount.ToDecimal(),
TradeStatus = "WAIT_PAY", // 等待支付
CreateTime = DateTime.Now,
Subject = input.Subject,
Body = input.Body,
Remark = "等待用户支付"
};
_db.Insertable(transactionRecord).ExecuteCommand();
// 设置支付页面请求并组装业务参数model设置异步通知接收地址
AlipayTradeWapPayRequest request = new();
request.SetBizModel(new AlipayTradeWapPayModel()
{
Subject = input.Subject,
OutTradeNo = input.OutTradeNo,
TotalAmount = input.TotalAmount,
Body = input.Body,
ProductCode = "QUICK_WAP_WAY",
TimeExpire = input.TimeoutExpress
});
request.SetNotifyUrl(_option.NotifyUrl);
var alipayClient = _alipayClientList.First();
var response = alipayClient.SdkExecute(request);
if (response.IsError) throw Oops.Oh(response.SubMsg);
return $"{_option.ServerUrl}?{response.Body}";
}
/// <summary>
/// 交易预创建 🔖
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[DisplayName("交易预创建")]
[ApiDescriptionSettings(Name = "AlipayPreCreate"), HttpPost]
public string AlipayPreCreate(AlipayPreCreateInput input)
{
// 创建交易记录,状态为等待支付
var transactionRecord = new SysAlipayTransaction
{
AppId = _option.AccountList.First().AppId,
OutTradeNo = input.OutTradeNo,
TotalAmount = input.TotalAmount.ToDecimal(),
TradeStatus = "WAIT_PAY", // 等待支付
CreateTime = DateTime.Now,
Subject = input.Subject,
Remark = "等待用户支付"
};
_db.Insertable(transactionRecord).ExecuteCommand();
// 设置异步通知接收地址并组装业务参数model
AlipayTradePrecreateRequest request = new();
request.SetNotifyUrl(_option.NotifyUrl);
request.SetBizModel(new AlipayTradePrecreateModel()
{
Subject = input.Subject,
OutTradeNo = input.OutTradeNo,
TotalAmount = input.TotalAmount,
TimeoutExpress = input.TimeoutExpress
});
var alipayClient = _alipayClientList.First();
var response = alipayClient.CertificateExecute(request);
if (response.IsError) throw Oops.Oh(response.SubMsg);
return response.QrCode;
}
/// <summary>
/// 单笔转账到支付宝账户
/// https://opendocs.alipay.com/open/62987723_alipay.fund.trans.uni.transfer
/// </summary>
[NonAction]
public async Task<AlipayFundTransUniTransferResponse> Transfer(AlipayFundTransUniTransferInput input)
{
var account = _option.AccountList.FirstOrDefault(u => u.AppId == input.AppId) ?? throw Oops.Oh("未找到商户支付宝账号");
var alipayClient = _option.GetClient(account);
// 构造请求参数以调用接口
AlipayFundTransUniTransferRequest request = new();
AlipayFundTransUniTransferModel model = new()
{
BizScene = AlipayConst.BizScene,
ProductCode = AlipayConst.ProductCode,
OutBizNo = input.OutBizNo, // 商家订单
TransAmount = $"{input.TransAmount}:F2", // 订单总金额
OrderTitle = input.OrderTitle, // 业务标题
Remark = input.Remark, // 业务备注
PayeeInfo = new() // 收款方信息
{
CertType = input.CertType?.ToString(),
CertNo = input.CertNo,
Identity = input.Identity,
Name = input.Name,
IdentityType = input.IdentityType.ToString()
},
BusinessParams = input.PayerShowNameUseAlias ? "{\"payer_show_name_use_alias\":\"true\"}" : null
};
request.SetBizModel(model);
var response = alipayClient.CertificateExecute(request);
// 保存转账记录
await _db.Insertable(new SysAlipayTransaction
{
UserId = input.UserId,
AppId = input.AppId,
TradeNo = response.OrderId,
OutTradeNo = input.OutBizNo,
TotalAmount = response.Amount.ToDecimal(),
TradeStatus = response.Code == "10000" ? "SUCCESS" : "FAILED",
Subject = input.OrderTitle,
ErrorInfo = response.SubMsg,
Remark = input.Remark
}).ExecuteCommandAsync();
return response;
}
}

View File

@ -13,7 +13,7 @@ namespace Admin.NET.Core.Service;
/// 系统登录授权服务 🧩
/// </summary>
[ApiDescriptionSettings(Order = 500, Description = "登录授权")]
[AppApiDescription("账号密码登录 🔖")]
[AppApiDescription("登录授权")]
public class SysAuthService : IDynamicApiController, ITransient
{
private readonly UserManager _userManager;

View File

@ -118,6 +118,11 @@ public class CodeGenConfig
/// </summary>
public string WhetherSortable { get; set; }
/// <summary>
/// 是否是统计字段
/// </summary>
public string Statistical { get; set; }
/// <summary>
/// 是否是查询条件
/// </summary>

View File

@ -13,10 +13,149 @@ namespace Admin.NET.Core.Service;
public class SysCodeGenConfigService : IDynamicApiController, ITransient
{
private readonly ISqlSugarClient _db;
private readonly CodeGenOptions _codeGenOptions;
private readonly DbConnectionOptions _dbConnectionOptions;
private readonly SysDatabaseService _databaseService;
public SysCodeGenConfigService(ISqlSugarClient db)
public SysCodeGenConfigService(ISqlSugarClient db,
SysDatabaseService databaseService,
IOptions<DbConnectionOptions> dbConnectionOptions,
IOptions<CodeGenOptions> codeGenOptions)
{
_db = db;
_dbConnectionOptions = dbConnectionOptions.Value;
_codeGenOptions = codeGenOptions.Value;
_databaseService = databaseService;
}
/// <summary>
/// 获取数据表列(实体属性)集合
/// </summary>
/// <returns></returns>
public List<ColumnOuput> GetColumnList([FromQuery] AddCodeGenInput input)
{
return GetColumnList(input.TableName, input.ConfigId);
}
/// <summary>
/// 获取数据表列(实体属性)集合
/// </summary>
/// <param name="EntityName"></param>
/// <param name="ConfigId"></param>
/// <returns></returns>
public List<ColumnOuput> GetColumnList(string EntityName, string ConfigId)
{
var entityType = GetEntityInfos().GetAwaiter().GetResult().FirstOrDefault(u => u.EntityName == EntityName);
if (entityType == null) return null;
var config = _dbConnectionOptions.ConnectionConfigs.FirstOrDefault(u => u.ConfigId.ToString() == ConfigId);
var dbTableName = config!.DbSettings.EnableUnderLine ? UtilMethods.ToUnderLine(entityType.DbTableName) : entityType.DbTableName;
int bracketIndex = dbTableName.IndexOf('{');
if (bracketIndex != -1)
{
dbTableName = dbTableName[..bracketIndex];
var dbTableInfos = _db.AsTenant().GetConnectionScope(ConfigId).DbMaintenance.GetTableInfoList(false);
var table = dbTableInfos.FirstOrDefault(u => u.Name.StartsWith(config.DbSettings.EnableUnderLine ? UtilMethods.ToUnderLine(dbTableName) : dbTableName, StringComparison.CurrentCultureIgnoreCase));
if (table != null)
dbTableName = table.Name;
}
// 切库---多库代码生成用
var provider = _db.AsTenant().GetConnectionScope(!string.IsNullOrEmpty(ConfigId) ? ConfigId : SqlSugarConst.MainConfigId);
var entityBasePropertyNames = _codeGenOptions.EntityBaseColumn[nameof(EntityTenantBaseData)];
var columnInfos = provider.DbMaintenance.GetColumnInfosByTableName(dbTableName, false);
var result = columnInfos.Select(u => new ColumnOuput
{
// 转下划线后的列名需要再转回来(暂时不转)
//ColumnName = config.DbSettings.EnableUnderLine ? CodeGenUtil.CamelColumnName(u.DbColumnName, entityBasePropertyNames) : u.DbColumnName,
ColumnName = u.DbColumnName,
ColumnLength = u.Length,
IsPrimarykey = u.IsPrimarykey,
IsNullable = u.IsNullable,
ColumnKey = u.IsPrimarykey.ToString(),
NetType = CodeGenUtil.ConvertDataType(u, provider.CurrentConnectionConfig.DbType),
DataType = u.DataType,
ColumnComment = string.IsNullOrWhiteSpace(u.ColumnDescription) ? u.DbColumnName : u.ColumnDescription,
DefaultValue = u.DefaultValue,
}).ToList();
// 获取实体的属性信息赋值给PropertyName属性(CodeFirst模式应以PropertyName为实际使用名称)
var entityProperties = entityType.Type.GetProperties();
for (int i = result.Count - 1; i >= 0; i--)
{
var columnOutput = result[i];
// 先找自定义字段名的,如果找不到就再找自动生成字段名的(并且过滤掉没有SugarColumn的属性)
var propertyInfo = entityProperties.FirstOrDefault(u => (u.GetCustomAttribute<SugarColumn>()?.ColumnName ?? "").ToLower() == columnOutput.ColumnName.ToLower()) ??
entityProperties.FirstOrDefault(u => u.GetCustomAttribute<SugarColumn>() != null && u.Name.ToLower() == (config.DbSettings.EnableUnderLine
? CodeGenUtil.CamelColumnName(columnOutput.ColumnName, entityBasePropertyNames).ToLower()
: columnOutput.ColumnName.ToLower()));
if (propertyInfo != null)
{
columnOutput.PropertyName = propertyInfo.Name;
columnOutput.ColumnComment = propertyInfo.GetCustomAttribute<SugarColumn>()!.ColumnDescription;
}
else
{
result.RemoveAt(i); // 移除没有定义此属性的字段
}
}
return result;
}
/// <summary>
/// 获取库表信息
/// </summary>
/// <param name="excludeSysTable">是否排除带SysTable属性的表</param>
/// <returns></returns>
public async Task<IEnumerable<EntityInfo>> GetEntityInfos(bool excludeSysTable = false)
{
var types = new List<Type>();
if (_codeGenOptions.EntityAssemblyNames != null)
{
var assemblies = AppDomain.CurrentDomain.GetAssemblies();
foreach (var assembly in assemblies)
{
var assemblyName = assembly.GetName().Name!;
if (_codeGenOptions.EntityAssemblyNames.Contains(assemblyName) || _codeGenOptions.EntityAssemblyNames.Any(name => assemblyName.Contains(name)))
{
Assembly asm = Assembly.Load(assemblyName);
types.AddRange(asm.GetExportedTypes().ToList());
}
}
}
var sugarTableType = typeof(SugarTable);
bool IsMyAttribute(Attribute[] o)
{
foreach (Attribute a in o)
{
if (a.GetType() == sugarTableType)
return true;
}
return false;
}
Type[] cosType = types.Where(u => IsMyAttribute(Attribute.GetCustomAttributes(u, false))).ToArray();
var entityInfos = new List<EntityInfo>();
foreach (var ct in cosType)
{
// 若实体贴[SysTable]特性,则禁止显示系统自带的
if (excludeSysTable && ct.IsDefined(typeof(SysTableAttribute), false))
continue;
var des = ct.GetCustomAttributes(typeof(DescriptionAttribute), false);
var description = des.Length > 0 ? ((DescriptionAttribute)des[0]).Description : "";
var sugarAttribute = ct.GetCustomAttributes(sugarTableType, true).FirstOrDefault();
entityInfos.Add(new EntityInfo()
{
EntityName = ct.Name,
DbTableName = sugarAttribute == null ? ct.Name : ((SugarTable)sugarAttribute).TableName,
TableDescription = sugarAttribute == null ? description : ((SugarTable)sugarAttribute).TableDescription,
Type = ct
});
}
return await Task.FromResult(entityInfos);
}
/// <summary>
@ -27,6 +166,41 @@ public class SysCodeGenConfigService : IDynamicApiController, ITransient
[DisplayName("获取代码生成配置列表")]
public async Task<List<CodeGenConfig>> GetList([FromQuery] CodeGenConfig input)
{
// 获取主表
var codeGenTable = _db.Queryable<SysCodeGen>().Single(u => u.Id == input.CodeGenId);
// 获取配置的字段
var genConfigColumnList = await _db.Queryable<SysCodeGenConfig>().Where(u => u.CodeGenId == input.CodeGenId).ToListAsync();
// 获取实体所有字段
var tableColumnList = GetColumnList(codeGenTable.TableName, codeGenTable.ConfigId);
// 获取新增的字段
var addColumnList = tableColumnList.Where(u => !genConfigColumnList.Select(d => d.ColumnName).Contains(u.ColumnName)).ToList();
// 获取删除的字段
var delColumnList = genConfigColumnList.Where(u => !tableColumnList.Select(d => d.ColumnName).Contains(u.ColumnName)).ToList();
// 获取更新的字段
var updateColumnList = new List<SysCodeGenConfig>();
foreach (var column in genConfigColumnList)
{
// 获取没有增减的
if (tableColumnList.Any(u => u.ColumnName == column.ColumnName))
{
var nmd = tableColumnList.Single(u => u.ColumnName == column.ColumnName);
// 如果数据库类型或者长度改变
if (nmd.NetType != column.NetType || nmd.ColumnLength != column.ColumnLength || nmd.ColumnComment != column.ColumnComment)
{
column.NetType = nmd.NetType;
column.ColumnLength = nmd.ColumnLength;
column.ColumnComment = nmd.ColumnComment;
updateColumnList.Add(column);
}
}
}
// 增加新增的
if (addColumnList.Count > 0) AddList(addColumnList, codeGenTable);
// 删除没有的
if (delColumnList.Count > 0) await _db.Deleteable(delColumnList).ExecuteCommandAsync();
// 更新配置
if (updateColumnList.Count > 0) await _db.Updateable(updateColumnList).ExecuteCommandAsync();
// 重新获取配置
return await _db.Queryable<SysCodeGenConfig>()
.Where(u => u.CodeGenId == input.CodeGenId)
.Select<CodeGenConfig>()
@ -48,6 +222,7 @@ public class SysCodeGenConfigService : IDynamicApiController, ITransient
public async Task UpdateCodeGenConfig(List<CodeGenConfig> inputList)
{
if (inputList == null || inputList.Count < 1) return;
await _db.Updateable(inputList.Adapt<List<SysCodeGenConfig>>())
.IgnoreColumns(u => new { u.ColumnLength, u.ColumnName, u.PropertyName })
.ExecuteCommandAsync();

View File

@ -77,7 +77,7 @@ public class SysCodeGenService : IDynamicApiController, ITransient
.ExecuteReturnEntityAsync();
// 增加配置表
_codeGenConfigService.AddList(GetColumnList(input), newCodeGen);
_codeGenConfigService.AddList(_codeGenConfigService.GetColumnList(input), newCodeGen);
}
/// <summary>
@ -108,9 +108,10 @@ public class SysCodeGenService : IDynamicApiController, ITransient
[DisplayName("更新代码生成")]
public async Task UpdateCodeGen(UpdateCodeGenInput input)
{
var isExist = await _db.Queryable<SysCodeGen>().AnyAsync(u => u.TableName == input.TableName && u.Id != input.Id);
if (isExist)
throw Oops.Oh(ErrorCodeEnum.D1400);
//开发阶段不断生成调整
//var isExist = await _db.Queryable<SysCodeGen>().AnyAsync(u => u.TableName == input.TableName && u.Id != input.Id);
//if (isExist)
// throw Oops.Oh(ErrorCodeEnum.D1400);
var codeGen = input.Adapt<SysCodeGen>();
var templateRelations = GetCodeGenTemplateRelation(codeGen.Id, input.CodeGenTemplateIds);
@ -121,7 +122,7 @@ public class SysCodeGenService : IDynamicApiController, ITransient
.ExecuteCommandAsync();
// 更新配置表
_codeGenConfigService.AddList(GetColumnList(input.Adapt<AddCodeGenInput>()), codeGen);
_codeGenConfigService.AddList(_codeGenConfigService.GetColumnList(input.Adapt<AddCodeGenInput>()), codeGen);
}
/// <summary>
@ -183,7 +184,7 @@ public class SysCodeGenService : IDynamicApiController, ITransient
var config = _dbConnectionOptions.ConnectionConfigs.FirstOrDefault(u => configId.Equals(u.ConfigId));
IEnumerable<EntityInfo> entityInfos = await GetEntityInfos(); // 获取所有实体定义
IEnumerable<EntityInfo> entityInfos = await _codeGenConfigService.GetEntityInfos(); // 获取所有实体定义
entityInfos = entityInfos.OrderBy(u => u.EntityName.StartsWith("Sys") ? 1 : 0).ThenBy(u => u.EntityName);
var tableOutputList = new List<TableOutput>();
@ -225,10 +226,10 @@ public class SysCodeGenService : IDynamicApiController, ITransient
// 获取实体类型属性
var entityType = provider.DbMaintenance.GetTableInfoList(false).FirstOrDefault(u => u.Name == tableName);
if (entityType == null) return null;
var entityBasePropertyNames = _codeGenOptions.EntityBaseColumn[nameof(EntityTenant)];
var entityBasePropertyNames = _codeGenOptions.EntityBaseColumn[nameof(EntityTenantBaseData)];
tableName = GetRealTableName(tableName);
var properties = GetEntityInfos().Result.First(u => GetRealTableName(u.DbTableName).EqualIgnoreCase(tableName)).Type.GetProperties()
var properties = _codeGenConfigService.GetEntityInfos().Result.First(u => GetRealTableName(u.DbTableName).EqualIgnoreCase(tableName)).Type.GetProperties()
.Where(u => u.GetCustomAttribute<SugarColumn>()?.IsIgnore == false).Select(u => new
{
PropertyName = u.Name,
@ -269,128 +270,6 @@ public class SysCodeGenService : IDynamicApiController, ITransient
}
}
/// <summary>
/// 获取数据表列(实体属性)集合
/// </summary>
/// <returns></returns>
private List<ColumnOuput> GetColumnList([FromQuery] AddCodeGenInput input)
{
var entityType = GetEntityInfos().GetAwaiter().GetResult().FirstOrDefault(u => u.EntityName == input.TableName);
if (entityType == null)
return null;
var config = _dbConnectionOptions.ConnectionConfigs.FirstOrDefault(u => u.ConfigId.ToString() == input.ConfigId);
var dbTableName = config!.DbSettings.EnableUnderLine ? UtilMethods.ToUnderLine(entityType.DbTableName) : entityType.DbTableName;
int bracketIndex = dbTableName.IndexOf('{');
if (bracketIndex != -1)
{
dbTableName = dbTableName.Substring(0, bracketIndex);
var dbTableInfos = _db.AsTenant().GetConnectionScope(input.ConfigId).DbMaintenance.GetTableInfoList(false);
var table = dbTableInfos.FirstOrDefault(x => x.Name.StartsWith(config.DbSettings.EnableUnderLine ? UtilMethods.ToUnderLine(dbTableName) : dbTableName, StringComparison.CurrentCultureIgnoreCase));
if (table != null)
dbTableName = table.Name;
}
// 切库---多库代码生成用
var provider = _db.AsTenant().GetConnectionScope(!string.IsNullOrEmpty(input.ConfigId) ? input.ConfigId : SqlSugarConst.MainConfigId);
var entityBasePropertyNames = _codeGenOptions.EntityBaseColumn[nameof(EntityTenant)];
var columnInfos = provider.DbMaintenance.GetColumnInfosByTableName(dbTableName, false);
var result = columnInfos.Select(u => new ColumnOuput
{
// 转下划线后的列名需要再转回来(暂时不转)
//ColumnName = config.DbSettings.EnableUnderLine ? CodeGenUtil.CamelColumnName(u.DbColumnName, entityBasePropertyNames) : u.DbColumnName,
ColumnName = u.DbColumnName,
ColumnLength = u.Length,
IsPrimarykey = u.IsPrimarykey,
IsNullable = u.IsNullable,
ColumnKey = u.IsPrimarykey.ToString(),
NetType = CodeGenUtil.ConvertDataType(u, provider.CurrentConnectionConfig.DbType),
DataType = u.DataType,
ColumnComment = string.IsNullOrWhiteSpace(u.ColumnDescription) ? u.DbColumnName : u.ColumnDescription,
DefaultValue = u.DefaultValue,
}).ToList();
// 获取实体的属性信息赋值给PropertyName属性(CodeFirst模式应以PropertyName为实际使用名称)
var entityProperties = entityType.Type.GetProperties();
for (int i = result.Count - 1; i >= 0; i--)
{
var columnOutput = result[i];
// 先找自定义字段名的,如果找不到就再找自动生成字段名的(并且过滤掉没有SugarColumn的属性)
var propertyInfo = entityProperties.FirstOrDefault(u => (u.GetCustomAttribute<SugarColumn>()?.ColumnName ?? "").ToLower() == columnOutput.ColumnName.ToLower()) ??
entityProperties.FirstOrDefault(u => u.GetCustomAttribute<SugarColumn>() != null && u.Name.ToLower() == (config.DbSettings.EnableUnderLine
? CodeGenUtil.CamelColumnName(columnOutput.ColumnName, entityBasePropertyNames).ToLower()
: columnOutput.ColumnName.ToLower()));
if (propertyInfo != null)
{
columnOutput.PropertyName = propertyInfo.Name;
columnOutput.ColumnComment = propertyInfo.GetCustomAttribute<SugarColumn>()!.ColumnDescription;
}
else
{
result.RemoveAt(i); // 移除没有定义此属性的字段
}
}
return result;
}
/// <summary>
/// 获取库表信息
/// </summary>
/// <param name="excludeSysTable">是否排除带SysTable属性的表</param>
/// <returns></returns>
private async Task<IEnumerable<EntityInfo>> GetEntityInfos(bool excludeSysTable = false)
{
var types = new List<Type>();
if (_codeGenOptions.EntityAssemblyNames != null)
{
var assemblies = AppDomain.CurrentDomain.GetAssemblies();
foreach (var assembly in assemblies)
{
var assemblyName = assembly.GetName().Name!;
if (_codeGenOptions.EntityAssemblyNames.Contains(assemblyName) || _codeGenOptions.EntityAssemblyNames.Any(name => assemblyName.Contains(name)))
{
Assembly asm = Assembly.Load(assemblyName);
types.AddRange(asm.GetExportedTypes().ToList());
}
}
}
var sugarTableType = typeof(SugarTable);
bool IsMyAttribute(Attribute[] o)
{
foreach (Attribute a in o)
{
if (a.GetType() == sugarTableType)
return true;
}
return false;
}
Type[] cosType = types.Where(u => IsMyAttribute(Attribute.GetCustomAttributes(u, false))).ToArray();
var entityInfos = new List<EntityInfo>();
foreach (var ct in cosType)
{
// 若实体贴[SysTable]特性,则禁止显示系统自带的
if (excludeSysTable && ct.IsDefined(typeof(SysTableAttribute), false))
continue;
var des = ct.GetCustomAttributes(typeof(DescriptionAttribute), false);
var description = des.Length > 0 ? ((DescriptionAttribute)des[0]).Description : "";
var sugarAttribute = ct.GetCustomAttributes(sugarTableType, true).FirstOrDefault();
entityInfos.Add(new EntityInfo()
{
EntityName = ct.Name,
DbTableName = sugarAttribute == null ? ct.Name : ((SugarTable)sugarAttribute).TableName,
TableDescription = sugarAttribute == null ? description : ((SugarTable)sugarAttribute).TableDescription,
Type = ct
});
}
return await Task.FromResult(entityInfos);
}
/// <summary>
/// 获取程序保存位置 🔖
/// </summary>
@ -414,15 +293,13 @@ public class SysCodeGenService : IDynamicApiController, ITransient
if (Directory.Exists(outputPath)) Directory.Delete(outputPath, true);
var tableFieldList = await _codeGenConfigService.GetList(new CodeGenConfig { CodeGenId = input.Id }); // 字段集合
ProcessTableFieldList(tableFieldList); // 处理字段集合
var queryWhetherList = tableFieldList.Where(u => u.QueryWhether == YesNoEnum.Y.ToString()).ToList(); // 前端查询集合
var joinTableList = tableFieldList.Where(u => u.EffectType is "Upload" or "ForeignKey" or "ApiTreeSelector").ToList(); // 需要连表查询的字段
var data = CreateCustomViewEngine(input, tableFieldList, queryWhetherList, joinTableList); // 创建视图引擎数据
// 获菜单
// 获菜单
var menuList = await GetMenus(input.TableName!, input.BusName!, input.MenuPid ?? 0, input.MenuIcon!, input.PagePath!, tableFieldList);
if (input.GenerateMenu)
{
@ -435,7 +312,6 @@ public class SysCodeGenService : IDynamicApiController, ITransient
for (var i = 0; i < templateList.Count; i++)
{
string tResult = await ProcessTemplate(templateList[i], input, templatePath, data, menuList); // 处理模板
string targetFile = templateList[i].OutputFile
.Replace("{PagePath}", input.PagePath)
.Replace("{TableName}", input.TableName)
@ -454,7 +330,6 @@ public class SysCodeGenService : IDynamicApiController, ITransient
tmpPath = templateList[i].Type == CodeGenTypeEnum.Frontend ? Path.Combine(outputPath, _codeGenOptions.FrontRootPath, "src") : Path.Combine(outputPath, input!.NameSpace!);
}
targetFile = Path.Combine(tmpPath, targetFile);
var dirPath = new DirectoryInfo(targetFile).Parent!.FullName;
if (!Directory.Exists(dirPath))
Directory.CreateDirectory(dirPath);
@ -478,12 +353,10 @@ public class SysCodeGenService : IDynamicApiController, ITransient
public async Task<Dictionary<string, string>> Preview(SysCodeGen input)
{
var tableFieldList = await _codeGenConfigService.GetList(new CodeGenConfig { CodeGenId = input.Id }); // 字段集合
ProcessTableFieldList(tableFieldList); // 处理字段集合
var queryWhetherList = tableFieldList.Where(u => u.QueryWhether == YesNoEnum.Y.ToString()).ToList(); // 前端查询集合
var joinTableList = tableFieldList.Where(u => u.EffectType is "Upload" or "ForeignKey" or "ApiTreeSelector").ToList(); // 需要连表查询的字段
var data = CreateCustomViewEngine(input, tableFieldList, queryWhetherList, joinTableList); // 创建视图引擎数据
// 获取模板文件并替换
@ -493,8 +366,7 @@ public class SysCodeGenService : IDynamicApiController, ITransient
await _db.Ado.BeginTranAsync();
try
{
var menuList = await GetMenus(input.TableName!, input.BusName!, input.MenuPid ?? 0, input.MenuIcon!,
input.PagePath!, tableFieldList);
var menuList = await GetMenus(input.TableName!, input.BusName!, input.MenuPid ?? 0, input.MenuIcon!, input.PagePath!, tableFieldList);
var result = new Dictionary<string, string>();
foreach (var template in templateList)
{
@ -521,18 +393,16 @@ public class SysCodeGenService : IDynamicApiController, ITransient
if (!string.IsNullOrWhiteSpace(item.Rules))
{
if (item.Rules != "[]")
{
list = JSON.Deserialize<List<VerifyRuleItem>>(item.Rules);
}
}
else
{
item.Rules = "[]";
}
item.RuleItems = list;
item.WhetherRequired = list.Any(t => t.Type == "required") ? YesNoEnum.Y.ToString() : YesNoEnum.N.ToString();
item.WhetherRequired = list.Any(u => u.Type == "required") ? YesNoEnum.Y.ToString() : YesNoEnum.N.ToString();
item.AnyRule = list.Count > 0;
item.RemoteVerify = list.Any(t => t.Type == "remote");
item.RemoteVerify = list.Any(u => u.Type == "remote");
}
}
@ -599,7 +469,8 @@ public class SysCodeGenService : IDynamicApiController, ITransient
if (filename == "web_views_index.vue.vm")
{
filename = string.IsNullOrEmpty(input.LeftTab) ? filename : "web_views_LeftTree.vue.vm"; // 左树右列表
filename = string.IsNullOrEmpty(input.BottomTab) ? filename : "web_views_BottomIndx.vue.vm"; // 左数右上列表下列表属性
filename = (!string.IsNullOrEmpty(input.LeftTab) && !string.IsNullOrEmpty(input.BottomTab)) ? "web_views_BottomIndx.vue.vm" : filename; // 左树右上列表下列表属性
filename = (string.IsNullOrEmpty(input.LeftTab) && !string.IsNullOrEmpty(input.BottomTab)) ? "web_views_UDIndx.vue.vm" : filename; // 右上列表下列表属性
}
var templateFilePath = Path.Combine(templatePath, filename);
if (!File.Exists(templateFilePath)) return null;

View File

@ -183,11 +183,11 @@ public class SysCommonService : IDynamicApiController, ITransient
}
/// <summary>
/// 生成所有移动端接口 🔖
/// 生成所有移动端接口文件 🔖
/// </summary>
/// <returns></returns>
[HttpGet]
[DisplayName("生成所有移动端接口")]
[DisplayName("生成所有移动端接口文件")]
public void GenerateAppApi([FromQuery] string groupName = "", [FromQuery] bool isAppApi = true)
{
var defaultRoutePrefix = App.GetOptions<DynamicApiControllerSettingsOptions>().DefaultRoutePrefix;

View File

@ -4,6 +4,7 @@
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
using Admin.NET.Core;
using Newtonsoft.Json.Converters;
using Npgsql;
@ -271,6 +272,37 @@ public class SysDatabaseService : IDynamicApiController, ITransient
[ApiDescriptionSettings(Name = "CreateEntity"), HttpPost]
[DisplayName("创建实体")]
public void CreateEntity(CreateEntityInput input)
{
var tResult = GenerateEntity(input);
var targetPath = GetEntityTargetPath(input);
File.WriteAllText(targetPath, tResult, Encoding.UTF8);
}
/// <summary>
/// 创建实体文件内容
/// </summary>
/// <param name="ConfigId"></param>
/// <param name="TableName"></param>
/// <param name="Position"></param>
/// <param name="BaseClassName"></param>
/// <returns></returns>
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;
return GenerateEntity(input);
}
/// <summary>
/// 创建实体文件内容
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public string GenerateEntity(CreateEntityInput input)
{
var config = App.GetOptions<DbConnectionOptions>().ConnectionConfigs.FirstOrDefault(u => u.ConfigId.ToString() == input.ConfigId);
input.Position = string.IsNullOrWhiteSpace(input.Position) ? "Admin.NET.Application" : input.Position;
@ -307,8 +339,8 @@ public class SysDatabaseService : IDynamicApiController, ITransient
Description = string.IsNullOrWhiteSpace(dbTableInfo.Description) ? input.EntityName + "业务表" : dbTableInfo.Description,
TableField = dbColumnInfos
});
var targetPath = GetEntityTargetPath(input);
File.WriteAllText(targetPath, tResult, Encoding.UTF8);
return tResult;
}
/// <summary>

View File

@ -74,10 +74,10 @@ public class SysSmsService : IDynamicApiController, ITransient
var random = new Random();
var verifyCode = random.Next(100000, 999999);
var templateParam = Clay.Object(new
var templateParam = new
{
code = verifyCode
});
};
var client = CreateAliyunClient();
var template = _smsOptions.Aliyun.GetTemplate();

View File

@ -97,4 +97,9 @@ public class SysInfoInput
/// 登录二次验证
/// </summary>
public bool SecondVer { get; set; } = false;
/// <summary>
/// 轮播图
/// </summary>
public List<IFormFile> CarouselFiles { get; set; }
}

View File

@ -20,10 +20,12 @@ public class SysTenantService : IDynamicApiController, ITransient
private readonly SqlSugarRepository<SysUserExtOrg> _sysUserExtOrgRep;
private readonly SqlSugarRepository<SysRoleMenu> _sysRoleMenuRep;
private readonly SqlSugarRepository<SysUserRole> _userRoleRep;
private readonly SqlSugarRepository<SysFile> _fileRep;
private readonly SysUserRoleService _sysUserRoleService;
private readonly SysRoleMenuService _sysRoleMenuService;
private readonly SysConfigService _sysConfigService;
private readonly SysCacheService _sysCacheService;
private readonly SysFileService _sysFileService;
private readonly IEventPublisher _eventPublisher;
public SysTenantService(SqlSugarRepository<SysTenant> sysTenantRep,
@ -34,10 +36,12 @@ public class SysTenantService : IDynamicApiController, ITransient
SqlSugarRepository<SysUserExtOrg> sysUserExtOrgRep,
SqlSugarRepository<SysRoleMenu> sysRoleMenuRep,
SqlSugarRepository<SysUserRole> userRoleRep,
SqlSugarRepository<SysFile> fileRep,
SysUserRoleService sysUserRoleService,
SysRoleMenuService sysRoleMenuService,
SysConfigService sysConfigService,
SysCacheService sysCacheService,
SysFileService sysFileService,
IEventPublisher eventPublisher)
{
_sysTenantRep = sysTenantRep;
@ -48,10 +52,12 @@ public class SysTenantService : IDynamicApiController, ITransient
_sysUserExtOrgRep = sysUserExtOrgRep;
_sysRoleMenuRep = sysRoleMenuRep;
_userRoleRep = userRoleRep;
_fileRep = fileRep;
_sysUserRoleService = sysUserRoleService;
_sysRoleMenuService = sysRoleMenuService;
_sysConfigService = sysConfigService;
_sysCacheService = sysCacheService;
_sysFileService = sysFileService;
_eventPublisher = eventPublisher;
}
@ -81,6 +87,7 @@ public class SysTenantService : IDynamicApiController, ITransient
RealName = a.RealName,
Phone = a.Phone,
Email = a.Email,
Host = u.Host,
ExpirationTime = u.ExpirationTime,
TenantType = u.TenantType,
DbType = u.DbType,
@ -566,11 +573,12 @@ public class SysTenantService : IDynamicApiController, ITransient
var tenant = await _sysTenantRep.GetFirstAsync(u => u.Id == tenantId);
if (tenant == null) return "";
// 若租户系统标题为空,则获取默认租户系统信息
// 若租户系统标题为空,则获取默认租户系统信息(兼容已有未配置的租户)
if (string.IsNullOrWhiteSpace(tenant.Title))
tenant = await _sysTenantRep.GetFirstAsync(u => u.Id == SqlSugarConst.DefaultTenantId);
// 获取首页轮播图列表
var carouselFiles = await _fileRep.GetListAsync(u => u.BelongId == tenant.Id && u.RelationId == tenant.Id && u.FileType == "Carousel");
var forceChangePassword = await _sysConfigService.GetConfigValueByCode<bool>(ConfigConst.SysForceChangePassword); // 强制修改密码
var passwordExpirationTime = await _sysConfigService.GetConfigValueByCode<int>(ConfigConst.SysPasswordExpirationTime); // 密码有效期
@ -595,7 +603,8 @@ public class SysTenantService : IDynamicApiController, ITransient
tenant.SecondVer,
ForceChangePassword = forceChangePassword,
PasswordExpirationTime = passwordExpirationTime,
PublicKey = publicKey
PublicKey = publicKey,
CarouselFiles = carouselFiles
};
}
@ -629,8 +638,8 @@ public class SysTenantService : IDynamicApiController, ITransient
// 根据文件名取扩展名
var ext = string.IsNullOrWhiteSpace(input.LogoFileName) ? ".png" : Path.GetExtension(input.LogoFileName);
// 本地图标保存路径
var path = "upload";
var fileName = $"{input.TenantId}-logo{ext}".ToLower();
var path = $"upload/{input.TenantId}/";
var fileName = $"logo{ext}".ToLower();
var absoluteFilePath = Path.Combine(App.WebHostEnvironment.WebRootPath, path, fileName);
// 删除已存在文件
@ -648,6 +657,61 @@ public class SysTenantService : IDynamicApiController, ITransient
// 保存图标配置
tenant.Logo = $"/{path}/{fileName}";
}
await _sysTenantRep.AsUpdateable(tenant).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
await _sysTenantRep.AsUpdateable(tenant)
.UpdateColumns(u => new
{
u.Logo,
u.Title,
u.ViceTitle,
u.ViceDesc,
u.Copyright,
u.Icp,
u.IcpUrl,
u.Watermark,
u.Version,
u.ThemeColor,
u.Layout,
u.Animation,
u.Captcha,
u.SecondVer
})
.ExecuteCommandAsync();
}
/// <summary>
/// 上传轮播图单文件 🔖
/// </summary>
/// <param name="file"></param>
/// <returns></returns>
[DisplayName("上传轮播图单文件")]
public async Task<SysFile> UploadCarouselFile([Required] IFormFile file)
{
var tenantId = long.Parse(App.User?.FindFirst(ClaimConst.TenantId)?.Value ?? "0");
if (tenantId < 1) tenantId = SqlSugarConst.DefaultTenantId;
var tenant = await _sysTenantRep.GetFirstAsync(u => u.Id == tenantId);
if (tenant == null) return null;
if (file == null)
throw Oops.Oh(ErrorCodeEnum.D8000);
// 本地轮播图保存路径
var path = $"upload/{tenantId}/carousel";
var absoluteDirPath = Path.Combine(App.WebHostEnvironment.WebRootPath, path);
// 创建文件夹
if (!Directory.Exists(absoluteDirPath))
Directory.CreateDirectory(absoluteDirPath);
// 保存轮播图文件
var sysFile = await _sysFileService.UploadFile(new UploadFileInput { File = file, FileType = "Carousel", SavePath = path });
// 保存轮播图配置
sysFile.BelongId = tenant.Id;
sysFile.RelationId = tenant.Id;
await _sysFileService.UpdateFile(sysFile);
return sysFile;
}
}

View File

@ -100,18 +100,19 @@ namespace Admin.NET.Web.Core
if (App.User.FindFirst(ClaimConst.AccountType)?.Value == ((int)AccountTypeEnum.SuperAdmin).ToString())
return true;
var serviceScope = httpContext.RequestServices.CreateScope();
// 当前接口路由
var path = httpContext.Request.Path.ToString();
// 移动端接口权限判断
if (App.User.FindFirst(ClaimConst.LoginMode)?.Value == ((int)LoginModeEnum.APP).ToString())
{
var appApiList = App.GetRequiredService<SysCommonService>().GetAppApiList(); // 获取移动端所有接口
var appApiList = serviceScope.ServiceProvider.GetRequiredService<SysCommonService>().GetAppApiList();
return appApiList.Exists(u => path.EndsWith(u, StringComparison.CurrentCultureIgnoreCase));
}
// 获取当前用户按钮权限集合和接口黑名单
var serviceScope = httpContext.RequestServices.CreateScope();
var sysRoleService = serviceScope.ServiceProvider.GetRequiredService<SysRoleService>();
var roleApis = await sysRoleService.GetUserApiList();

View File

@ -0,0 +1,38 @@
-----BEGIN CERTIFICATE-----
MIIDszCCApugAwIBAgIQICQSIl9wqwjbcsS1A/zPajANBgkqhkiG9w0BAQsFADCBkTELMAkGA1UE
BhMCQ04xGzAZBgNVBAoMEkFudCBGaW5hbmNpYWwgdGVzdDElMCMGA1UECwwcQ2VydGlmaWNhdGlv
biBBdXRob3JpdHkgdGVzdDE+MDwGA1UEAww1QW50IEZpbmFuY2lhbCBDZXJ0aWZpY2F0aW9uIEF1
dGhvcml0eSBDbGFzcyAyIFIxIHRlc3QwHhcNMjQxMjIyMTE0NzAzWhcNMjUxMjIyMTE0NzAzWjCB
hDELMAkGA1UEBhMCQ04xHzAdBgNVBAoMFm10cXdudzEyODlAc2FuZGJveC5jb20xDzANBgNVBAsM
BkFsaXBheTFDMEEGA1UEAww65pSv5LuY5a6dKOS4reWbvSnnvZHnu5zmioDmnK/mnInpmZDlhazl
j7gtMjA4ODcyMTA1MzI1NzEzMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAIPs9UeN
0Hhp0qFTXE51E/a2EQ7YmMI8dJdBLWP17Irzo1I1Zxw3BIsrxEsdPJSGr76oQlunEyWYNyiVsOaL
6KE8V1FK6uPSJr5BK5W9o3wKg3XX7BKdflyB4964uRNJOOPpqNi4vwY1ZZFVpSHrZJ0ZAthDHGYo
o3/zdEEIwEWRkVAtMC6pJa8K0qk3qyaqHRMzwO3r13Ex8q/7+kO1iOsQ5UFQwKeV/g6/NuyEW9BZ
6y59BehHQBqf51ZJcPa91Dc6va/C6McKe/OWd+km9EFwjab0L2GvwdRtrxUAikR0tghgvx3fAfJw
nkfdjTzYUi/umDuVJlyW6xg0p9cJwLcCAwEAAaMSMBAwDgYDVR0PAQH/BAQDAgTwMA0GCSqGSIb3
DQEBCwUAA4IBAQAoaQR/LYaBNMQ9pjEAHNaLdheebL6TbDNI8thKYAhMKFfeJ4ZNZPwqg2FnCfhf
eVJctLqJtxgzzl0vazVGeFJRwrMvJXkZsU9veRjLP1s4QUOO5NqjxkDNuQnFnQZBsySLWkM/+0f3
AcFImbXVUDuod/KnPZ6i2gbYNmaADAvYM8M87aqbvrfbLHBk6wtHR21l9MMu1BXyAlJn29k47xYj
XNRJo6292M4Y4fyGFxT7tC+kt+MA6WUTl4hB+PvuXJh26tUOEo6EcXAZekcDJNOLCioNTW9/ck4P
bj2Qxvouztndmd3zsT+flLiImEtGgRaClveKuUwrd9rzWLNkl2lw
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIDszCCApugAwIBAgIQIBkIGbgVxq210KxLJ+YA/TANBgkqhkiG9w0BAQsFADCBhDELMAkGA1UE
BhMCQ04xFjAUBgNVBAoMDUFudCBGaW5hbmNpYWwxJTAjBgNVBAsMHENlcnRpZmljYXRpb24gQXV0
aG9yaXR5IHRlc3QxNjA0BgNVBAMMLUFudCBGaW5hbmNpYWwgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
dHkgUjEgdGVzdDAeFw0xOTA4MTkxMTE2MDBaFw0yNDA4MDExMTE2MDBaMIGRMQswCQYDVQQGEwJD
TjEbMBkGA1UECgwSQW50IEZpbmFuY2lhbCB0ZXN0MSUwIwYDVQQLDBxDZXJ0aWZpY2F0aW9uIEF1
dGhvcml0eSB0ZXN0MT4wPAYDVQQDDDVBbnQgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9y
aXR5IENsYXNzIDIgUjEgdGVzdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMh4FKYO
ZyRQHD6eFbPKZeSAnrfjfU7xmS9Yoozuu+iuqZlb6Z0SPLUqqTZAFZejOcmr07ln/pwZxluqplxC
5+B48End4nclDMlT5HPrDr3W0frs6Xsa2ZNcyil/iKNB5MbGll8LRAxntsKvZZj6vUTMb705gYgm
VUMILwi/ZxKTQqBtkT/kQQ5y6nOZsj7XI5rYdz6qqOROrpvS/d7iypdHOMIM9Iz9DlL1mrCykbBi
t25y+gTeXmuisHUwqaRpwtCGK4BayCqxRGbNipe6W73EK9lBrrzNtTr9NaysesT/v+l25JHCL9tG
wpNr1oWFzk4IHVOg0ORiQ6SUgxZUTYcCAwEAAaMSMBAwDgYDVR0PAQH/BAQDAgTwMA0GCSqGSIb3
DQEBCwUAA4IBAQBWThEoIaQoBX2YeRY/I8gu6TYnFXtyuCljANnXnM38ft+ikhE5mMNgKmJYLHvT
yWWWgwHoSAWEuml7EGbE/2AK2h3k0MdfiWLzdmpPCRG/RJHk6UB1pMHPilI+c0MVu16OPpKbg5Vf
LTv7dsAB40AzKsvyYw88/Ezi1osTXo6QQwda7uefvudirtb8FcQM9R66cJxl3kt1FXbpYwheIm/p
j1mq64swCoIYu4NrsUYtn6CV542DTQMI5QdXkn+PzUUly8F6kDp+KpMNd0avfWNL5+O++z+F5Szy
1CPta1D7EQ/eYmMP+mOQ35oifWIoFCpN6qQVBS/Hob1J/UUyg7BW
-----END CERTIFICATE-----

View File

@ -0,0 +1,88 @@
-----BEGIN CERTIFICATE-----
MIIBszCCAVegAwIBAgIIaeL+wBcKxnswDAYIKoEcz1UBg3UFADAuMQswCQYDVQQG
EwJDTjEOMAwGA1UECgwFTlJDQUMxDzANBgNVBAMMBlJPT1RDQTAeFw0xMjA3MTQw
MzExNTlaFw00MjA3MDcwMzExNTlaMC4xCzAJBgNVBAYTAkNOMQ4wDAYDVQQKDAVO
UkNBQzEPMA0GA1UEAwwGUk9PVENBMFkwEwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAE
MPCca6pmgcchsTf2UnBeL9rtp4nw+itk1Kzrmbnqo05lUwkwlWK+4OIrtFdAqnRT
V7Q9v1htkv42TsIutzd126NdMFswHwYDVR0jBBgwFoAUTDKxl9kzG8SmBcHG5Yti
W/CXdlgwDAYDVR0TBAUwAwEB/zALBgNVHQ8EBAMCAQYwHQYDVR0OBBYEFEwysZfZ
MxvEpgXBxuWLYlvwl3ZYMAwGCCqBHM9VAYN1BQADSAAwRQIgG1bSLeOXp3oB8H7b
53W+CKOPl2PknmWEq/lMhtn25HkCIQDaHDgWxWFtnCrBjH16/W3Ezn7/U/Vjo5xI
pDoiVhsLwg==
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIF0zCCA7ugAwIBAgIIH8+hjWpIDREwDQYJKoZIhvcNAQELBQAwejELMAkGA1UE
BhMCQ04xFjAUBgNVBAoMDUFudCBGaW5hbmNpYWwxIDAeBgNVBAsMF0NlcnRpZmlj
YXRpb24gQXV0aG9yaXR5MTEwLwYDVQQDDChBbnQgRmluYW5jaWFsIENlcnRpZmlj
YXRpb24gQXV0aG9yaXR5IFIxMB4XDTE4MDMyMTEzNDg0MFoXDTM4MDIyODEzNDg0
MFowejELMAkGA1UEBhMCQ04xFjAUBgNVBAoMDUFudCBGaW5hbmNpYWwxIDAeBgNV
BAsMF0NlcnRpZmljYXRpb24gQXV0aG9yaXR5MTEwLwYDVQQDDChBbnQgRmluYW5j
aWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IFIxMIICIjANBgkqhkiG9w0BAQEF
AAOCAg8AMIICCgKCAgEAtytTRcBNuur5h8xuxnlKJetT65cHGemGi8oD+beHFPTk
rUTlFt9Xn7fAVGo6QSsPb9uGLpUFGEdGmbsQ2q9cV4P89qkH04VzIPwT7AywJdt2
xAvMs+MgHFJzOYfL1QkdOOVO7NwKxH8IvlQgFabWomWk2Ei9WfUyxFjVO1LVh0Bp
dRBeWLMkdudx0tl3+21t1apnReFNQ5nfX29xeSxIhesaMHDZFViO/DXDNW2BcTs6
vSWKyJ4YIIIzStumD8K1xMsoaZBMDxg4itjWFaKRgNuPiIn4kjDY3kC66Sl/6yTl
YUz8AybbEsICZzssdZh7jcNb1VRfk79lgAprm/Ktl+mgrU1gaMGP1OE25JCbqli1
Pbw/BpPynyP9+XulE+2mxFwTYhKAwpDIDKuYsFUXuo8t261pCovI1CXFzAQM2w7H
DtA2nOXSW6q0jGDJ5+WauH+K8ZSvA6x4sFo4u0KNCx0ROTBpLif6GTngqo3sj+98
SZiMNLFMQoQkjkdN5Q5g9N6CFZPVZ6QpO0JcIc7S1le/g9z5iBKnifrKxy0TQjtG
PsDwc8ubPnRm/F82RReCoyNyx63indpgFfhN7+KxUIQ9cOwwTvemmor0A+ZQamRe
9LMuiEfEaWUDK+6O0Gl8lO571uI5onYdN1VIgOmwFbe+D8TcuzVjIZ/zvHrAGUcC
AwEAAaNdMFswCwYDVR0PBAQDAgEGMAwGA1UdEwQFMAMBAf8wHQYDVR0OBBYEFF90
tATATwda6uWx2yKjh0GynOEBMB8GA1UdIwQYMBaAFF90tATATwda6uWx2yKjh0Gy
nOEBMA0GCSqGSIb3DQEBCwUAA4ICAQCVYaOtqOLIpsrEikE5lb+UARNSFJg6tpkf
tJ2U8QF/DejemEHx5IClQu6ajxjtu0Aie4/3UnIXop8nH/Q57l+Wyt9T7N2WPiNq
JSlYKYbJpPF8LXbuKYG3BTFTdOVFIeRe2NUyYh/xs6bXGr4WKTXb3qBmzR02FSy3
IODQw5Q6zpXj8prYqFHYsOvGCEc1CwJaSaYwRhTkFedJUxiyhyB5GQwoFfExCVHW
05ZFCAVYFldCJvUzfzrWubN6wX0DD2dwultgmldOn/W/n8at52mpPNvIdbZb2F41
T0YZeoWnCJrYXjq/32oc1cmifIHqySnyMnavi75DxPCdZsCOpSAT4j4lAQRGsfgI
kkLPGQieMfNNkMCKh7qjwdXAVtdqhf0RVtFILH3OyEodlk1HYXqX5iE5wlaKzDop
PKwf2Q3BErq1xChYGGVS+dEvyXc/2nIBlt7uLWKp4XFjqekKbaGaLJdjYP5b2s7N
1dM0MXQ/f8XoXKBkJNzEiM3hfsU6DOREgMc1DIsFKxfuMwX3EkVQM1If8ghb6x5Y
jXayv+NLbidOSzk4vl5QwngO/JYFMkoc6i9LNwEaEtR9PhnrdubxmrtM+RjfBm02
77q3dSWFESFQ4QxYWew4pHE0DpWbWy/iMIKQ6UZ5RLvB8GEcgt8ON7BBJeMc+Dyi
kT9qhqn+lw==
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIICiDCCAgygAwIBAgIIQX76UsB/30owDAYIKoZIzj0EAwMFADB6MQswCQYDVQQG
EwJDTjEWMBQGA1UECgwNQW50IEZpbmFuY2lhbDEgMB4GA1UECwwXQ2VydGlmaWNh
dGlvbiBBdXRob3JpdHkxMTAvBgNVBAMMKEFudCBGaW5hbmNpYWwgQ2VydGlmaWNh
dGlvbiBBdXRob3JpdHkgRTEwHhcNMTkwNDI4MTYyMDQ0WhcNNDkwNDIwMTYyMDQ0
WjB6MQswCQYDVQQGEwJDTjEWMBQGA1UECgwNQW50IEZpbmFuY2lhbDEgMB4GA1UE
CwwXQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxMTAvBgNVBAMMKEFudCBGaW5hbmNp
YWwgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgRTEwdjAQBgcqhkjOPQIBBgUrgQQA
IgNiAASCCRa94QI0vR5Up9Yr9HEupz6hSoyjySYqo7v837KnmjveUIUNiuC9pWAU
WP3jwLX3HkzeiNdeg22a0IZPoSUCpasufiLAnfXh6NInLiWBrjLJXDSGaY7vaokt
rpZvAdmjXTBbMAsGA1UdDwQEAwIBBjAMBgNVHRMEBTADAQH/MB0GA1UdDgQWBBRZ
4ZTgDpksHL2qcpkFkxD2zVd16TAfBgNVHSMEGDAWgBRZ4ZTgDpksHL2qcpkFkxD2
zVd16TAMBggqhkjOPQQDAwUAA2gAMGUCMQD4IoqT2hTUn0jt7oXLdMJ8q4vLp6sg
wHfPiOr9gxreb+e6Oidwd2LDnC4OUqCWiF8CMAzwKs4SnDJYcMLf2vpkbuVE4dTH
Rglz+HGcTLWsFs4KxLsq7MuU+vJTBUeDJeDjdA==
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIDxTCCAq2gAwIBAgIUEMdk6dVgOEIS2cCP0Q43P90Ps5YwDQYJKoZIhvcNAQEF
BQAwajELMAkGA1UEBhMCQ04xEzARBgNVBAoMCmlUcnVzQ2hpbmExHDAaBgNVBAsM
E0NoaW5hIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMMH2lUcnVzQ2hpbmEgQ2xhc3Mg
MiBSb290IENBIC0gRzMwHhcNMTMwNDE4MDkzNjU2WhcNMzMwNDE4MDkzNjU2WjBq
MQswCQYDVQQGEwJDTjETMBEGA1UECgwKaVRydXNDaGluYTEcMBoGA1UECwwTQ2hp
bmEgVHJ1c3QgTmV0d29yazEoMCYGA1UEAwwfaVRydXNDaGluYSBDbGFzcyAyIFJv
b3QgQ0EgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOPPShpV
nJbMqqCw6Bz1kehnoPst9pkr0V9idOwU2oyS47/HjJXk9Rd5a9xfwkPO88trUpz5
4GmmwspDXjVFu9L0eFaRuH3KMha1Ak01citbF7cQLJlS7XI+tpkTGHEY5pt3EsQg
wykfZl/A1jrnSkspMS997r2Gim54cwz+mTMgDRhZsKK/lbOeBPpWtcFizjXYCqhw
WktvQfZBYi6o4sHCshnOswi4yV1p+LuFcQ2ciYdWvULh1eZhLxHbGXyznYHi0dGN
z+I9H8aXxqAQfHVhbdHNzi77hCxFjOy+hHrGsyzjrd2swVQ2iUWP8BfEQqGLqM1g
KgWKYfcTGdbPB1MCAwEAAaNjMGEwHQYDVR0OBBYEFG/oAMxTVe7y0+408CTAK8hA
uTyRMB8GA1UdIwQYMBaAFG/oAMxTVe7y0+408CTAK8hAuTyRMA8GA1UdEwEB/wQF
MAMBAf8wDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQBLnUTfW7hp
emMbuUGCk7RBswzOT83bDM6824EkUnf+X0iKS95SUNGeeSWK2o/3ALJo5hi7GZr3
U8eLaWAcYizfO99UXMRBPw5PRR+gXGEronGUugLpxsjuynoLQu8GQAeysSXKbN1I
UugDo9u8igJORYA+5ms0s5sCUySqbQ2R5z/GoceyI9LdxIVa1RjVX8pYOj8JFwtn
DJN3ftSFvNMYwRuILKuqUYSHc2GPYiHVflDh5nDymCMOQFcFG3WsEuB+EYQPFgIU
1DHmdZcz7Llx8UOZXX2JupWCYzK1XhJb+r4hK5ncf/w8qGtYlmyJpxk3hr1TfUJX
Yf4Zr0fJsGuv
-----END CERTIFICATE-----

View File

@ -0,0 +1,19 @@
-----BEGIN CERTIFICATE-----
MIIDmTCCAoGgAwIBAgIQICQSIV6QZN2y3Knbwe6r9TANBgkqhkiG9w0BAQsFADCBkTELMAkGA1UE
BhMCQ04xGzAZBgNVBAoMEkFudCBGaW5hbmNpYWwgdGVzdDElMCMGA1UECwwcQ2VydGlmaWNhdGlv
biBBdXRob3JpdHkgdGVzdDE+MDwGA1UEAww1QW50IEZpbmFuY2lhbCBDZXJ0aWZpY2F0aW9uIEF1
dGhvcml0eSBDbGFzcyAyIFIxIHRlc3QwHhcNMjQxMjIxMTEzOTMzWhcNMjUxMjI2MTEzOTMzWjBr
MQswCQYDVQQGEwJDTjEfMB0GA1UECgwWbXRxd253MTI4OUBzYW5kYm94LmNvbTEPMA0GA1UECwwG
QWxpcGF5MSowKAYDVQQDDCEyMDg4NzIxMDUzMjU3MTMyLTkwMjEwMDAxNDI2ODYzOTUwggEiMA0G
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCxJhoamnjWZGQp+1kHXTyQgA2va0rTQv8ZvFggERZv
fOg2i5RYTBFLB0J1l3hj+23iBqzRTgzPxCLUTZUrj6WgwdDbXi11eE2wltVwmDHI1r3YdLC6KCQN
Jpv6SKSHs9JV6UDpzsHaJbsoi6NymYpkbFClLCh3MOcyha9Ju4B9n5mKze1GEDTNcAs1nGfSsH1E
wAWoe65iVM8pbTXTzjbEW/jJc2xbFT9RPRTihflkEf6p3kOpaPtgFmcUqdJ4BsldL6iWqbdR5JhT
mVKT8hDmsbW9KpPnCXWedxBZHmNiuOOCOeDhHGV3zFrZvIPJa7umAL+eweg0egN5RHP9tDAnAgMB
AAGjEjAQMA4GA1UdDwEB/wQEAwIE8DANBgkqhkiG9w0BAQsFAAOCAQEANPJelQG99aAZb+KXUE3Z
ES+ZjPD9WwCBWpfcjyDq6duEQc9Qo0B2vW6EunbOi2qhS0dJ3pgJFaRrbi72BqQavT1eVYHcfXeC
y8I3dI7oxn5BS944oiGTzaYTx6dJ8lXDmlQO8ULz+6/wBCkhr6TgKbjIOh7p3/B9NPcfL5z6OrbQ
fXRk439uRfjWlzohE9q4cAY5AYnHLZCgbHwRX+YusDmJCu+LS9hioNHjwJ9t/jXsjzEQ09sfzEHF
uPGKS4JGmzwqGp2Ly68MCzp7WOgEFBexYUio4suzKlZUcv1+HDi6fEosZ6Fr7Z3CEMwKelq8m2l7
jg83G0PECp5unR1Hcw==
-----END CERTIFICATE-----

View File

@ -0,0 +1,91 @@
@{
string LowerFirstLetter(string text)
{
return text.ToString()[..1].ToLower() + text[1..]; // 首字母小写
}
var pkField = Model.TableField.Where(c => c.ColumnKey == "True").FirstOrDefault();
string pkFieldName = null;
if(pkField != null && !string.IsNullOrEmpty(pkField.PropertyName))
{
pkFieldName = LowerFirstLetter(pkField.PropertyName);
}
Dictionary<string, int> definedObjects = new Dictionary<string, int>();
bool haveLikeCdt = false;
foreach (var column in Model.TableField){
if (column.QueryWhether == "Y" && column.QueryType == "like"){
haveLikeCdt = true;
}
}
}
<template>
<div class="@(@Model.LowerClassName)-container">
<splitpanes horizontal class="default-theme">
<pane size="60" style="display: flex;flex-direction: column;">
<IndexList ref="indexListRef" @@list-click="handleIndexChange" />
</pane>
<pane size="40" style="display: flex; flex-direction: column;">
<el-tabs v-model="activeName" type="border-card"
style="height: 100%; padding: 0px; margin-bottom: 0px; position: relative">
<el-tab-pane label="属性1" name="1" style="height: 100%; margin-bottom: 0px; position: relative">
<@(@Model.BottomTab)Bottom ref="@(@Model.LowerBottomTab)BottomRef" @@list-click="handleBottomChange" />
</el-tab-pane>
<el-tab-pane label="属性2" name="2" style="height: 100%; margin-bottom: 0px; position: relative">
<div></div>
</el-tab-pane>
</el-tabs>
</pane>
</splitpanes>
</div>
</template>
<script lang="ts" setup name="@(@Model.LowerClassName)">
import { onMounted, reactive, ref } from 'vue';
import { ElMessageBox, ElMessage } from "element-plus";
import { Splitpanes, Pane } from 'splitpanes';
import 'splitpanes/dist/splitpanes.css';
import IndexList from '/@@/views/@(@Model.PagePath)/@(@Model.LowerClassName)/component/@(@Model.LowerClassName)List.vue';
import @(@Model.BottomTab)Bottom from '/@@/views/@(@Model.PagePath)/@(@Model.LowerBottomTab)/component/@(@Model.LowerBottomTab)List.vue';
const indexListRef = ref<InstanceType<typeof IndexList>>();
const @(@Model.LowerBottomTab)BottomRef = ref<InstanceType<typeof @(@Model.BottomTab)Bottom>>();
const activeName = ref('1');
// 变量
const state = reactive({
queryParams: {
searchKey: undefined,
@if(Model.QueryWhetherList.Count > 0) {
@foreach (var column in Model.QueryWhetherList) {
@:@(@column.LowerPropertyName): undefined,
}
}
},
});
// 页面初始化
onMounted(() => {
indexListRef.value?.listhandleQuery(state.queryParams);//列表控件初始化不请求数据,这里要请求一下
});
// 主表List组件点击
const handleIndexChange = async (row: any,column: any) => {
console.log('handleIndexChange--', JSON.stringify(row));
state.queryParams.@(@Model.LowerBottomKey) = row.@(@Model.LowerBottomPrimaryKey);//下关联字段=下表主表关联字段
console.log('handleIndexChange--', state.queryParams.@(@Model.LowerBottomKey));
await @(@Model.LowerBottomTab)BottomRef.value?.listhandleQuery(state.queryParams);
};
const handleBottomChange = async (row: any) => {
console.log('handleBottomChange--', JSON.stringify(row));
};
</script>
<style lang="scss" scoped>
:deep(.el-input),
:deep(.el-select),
:deep(.el-input-number) {
width: 100%;
}
:deep(.el-slider .el-input-number){
width: auto;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

@ -5,7 +5,6 @@
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
using Admin.NET.Core;
using Furion.ClayObject;
using Furion.DataEncryption;
using Furion.FriendlyException;
using Furion.JsonSerialization;
@ -73,7 +72,7 @@ public class SuperApiAop : DefaultSuperApiAop
var paths = api.Url.Split('/');
var actionName = paths[paths.Length - 1];
var apiInfo = Clay.Object(new
var apiInfo = new
{
requestUrl = api.Url,
httpMethod = api.HttpMethod,
@ -100,7 +99,7 @@ public class SuperApiAop : DefaultSuperApiAop
},
},
exception = aopContext.Exception == null ? null : JSON.Serialize(aopContext.Exception)
});
};
var logger = App.GetRequiredService<ILoggerFactory>().CreateLogger(CommonConst.SysLogCategoryName);
using var scope = logger.ScopeContext(new Dictionary<object, object> {

View File

@ -2,7 +2,7 @@
"name": "admin.net.pro",
"type": "module",
"version": "2.4.33",
"lastBuildTime": "2025.01.17",
"lastBuildTime": "2025.01.23",
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
"author": "zuohuaijun",
"license": "MIT",
@ -24,7 +24,7 @@
"@vue-office/docx": "^1.6.2",
"@vue-office/excel": "^1.7.14",
"@vue-office/pdf": "^2.0.9",
"@vueuse/core": "^12.4.0",
"@vueuse/core": "^12.5.0",
"@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^5.1.12",
"animate.css": "^4.1.1",
@ -51,7 +51,7 @@
"mqtt": "^5.10.3",
"nprogress": "^0.2.0",
"ol": "^10.3.1",
"pinia": "^2.3.0",
"pinia": "^2.3.1",
"print-js": "^1.6.0",
"push.js": "^1.0.12",
"qrcodejs2-fixes": "^0.0.2",
@ -74,7 +74,7 @@
"vue-router": "^4.5.0",
"vue-signature-pad": "^3.0.2",
"vue3-tree-org": "^4.2.2",
"vxe-pc-ui": "^4.3.75",
"vxe-pc-ui": "^4.3.78",
"vxe-table": "^4.10.0",
"vxe-table-plugin-element": "^4.0.4",
"vxe-table-plugin-export-xlsx": "^4.0.7",
@ -88,8 +88,8 @@
"@types/node": "^20.17.14",
"@types/nprogress": "^0.2.3",
"@types/sortablejs": "^1.15.8",
"@typescript-eslint/eslint-plugin": "^8.20.0",
"@typescript-eslint/parser": "^8.20.0",
"@typescript-eslint/eslint-plugin": "^8.21.0",
"@typescript-eslint/parser": "^8.21.0",
"@vitejs/plugin-vue": "^5.2.1",
"@vitejs/plugin-vue-jsx": "^4.1.1",
"@vue/compiler-sfc": "^3.5.13",
@ -97,13 +97,13 @@
"eslint": "^9.18.0",
"eslint-plugin-vue": "^9.32.0",
"globals": "^15.14.0",
"less": "^4.2.1",
"less": "^4.2.2",
"prettier": "^3.4.2",
"rollup-plugin-visualizer": "^5.14.0",
"sass": "^1.83.4",
"terser": "^5.37.0",
"typescript": "^5.7.3",
"vite": "^6.0.7",
"vite": "^6.0.11",
"vite-plugin-cdn-import": "^1.0.1",
"vite-plugin-compression2": "^1.3.3",
"vite-plugin-vue-setup-extend": "^0.4.0",

View File

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
export * from './apis/apijsonapi';
export * from './apis/alipay-api';
export * from './apis/sys-alipay-api';
export * from './apis/sys-auth-api';
export * from './apis/sys-cache-api';
export * from './apis/sys-code-gen-api';

View File

@ -21,10 +21,10 @@ import { AdminNETResultString } from '../models';
import { AlipayPreCreateInput } from '../models';
import { AlipayTradePagePayInput } from '../models';
/**
* AlipayApi - axios parameter creator
* SysAlipayApi - axios parameter creator
* @export
*/
export const AlipayApiAxiosParamCreator = function (configuration?: Configuration) {
export const SysAlipayApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
@ -33,8 +33,8 @@ export const AlipayApiAxiosParamCreator = function (configuration?: Configuratio
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiAlipayAlipayPreCreatePost: async (body?: AlipayPreCreateInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/alipay/alipayPreCreate`;
apiSysAlipayAlipayPreCreatePost: async (body?: AlipayPreCreateInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/sysAlipay/alipayPreCreate`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
@ -81,8 +81,8 @@ export const AlipayApiAxiosParamCreator = function (configuration?: Configuratio
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiAlipayAlipayTradePagePayPost: async (body?: AlipayTradePagePayInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/alipay/alipayTradePagePay`;
apiSysAlipayAlipayTradePagePayPost: async (body?: AlipayTradePagePayInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/sysAlipay/alipayTradePagePay`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
@ -130,8 +130,8 @@ export const AlipayApiAxiosParamCreator = function (configuration?: Configuratio
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiAlipayGetAuthInfoGet: async (userId?: string, authCode?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/alipay/getAuthInfo`;
apiSysAlipayAuthInfoGet: async (userId?: string, authCode?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/sysAlipay/authInfo`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
@ -152,11 +152,11 @@ export const AlipayApiAxiosParamCreator = function (configuration?: Configuratio
}
if (userId !== undefined) {
localVarQueryParameter['UserId'] = userId;
localVarQueryParameter['user_id'] = userId;
}
if (authCode !== undefined) {
localVarQueryParameter['AuthCode'] = authCode;
localVarQueryParameter['auth_code'] = authCode;
}
const query = new URLSearchParams(localVarUrlObj.search);
@ -181,8 +181,8 @@ export const AlipayApiAxiosParamCreator = function (configuration?: Configuratio
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiAlipayNotifyPost: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/alipay/notify`;
apiSysAlipayNotifyPost: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/sysAlipay/notify`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
@ -222,10 +222,10 @@ export const AlipayApiAxiosParamCreator = function (configuration?: Configuratio
};
/**
* AlipayApi - functional programming interface
* SysAlipayApi - functional programming interface
* @export
*/
export const AlipayApiFp = function(configuration?: Configuration) {
export const SysAlipayApiFp = function(configuration?: Configuration) {
return {
/**
*
@ -234,8 +234,8 @@ export const AlipayApiFp = function(configuration?: Configuration) {
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiAlipayAlipayPreCreatePost(body?: AlipayPreCreateInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultString>>> {
const localVarAxiosArgs = await AlipayApiAxiosParamCreator(configuration).apiAlipayAlipayPreCreatePost(body, options);
async apiSysAlipayAlipayPreCreatePost(body?: AlipayPreCreateInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultString>>> {
const localVarAxiosArgs = await SysAlipayApiAxiosParamCreator(configuration).apiSysAlipayAlipayPreCreatePost(body, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
@ -248,8 +248,8 @@ export const AlipayApiFp = function(configuration?: Configuration) {
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiAlipayAlipayTradePagePayPost(body?: AlipayTradePagePayInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultString>>> {
const localVarAxiosArgs = await AlipayApiAxiosParamCreator(configuration).apiAlipayAlipayTradePagePayPost(body, options);
async apiSysAlipayAlipayTradePagePayPost(body?: AlipayTradePagePayInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultString>>> {
const localVarAxiosArgs = await SysAlipayApiAxiosParamCreator(configuration).apiSysAlipayAlipayTradePagePayPost(body, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
@ -263,8 +263,8 @@ export const AlipayApiFp = function(configuration?: Configuration) {
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiAlipayGetAuthInfoGet(userId?: string, authCode?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
const localVarAxiosArgs = await AlipayApiAxiosParamCreator(configuration).apiAlipayGetAuthInfoGet(userId, authCode, options);
async apiSysAlipayAuthInfoGet(userId?: string, authCode?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
const localVarAxiosArgs = await SysAlipayApiAxiosParamCreator(configuration).apiSysAlipayAuthInfoGet(userId, authCode, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
@ -276,8 +276,8 @@ export const AlipayApiFp = function(configuration?: Configuration) {
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiAlipayNotifyPost(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultString>>> {
const localVarAxiosArgs = await AlipayApiAxiosParamCreator(configuration).apiAlipayNotifyPost(options);
async apiSysAlipayNotifyPost(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultString>>> {
const localVarAxiosArgs = await SysAlipayApiAxiosParamCreator(configuration).apiSysAlipayNotifyPost(options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
@ -287,10 +287,10 @@ export const AlipayApiFp = function(configuration?: Configuration) {
};
/**
* AlipayApi - factory interface
* SysAlipayApi - factory interface
* @export
*/
export const AlipayApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
export const SysAlipayApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
return {
/**
*
@ -299,8 +299,8 @@ export const AlipayApiFactory = function (configuration?: Configuration, basePat
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiAlipayAlipayPreCreatePost(body?: AlipayPreCreateInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultString>> {
return AlipayApiFp(configuration).apiAlipayAlipayPreCreatePost(body, options).then((request) => request(axios, basePath));
async apiSysAlipayAlipayPreCreatePost(body?: AlipayPreCreateInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultString>> {
return SysAlipayApiFp(configuration).apiSysAlipayAlipayPreCreatePost(body, options).then((request) => request(axios, basePath));
},
/**
*
@ -309,8 +309,8 @@ export const AlipayApiFactory = function (configuration?: Configuration, basePat
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiAlipayAlipayTradePagePayPost(body?: AlipayTradePagePayInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultString>> {
return AlipayApiFp(configuration).apiAlipayAlipayTradePagePayPost(body, options).then((request) => request(axios, basePath));
async apiSysAlipayAlipayTradePagePayPost(body?: AlipayTradePagePayInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultString>> {
return SysAlipayApiFp(configuration).apiSysAlipayAlipayTradePagePayPost(body, options).then((request) => request(axios, basePath));
},
/**
*
@ -320,8 +320,8 @@ export const AlipayApiFactory = function (configuration?: Configuration, basePat
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiAlipayGetAuthInfoGet(userId?: string, authCode?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
return AlipayApiFp(configuration).apiAlipayGetAuthInfoGet(userId, authCode, options).then((request) => request(axios, basePath));
async apiSysAlipayAuthInfoGet(userId?: string, authCode?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
return SysAlipayApiFp(configuration).apiSysAlipayAuthInfoGet(userId, authCode, options).then((request) => request(axios, basePath));
},
/**
*
@ -329,29 +329,29 @@ export const AlipayApiFactory = function (configuration?: Configuration, basePat
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiAlipayNotifyPost(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultString>> {
return AlipayApiFp(configuration).apiAlipayNotifyPost(options).then((request) => request(axios, basePath));
async apiSysAlipayNotifyPost(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultString>> {
return SysAlipayApiFp(configuration).apiSysAlipayNotifyPost(options).then((request) => request(axios, basePath));
},
};
};
/**
* AlipayApi - object-oriented interface
* SysAlipayApi - object-oriented interface
* @export
* @class AlipayApi
* @class SysAlipayApi
* @extends {BaseAPI}
*/
export class AlipayApi extends BaseAPI {
export class SysAlipayApi extends BaseAPI {
/**
*
* @summary 🔖
* @param {AlipayPreCreateInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AlipayApi
* @memberof SysAlipayApi
*/
public async apiAlipayAlipayPreCreatePost(body?: AlipayPreCreateInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultString>> {
return AlipayApiFp(this.configuration).apiAlipayAlipayPreCreatePost(body, options).then((request) => request(this.axios, this.basePath));
public async apiSysAlipayAlipayPreCreatePost(body?: AlipayPreCreateInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultString>> {
return SysAlipayApiFp(this.configuration).apiSysAlipayAlipayPreCreatePost(body, options).then((request) => request(this.axios, this.basePath));
}
/**
*
@ -359,10 +359,10 @@ export class AlipayApi extends BaseAPI {
* @param {AlipayTradePagePayInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AlipayApi
* @memberof SysAlipayApi
*/
public async apiAlipayAlipayTradePagePayPost(body?: AlipayTradePagePayInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultString>> {
return AlipayApiFp(this.configuration).apiAlipayAlipayTradePagePayPost(body, options).then((request) => request(this.axios, this.basePath));
public async apiSysAlipayAlipayTradePagePayPost(body?: AlipayTradePagePayInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultString>> {
return SysAlipayApiFp(this.configuration).apiSysAlipayAlipayTradePagePayPost(body, options).then((request) => request(this.axios, this.basePath));
}
/**
*
@ -371,19 +371,19 @@ export class AlipayApi extends BaseAPI {
* @param {string} [authCode]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AlipayApi
* @memberof SysAlipayApi
*/
public async apiAlipayGetAuthInfoGet(userId?: string, authCode?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
return AlipayApiFp(this.configuration).apiAlipayGetAuthInfoGet(userId, authCode, options).then((request) => request(this.axios, this.basePath));
public async apiSysAlipayAuthInfoGet(userId?: string, authCode?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
return SysAlipayApiFp(this.configuration).apiSysAlipayAuthInfoGet(userId, authCode, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 🔖
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AlipayApi
* @memberof SysAlipayApi
*/
public async apiAlipayNotifyPost(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultString>> {
return AlipayApiFp(this.configuration).apiAlipayNotifyPost(options).then((request) => request(this.axios, this.basePath));
public async apiSysAlipayNotifyPost(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultString>> {
return SysAlipayApiFp(this.configuration).apiSysAlipayNotifyPost(options).then((request) => request(this.axios, this.basePath));
}
}

View File

@ -17,9 +17,14 @@ import { Configuration } from '../configuration';
// Some imports not used depending on template conditions
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
import { AdminNETResultIEnumerableEntityInfo } from '../models';
import { AdminNETResultListCodeGenConfig } from '../models';
import { AdminNETResultListColumnOuput } from '../models';
import { AdminNETResultSysCodeGenConfig } from '../models';
import { CodeGenConfig } from '../models';
import { Filter } from '../models';
import { FilterLogicEnum } from '../models';
import { FilterOperatorEnum } from '../models';
import { VerifyRuleItem } from '../models';
/**
* SysCodeGenConfigApi - axios parameter creator
@ -27,6 +32,343 @@ import { VerifyRuleItem } from '../models';
*/
export const SysCodeGenConfigApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @summary
* @param {string} entityName
* @param {string} configId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSysCodeGenConfigColumnListEntityNameConfigIdGet: async (entityName: string, configId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'entityName' is not null or undefined
if (entityName === null || entityName === undefined) {
throw new RequiredError('entityName','Required parameter entityName was null or undefined when calling apiSysCodeGenConfigColumnListEntityNameConfigIdGet.');
}
// verify required parameter 'configId' is not null or undefined
if (configId === null || configId === undefined) {
throw new RequiredError('configId','Required parameter configId was null or undefined when calling apiSysCodeGenConfigColumnListEntityNameConfigIdGet.');
}
const localVarPath = `/api/sysCodeGenConfig/columnList/{entityName}/{configId}`
.replace(`{${"entityName"}}`, encodeURIComponent(String(entityName)))
.replace(`{${"configId"}}`, encodeURIComponent(String(configId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
// http bearer authentication required
if (configuration && configuration.accessToken) {
const accessToken = typeof configuration.accessToken === 'function'
? await configuration.accessToken()
: await configuration.accessToken;
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
}
const query = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
query.set(key, localVarQueryParameter[key]);
}
for (const key in options.params) {
query.set(key, options.params[key]);
}
localVarUrlObj.search = (new URLSearchParams(query)).toString();
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
*
* @summary
* @param {string} tableName
* @param {string} busName
* @param {string} nameSpace
* @param {string} authorName
* @param {string} generateType
* @param {boolean} generateMenu
* @param {boolean} [isApiService] 使 Api Service
* @param {Array<number>} [codeGenTemplateIds] Id集合
* @param {string} [leftTab]
* @param {string} [leftKey]
* @param {string} [leftPrimaryKey]
* @param {string} [leftName] Name
* @param {string} [bottomTab]
* @param {string} [bottomKey]
* @param {string} [bottomPrimaryKey]
* @param {string} [template]
* @param {string} [className]
* @param {string} [tablePrefix]
* @param {string} [configId]
* @param {string} [dbName] ()
* @param {string} [dbType]
* @param {string} [connectionString]
* @param {string} [treeName]
* @param {string} [tableComment]
* @param {string} [menuApplication]
* @param {number} [menuPid]
* @param {string} [menuIcon]
* @param {string} [pagePath]
* @param {string} [printType]
* @param {string} [printName]
* @param {number} [page]
* @param {number} [pageSize]
* @param {string} [field]
* @param {string} [order]
* @param {string} [descStr]
* @param {Array<string>} [searchFields]
* @param {string} [searchKeyword]
* @param {string} [keyword]
* @param {FilterLogicEnum} [filterLogic]
* @param {Array<Filter>} [filterFilters]
* @param {string} [filterField]
* @param {FilterOperatorEnum} [filterOperator]
* @param {any} [filterValue]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSysCodeGenConfigColumnListGet: async (tableName: string, busName: string, nameSpace: string, authorName: string, generateType: string, generateMenu: boolean, isApiService?: boolean, codeGenTemplateIds?: Array<number>, leftTab?: string, leftKey?: string, leftPrimaryKey?: string, leftName?: string, bottomTab?: string, bottomKey?: string, bottomPrimaryKey?: string, template?: string, className?: string, tablePrefix?: string, configId?: string, dbName?: string, dbType?: string, connectionString?: string, treeName?: string, tableComment?: string, menuApplication?: string, menuPid?: number, menuIcon?: string, pagePath?: string, printType?: string, printName?: string, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, searchFields?: Array<string>, searchKeyword?: string, keyword?: string, filterLogic?: FilterLogicEnum, filterFilters?: Array<Filter>, filterField?: string, filterOperator?: FilterOperatorEnum, filterValue?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'tableName' is not null or undefined
if (tableName === null || tableName === undefined) {
throw new RequiredError('tableName','Required parameter tableName was null or undefined when calling apiSysCodeGenConfigColumnListGet.');
}
// verify required parameter 'busName' is not null or undefined
if (busName === null || busName === undefined) {
throw new RequiredError('busName','Required parameter busName was null or undefined when calling apiSysCodeGenConfigColumnListGet.');
}
// verify required parameter 'nameSpace' is not null or undefined
if (nameSpace === null || nameSpace === undefined) {
throw new RequiredError('nameSpace','Required parameter nameSpace was null or undefined when calling apiSysCodeGenConfigColumnListGet.');
}
// verify required parameter 'authorName' is not null or undefined
if (authorName === null || authorName === undefined) {
throw new RequiredError('authorName','Required parameter authorName was null or undefined when calling apiSysCodeGenConfigColumnListGet.');
}
// verify required parameter 'generateType' is not null or undefined
if (generateType === null || generateType === undefined) {
throw new RequiredError('generateType','Required parameter generateType was null or undefined when calling apiSysCodeGenConfigColumnListGet.');
}
// verify required parameter 'generateMenu' is not null or undefined
if (generateMenu === null || generateMenu === undefined) {
throw new RequiredError('generateMenu','Required parameter generateMenu was null or undefined when calling apiSysCodeGenConfigColumnListGet.');
}
const localVarPath = `/api/sysCodeGenConfig/columnList`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
// http bearer authentication required
if (configuration && configuration.accessToken) {
const accessToken = typeof configuration.accessToken === 'function'
? await configuration.accessToken()
: await configuration.accessToken;
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
}
if (tableName !== undefined) {
localVarQueryParameter['TableName'] = tableName;
}
if (busName !== undefined) {
localVarQueryParameter['BusName'] = busName;
}
if (nameSpace !== undefined) {
localVarQueryParameter['NameSpace'] = nameSpace;
}
if (authorName !== undefined) {
localVarQueryParameter['AuthorName'] = authorName;
}
if (generateType !== undefined) {
localVarQueryParameter['GenerateType'] = generateType;
}
if (generateMenu !== undefined) {
localVarQueryParameter['GenerateMenu'] = generateMenu;
}
if (isApiService !== undefined) {
localVarQueryParameter['IsApiService'] = isApiService;
}
if (codeGenTemplateIds) {
localVarQueryParameter['CodeGenTemplateIds'] = codeGenTemplateIds;
}
if (leftTab !== undefined) {
localVarQueryParameter['LeftTab'] = leftTab;
}
if (leftKey !== undefined) {
localVarQueryParameter['LeftKey'] = leftKey;
}
if (leftPrimaryKey !== undefined) {
localVarQueryParameter['LeftPrimaryKey'] = leftPrimaryKey;
}
if (leftName !== undefined) {
localVarQueryParameter['LeftName'] = leftName;
}
if (bottomTab !== undefined) {
localVarQueryParameter['BottomTab'] = bottomTab;
}
if (bottomKey !== undefined) {
localVarQueryParameter['BottomKey'] = bottomKey;
}
if (bottomPrimaryKey !== undefined) {
localVarQueryParameter['BottomPrimaryKey'] = bottomPrimaryKey;
}
if (template !== undefined) {
localVarQueryParameter['Template'] = template;
}
if (className !== undefined) {
localVarQueryParameter['ClassName'] = className;
}
if (tablePrefix !== undefined) {
localVarQueryParameter['TablePrefix'] = tablePrefix;
}
if (configId !== undefined) {
localVarQueryParameter['ConfigId'] = configId;
}
if (dbName !== undefined) {
localVarQueryParameter['DbName'] = dbName;
}
if (dbType !== undefined) {
localVarQueryParameter['DbType'] = dbType;
}
if (connectionString !== undefined) {
localVarQueryParameter['ConnectionString'] = connectionString;
}
if (treeName !== undefined) {
localVarQueryParameter['TreeName'] = treeName;
}
if (tableComment !== undefined) {
localVarQueryParameter['TableComment'] = tableComment;
}
if (menuApplication !== undefined) {
localVarQueryParameter['MenuApplication'] = menuApplication;
}
if (menuPid !== undefined) {
localVarQueryParameter['MenuPid'] = menuPid;
}
if (menuIcon !== undefined) {
localVarQueryParameter['MenuIcon'] = menuIcon;
}
if (pagePath !== undefined) {
localVarQueryParameter['PagePath'] = pagePath;
}
if (printType !== undefined) {
localVarQueryParameter['PrintType'] = printType;
}
if (printName !== undefined) {
localVarQueryParameter['PrintName'] = printName;
}
if (page !== undefined) {
localVarQueryParameter['Page'] = page;
}
if (pageSize !== undefined) {
localVarQueryParameter['PageSize'] = pageSize;
}
if (field !== undefined) {
localVarQueryParameter['Field'] = field;
}
if (order !== undefined) {
localVarQueryParameter['Order'] = order;
}
if (descStr !== undefined) {
localVarQueryParameter['DescStr'] = descStr;
}
if (searchFields) {
localVarQueryParameter['Search.Fields'] = searchFields;
}
if (searchKeyword !== undefined) {
localVarQueryParameter['Search.Keyword'] = searchKeyword;
}
if (keyword !== undefined) {
localVarQueryParameter['Keyword'] = keyword;
}
if (filterLogic !== undefined) {
localVarQueryParameter['Filter.Logic'] = filterLogic;
}
if (filterFilters) {
localVarQueryParameter['Filter.Filters'] = filterFilters;
}
if (filterField !== undefined) {
localVarQueryParameter['Filter.Field'] = filterField;
}
if (filterOperator !== undefined) {
localVarQueryParameter['Filter.Operator'] = filterOperator;
}
if (filterValue !== undefined) {
localVarQueryParameter['Filter.Value'] = filterValue;
}
const query = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
query.set(key, localVarQueryParameter[key]);
}
for (const key in options.params) {
query.set(key, options.params[key]);
}
localVarUrlObj.search = (new URLSearchParams(query)).toString();
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
*
* @summary 🔖
@ -51,6 +393,7 @@ export const SysCodeGenConfigApiAxiosParamCreator = function (configuration?: Co
* @param {string} [whetherRetract]
* @param {string} [whetherRequired]
* @param {string} [whetherSortable]
* @param {string} [statistical]
* @param {string} [queryWhether]
* @param {string} [queryType]
* @param {string} [whetherTable]
@ -72,7 +415,7 @@ export const SysCodeGenConfigApiAxiosParamCreator = function (configuration?: Co
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSysCodeGenConfigDetailGet: async (id?: number, codeGenId?: number, columnName?: string, propertyName?: string, columnLength?: number, lowerPropertyName?: string, columnComment?: string, netType?: string, effectType?: string, fkConfigId?: string, fkEntityName?: string, fkTableName?: string, lowerFkEntityName?: string, fkColumnName?: string, fkLinkColumnName?: string, lowerFkColumnName?: string, fkColumnNetType?: string, dictTypeCode?: string, whetherRetract?: string, whetherRequired?: string, whetherSortable?: string, queryWhether?: string, queryType?: string, whetherTable?: string, whetherAddUpdate?: string, columnKey?: string, dataType?: string, whetherCommon?: string, tableNickName?: string, displayColumn?: string, valueColumn?: string, pidColumn?: string, orderNo?: number, rules?: string, defaultValue?: string, ruleItems?: Array<VerifyRuleItem>, remoteVerify?: boolean, anyRule?: boolean, trigger?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
apiSysCodeGenConfigDetailGet: async (id?: number, codeGenId?: number, columnName?: string, propertyName?: string, columnLength?: number, lowerPropertyName?: string, columnComment?: string, netType?: string, effectType?: string, fkConfigId?: string, fkEntityName?: string, fkTableName?: string, lowerFkEntityName?: string, fkColumnName?: string, fkLinkColumnName?: string, lowerFkColumnName?: string, fkColumnNetType?: string, dictTypeCode?: string, whetherRetract?: string, whetherRequired?: string, whetherSortable?: string, statistical?: string, queryWhether?: string, queryType?: string, whetherTable?: string, whetherAddUpdate?: string, columnKey?: string, dataType?: string, whetherCommon?: string, tableNickName?: string, displayColumn?: string, valueColumn?: string, pidColumn?: string, orderNo?: number, rules?: string, defaultValue?: string, ruleItems?: Array<VerifyRuleItem>, remoteVerify?: boolean, anyRule?: boolean, trigger?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/sysCodeGenConfig/detail`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
@ -177,6 +520,10 @@ export const SysCodeGenConfigApiAxiosParamCreator = function (configuration?: Co
localVarQueryParameter['WhetherSortable'] = whetherSortable;
}
if (statistical !== undefined) {
localVarQueryParameter['Statistical'] = statistical;
}
if (queryWhether !== undefined) {
localVarQueryParameter['QueryWhether'] = queryWhether;
}
@ -265,6 +612,55 @@ export const SysCodeGenConfigApiAxiosParamCreator = function (configuration?: Co
options: localVarRequestOptions,
};
},
/**
*
* @summary
* @param {boolean} excludeSysTable SysTable属性的表
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSysCodeGenConfigEntityInfosExcludeSysTableGet: async (excludeSysTable: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'excludeSysTable' is not null or undefined
if (excludeSysTable === null || excludeSysTable === undefined) {
throw new RequiredError('excludeSysTable','Required parameter excludeSysTable was null or undefined when calling apiSysCodeGenConfigEntityInfosExcludeSysTableGet.');
}
const localVarPath = `/api/sysCodeGenConfig/entityInfos/{excludeSysTable}`
.replace(`{${"excludeSysTable"}}`, encodeURIComponent(String(excludeSysTable)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
// http bearer authentication required
if (configuration && configuration.accessToken) {
const accessToken = typeof configuration.accessToken === 'function'
? await configuration.accessToken()
: await configuration.accessToken;
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
}
const query = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
query.set(key, localVarQueryParameter[key]);
}
for (const key in options.params) {
query.set(key, options.params[key]);
}
localVarUrlObj.search = (new URLSearchParams(query)).toString();
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
*
* @summary 🔖
@ -289,6 +685,7 @@ export const SysCodeGenConfigApiAxiosParamCreator = function (configuration?: Co
* @param {string} [whetherRetract]
* @param {string} [whetherRequired]
* @param {string} [whetherSortable]
* @param {string} [statistical]
* @param {string} [queryWhether]
* @param {string} [queryType]
* @param {string} [whetherTable]
@ -310,7 +707,7 @@ export const SysCodeGenConfigApiAxiosParamCreator = function (configuration?: Co
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSysCodeGenConfigListGet: async (id?: number, codeGenId?: number, columnName?: string, propertyName?: string, columnLength?: number, lowerPropertyName?: string, columnComment?: string, netType?: string, effectType?: string, fkConfigId?: string, fkEntityName?: string, fkTableName?: string, lowerFkEntityName?: string, fkColumnName?: string, fkLinkColumnName?: string, lowerFkColumnName?: string, fkColumnNetType?: string, dictTypeCode?: string, whetherRetract?: string, whetherRequired?: string, whetherSortable?: string, queryWhether?: string, queryType?: string, whetherTable?: string, whetherAddUpdate?: string, columnKey?: string, dataType?: string, whetherCommon?: string, tableNickName?: string, displayColumn?: string, valueColumn?: string, pidColumn?: string, orderNo?: number, rules?: string, defaultValue?: string, ruleItems?: Array<VerifyRuleItem>, remoteVerify?: boolean, anyRule?: boolean, trigger?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
apiSysCodeGenConfigListGet: async (id?: number, codeGenId?: number, columnName?: string, propertyName?: string, columnLength?: number, lowerPropertyName?: string, columnComment?: string, netType?: string, effectType?: string, fkConfigId?: string, fkEntityName?: string, fkTableName?: string, lowerFkEntityName?: string, fkColumnName?: string, fkLinkColumnName?: string, lowerFkColumnName?: string, fkColumnNetType?: string, dictTypeCode?: string, whetherRetract?: string, whetherRequired?: string, whetherSortable?: string, statistical?: string, queryWhether?: string, queryType?: string, whetherTable?: string, whetherAddUpdate?: string, columnKey?: string, dataType?: string, whetherCommon?: string, tableNickName?: string, displayColumn?: string, valueColumn?: string, pidColumn?: string, orderNo?: number, rules?: string, defaultValue?: string, ruleItems?: Array<VerifyRuleItem>, remoteVerify?: boolean, anyRule?: boolean, trigger?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/sysCodeGenConfig/list`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
@ -415,6 +812,10 @@ export const SysCodeGenConfigApiAxiosParamCreator = function (configuration?: Co
localVarQueryParameter['WhetherSortable'] = whetherSortable;
}
if (statistical !== undefined) {
localVarQueryParameter['Statistical'] = statistical;
}
if (queryWhether !== undefined) {
localVarQueryParameter['QueryWhether'] = queryWhether;
}
@ -560,6 +961,77 @@ export const SysCodeGenConfigApiAxiosParamCreator = function (configuration?: Co
*/
export const SysCodeGenConfigApiFp = function(configuration?: Configuration) {
return {
/**
*
* @summary
* @param {string} entityName
* @param {string} configId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysCodeGenConfigColumnListEntityNameConfigIdGet(entityName: string, configId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListColumnOuput>>> {
const localVarAxiosArgs = await SysCodeGenConfigApiAxiosParamCreator(configuration).apiSysCodeGenConfigColumnListEntityNameConfigIdGet(entityName, configId, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary
* @param {string} tableName
* @param {string} busName
* @param {string} nameSpace
* @param {string} authorName
* @param {string} generateType
* @param {boolean} generateMenu
* @param {boolean} [isApiService] 使 Api Service
* @param {Array<number>} [codeGenTemplateIds] Id集合
* @param {string} [leftTab]
* @param {string} [leftKey]
* @param {string} [leftPrimaryKey]
* @param {string} [leftName] Name
* @param {string} [bottomTab]
* @param {string} [bottomKey]
* @param {string} [bottomPrimaryKey]
* @param {string} [template]
* @param {string} [className]
* @param {string} [tablePrefix]
* @param {string} [configId]
* @param {string} [dbName] ()
* @param {string} [dbType]
* @param {string} [connectionString]
* @param {string} [treeName]
* @param {string} [tableComment]
* @param {string} [menuApplication]
* @param {number} [menuPid]
* @param {string} [menuIcon]
* @param {string} [pagePath]
* @param {string} [printType]
* @param {string} [printName]
* @param {number} [page]
* @param {number} [pageSize]
* @param {string} [field]
* @param {string} [order]
* @param {string} [descStr]
* @param {Array<string>} [searchFields]
* @param {string} [searchKeyword]
* @param {string} [keyword]
* @param {FilterLogicEnum} [filterLogic]
* @param {Array<Filter>} [filterFilters]
* @param {string} [filterField]
* @param {FilterOperatorEnum} [filterOperator]
* @param {any} [filterValue]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysCodeGenConfigColumnListGet(tableName: string, busName: string, nameSpace: string, authorName: string, generateType: string, generateMenu: boolean, isApiService?: boolean, codeGenTemplateIds?: Array<number>, leftTab?: string, leftKey?: string, leftPrimaryKey?: string, leftName?: string, bottomTab?: string, bottomKey?: string, bottomPrimaryKey?: string, template?: string, className?: string, tablePrefix?: string, configId?: string, dbName?: string, dbType?: string, connectionString?: string, treeName?: string, tableComment?: string, menuApplication?: string, menuPid?: number, menuIcon?: string, pagePath?: string, printType?: string, printName?: string, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, searchFields?: Array<string>, searchKeyword?: string, keyword?: string, filterLogic?: FilterLogicEnum, filterFilters?: Array<Filter>, filterField?: string, filterOperator?: FilterOperatorEnum, filterValue?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListColumnOuput>>> {
const localVarAxiosArgs = await SysCodeGenConfigApiAxiosParamCreator(configuration).apiSysCodeGenConfigColumnListGet(tableName, busName, nameSpace, authorName, generateType, generateMenu, isApiService, codeGenTemplateIds, leftTab, leftKey, leftPrimaryKey, leftName, bottomTab, bottomKey, bottomPrimaryKey, template, className, tablePrefix, configId, dbName, dbType, connectionString, treeName, tableComment, menuApplication, menuPid, menuIcon, pagePath, printType, printName, page, pageSize, field, order, descStr, searchFields, searchKeyword, keyword, filterLogic, filterFilters, filterField, filterOperator, filterValue, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary 🔖
@ -584,6 +1056,7 @@ export const SysCodeGenConfigApiFp = function(configuration?: Configuration) {
* @param {string} [whetherRetract]
* @param {string} [whetherRequired]
* @param {string} [whetherSortable]
* @param {string} [statistical]
* @param {string} [queryWhether]
* @param {string} [queryType]
* @param {string} [whetherTable]
@ -605,8 +1078,22 @@ export const SysCodeGenConfigApiFp = function(configuration?: Configuration) {
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysCodeGenConfigDetailGet(id?: number, codeGenId?: number, columnName?: string, propertyName?: string, columnLength?: number, lowerPropertyName?: string, columnComment?: string, netType?: string, effectType?: string, fkConfigId?: string, fkEntityName?: string, fkTableName?: string, lowerFkEntityName?: string, fkColumnName?: string, fkLinkColumnName?: string, lowerFkColumnName?: string, fkColumnNetType?: string, dictTypeCode?: string, whetherRetract?: string, whetherRequired?: string, whetherSortable?: string, queryWhether?: string, queryType?: string, whetherTable?: string, whetherAddUpdate?: string, columnKey?: string, dataType?: string, whetherCommon?: string, tableNickName?: string, displayColumn?: string, valueColumn?: string, pidColumn?: string, orderNo?: number, rules?: string, defaultValue?: string, ruleItems?: Array<VerifyRuleItem>, remoteVerify?: boolean, anyRule?: boolean, trigger?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultSysCodeGenConfig>>> {
const localVarAxiosArgs = await SysCodeGenConfigApiAxiosParamCreator(configuration).apiSysCodeGenConfigDetailGet(id, codeGenId, columnName, propertyName, columnLength, lowerPropertyName, columnComment, netType, effectType, fkConfigId, fkEntityName, fkTableName, lowerFkEntityName, fkColumnName, fkLinkColumnName, lowerFkColumnName, fkColumnNetType, dictTypeCode, whetherRetract, whetherRequired, whetherSortable, queryWhether, queryType, whetherTable, whetherAddUpdate, columnKey, dataType, whetherCommon, tableNickName, displayColumn, valueColumn, pidColumn, orderNo, rules, defaultValue, ruleItems, remoteVerify, anyRule, trigger, options);
async apiSysCodeGenConfigDetailGet(id?: number, codeGenId?: number, columnName?: string, propertyName?: string, columnLength?: number, lowerPropertyName?: string, columnComment?: string, netType?: string, effectType?: string, fkConfigId?: string, fkEntityName?: string, fkTableName?: string, lowerFkEntityName?: string, fkColumnName?: string, fkLinkColumnName?: string, lowerFkColumnName?: string, fkColumnNetType?: string, dictTypeCode?: string, whetherRetract?: string, whetherRequired?: string, whetherSortable?: string, statistical?: string, queryWhether?: string, queryType?: string, whetherTable?: string, whetherAddUpdate?: string, columnKey?: string, dataType?: string, whetherCommon?: string, tableNickName?: string, displayColumn?: string, valueColumn?: string, pidColumn?: string, orderNo?: number, rules?: string, defaultValue?: string, ruleItems?: Array<VerifyRuleItem>, remoteVerify?: boolean, anyRule?: boolean, trigger?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultSysCodeGenConfig>>> {
const localVarAxiosArgs = await SysCodeGenConfigApiAxiosParamCreator(configuration).apiSysCodeGenConfigDetailGet(id, codeGenId, columnName, propertyName, columnLength, lowerPropertyName, columnComment, netType, effectType, fkConfigId, fkEntityName, fkTableName, lowerFkEntityName, fkColumnName, fkLinkColumnName, lowerFkColumnName, fkColumnNetType, dictTypeCode, whetherRetract, whetherRequired, whetherSortable, statistical, queryWhether, queryType, whetherTable, whetherAddUpdate, columnKey, dataType, whetherCommon, tableNickName, displayColumn, valueColumn, pidColumn, orderNo, rules, defaultValue, ruleItems, remoteVerify, anyRule, trigger, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary
* @param {boolean} excludeSysTable SysTable属性的表
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysCodeGenConfigEntityInfosExcludeSysTableGet(excludeSysTable: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultIEnumerableEntityInfo>>> {
const localVarAxiosArgs = await SysCodeGenConfigApiAxiosParamCreator(configuration).apiSysCodeGenConfigEntityInfosExcludeSysTableGet(excludeSysTable, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
@ -636,6 +1123,7 @@ export const SysCodeGenConfigApiFp = function(configuration?: Configuration) {
* @param {string} [whetherRetract]
* @param {string} [whetherRequired]
* @param {string} [whetherSortable]
* @param {string} [statistical]
* @param {string} [queryWhether]
* @param {string} [queryType]
* @param {string} [whetherTable]
@ -657,8 +1145,8 @@ export const SysCodeGenConfigApiFp = function(configuration?: Configuration) {
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysCodeGenConfigListGet(id?: number, codeGenId?: number, columnName?: string, propertyName?: string, columnLength?: number, lowerPropertyName?: string, columnComment?: string, netType?: string, effectType?: string, fkConfigId?: string, fkEntityName?: string, fkTableName?: string, lowerFkEntityName?: string, fkColumnName?: string, fkLinkColumnName?: string, lowerFkColumnName?: string, fkColumnNetType?: string, dictTypeCode?: string, whetherRetract?: string, whetherRequired?: string, whetherSortable?: string, queryWhether?: string, queryType?: string, whetherTable?: string, whetherAddUpdate?: string, columnKey?: string, dataType?: string, whetherCommon?: string, tableNickName?: string, displayColumn?: string, valueColumn?: string, pidColumn?: string, orderNo?: number, rules?: string, defaultValue?: string, ruleItems?: Array<VerifyRuleItem>, remoteVerify?: boolean, anyRule?: boolean, trigger?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListCodeGenConfig>>> {
const localVarAxiosArgs = await SysCodeGenConfigApiAxiosParamCreator(configuration).apiSysCodeGenConfigListGet(id, codeGenId, columnName, propertyName, columnLength, lowerPropertyName, columnComment, netType, effectType, fkConfigId, fkEntityName, fkTableName, lowerFkEntityName, fkColumnName, fkLinkColumnName, lowerFkColumnName, fkColumnNetType, dictTypeCode, whetherRetract, whetherRequired, whetherSortable, queryWhether, queryType, whetherTable, whetherAddUpdate, columnKey, dataType, whetherCommon, tableNickName, displayColumn, valueColumn, pidColumn, orderNo, rules, defaultValue, ruleItems, remoteVerify, anyRule, trigger, options);
async apiSysCodeGenConfigListGet(id?: number, codeGenId?: number, columnName?: string, propertyName?: string, columnLength?: number, lowerPropertyName?: string, columnComment?: string, netType?: string, effectType?: string, fkConfigId?: string, fkEntityName?: string, fkTableName?: string, lowerFkEntityName?: string, fkColumnName?: string, fkLinkColumnName?: string, lowerFkColumnName?: string, fkColumnNetType?: string, dictTypeCode?: string, whetherRetract?: string, whetherRequired?: string, whetherSortable?: string, statistical?: string, queryWhether?: string, queryType?: string, whetherTable?: string, whetherAddUpdate?: string, columnKey?: string, dataType?: string, whetherCommon?: string, tableNickName?: string, displayColumn?: string, valueColumn?: string, pidColumn?: string, orderNo?: number, rules?: string, defaultValue?: string, ruleItems?: Array<VerifyRuleItem>, remoteVerify?: boolean, anyRule?: boolean, trigger?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListCodeGenConfig>>> {
const localVarAxiosArgs = await SysCodeGenConfigApiAxiosParamCreator(configuration).apiSysCodeGenConfigListGet(id, codeGenId, columnName, propertyName, columnLength, lowerPropertyName, columnComment, netType, effectType, fkConfigId, fkEntityName, fkTableName, lowerFkEntityName, fkColumnName, fkLinkColumnName, lowerFkColumnName, fkColumnNetType, dictTypeCode, whetherRetract, whetherRequired, whetherSortable, statistical, queryWhether, queryType, whetherTable, whetherAddUpdate, columnKey, dataType, whetherCommon, tableNickName, displayColumn, valueColumn, pidColumn, orderNo, rules, defaultValue, ruleItems, remoteVerify, anyRule, trigger, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
@ -687,6 +1175,69 @@ export const SysCodeGenConfigApiFp = function(configuration?: Configuration) {
*/
export const SysCodeGenConfigApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
return {
/**
*
* @summary
* @param {string} entityName
* @param {string} configId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysCodeGenConfigColumnListEntityNameConfigIdGet(entityName: string, configId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListColumnOuput>> {
return SysCodeGenConfigApiFp(configuration).apiSysCodeGenConfigColumnListEntityNameConfigIdGet(entityName, configId, options).then((request) => request(axios, basePath));
},
/**
*
* @summary
* @param {string} tableName
* @param {string} busName
* @param {string} nameSpace
* @param {string} authorName
* @param {string} generateType
* @param {boolean} generateMenu
* @param {boolean} [isApiService] 使 Api Service
* @param {Array<number>} [codeGenTemplateIds] Id集合
* @param {string} [leftTab]
* @param {string} [leftKey]
* @param {string} [leftPrimaryKey]
* @param {string} [leftName] Name
* @param {string} [bottomTab]
* @param {string} [bottomKey]
* @param {string} [bottomPrimaryKey]
* @param {string} [template]
* @param {string} [className]
* @param {string} [tablePrefix]
* @param {string} [configId]
* @param {string} [dbName] ()
* @param {string} [dbType]
* @param {string} [connectionString]
* @param {string} [treeName]
* @param {string} [tableComment]
* @param {string} [menuApplication]
* @param {number} [menuPid]
* @param {string} [menuIcon]
* @param {string} [pagePath]
* @param {string} [printType]
* @param {string} [printName]
* @param {number} [page]
* @param {number} [pageSize]
* @param {string} [field]
* @param {string} [order]
* @param {string} [descStr]
* @param {Array<string>} [searchFields]
* @param {string} [searchKeyword]
* @param {string} [keyword]
* @param {FilterLogicEnum} [filterLogic]
* @param {Array<Filter>} [filterFilters]
* @param {string} [filterField]
* @param {FilterOperatorEnum} [filterOperator]
* @param {any} [filterValue]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysCodeGenConfigColumnListGet(tableName: string, busName: string, nameSpace: string, authorName: string, generateType: string, generateMenu: boolean, isApiService?: boolean, codeGenTemplateIds?: Array<number>, leftTab?: string, leftKey?: string, leftPrimaryKey?: string, leftName?: string, bottomTab?: string, bottomKey?: string, bottomPrimaryKey?: string, template?: string, className?: string, tablePrefix?: string, configId?: string, dbName?: string, dbType?: string, connectionString?: string, treeName?: string, tableComment?: string, menuApplication?: string, menuPid?: number, menuIcon?: string, pagePath?: string, printType?: string, printName?: string, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, searchFields?: Array<string>, searchKeyword?: string, keyword?: string, filterLogic?: FilterLogicEnum, filterFilters?: Array<Filter>, filterField?: string, filterOperator?: FilterOperatorEnum, filterValue?: any, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListColumnOuput>> {
return SysCodeGenConfigApiFp(configuration).apiSysCodeGenConfigColumnListGet(tableName, busName, nameSpace, authorName, generateType, generateMenu, isApiService, codeGenTemplateIds, leftTab, leftKey, leftPrimaryKey, leftName, bottomTab, bottomKey, bottomPrimaryKey, template, className, tablePrefix, configId, dbName, dbType, connectionString, treeName, tableComment, menuApplication, menuPid, menuIcon, pagePath, printType, printName, page, pageSize, field, order, descStr, searchFields, searchKeyword, keyword, filterLogic, filterFilters, filterField, filterOperator, filterValue, options).then((request) => request(axios, basePath));
},
/**
*
* @summary 🔖
@ -711,6 +1262,7 @@ export const SysCodeGenConfigApiFactory = function (configuration?: Configuratio
* @param {string} [whetherRetract]
* @param {string} [whetherRequired]
* @param {string} [whetherSortable]
* @param {string} [statistical]
* @param {string} [queryWhether]
* @param {string} [queryType]
* @param {string} [whetherTable]
@ -732,8 +1284,18 @@ export const SysCodeGenConfigApiFactory = function (configuration?: Configuratio
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysCodeGenConfigDetailGet(id?: number, codeGenId?: number, columnName?: string, propertyName?: string, columnLength?: number, lowerPropertyName?: string, columnComment?: string, netType?: string, effectType?: string, fkConfigId?: string, fkEntityName?: string, fkTableName?: string, lowerFkEntityName?: string, fkColumnName?: string, fkLinkColumnName?: string, lowerFkColumnName?: string, fkColumnNetType?: string, dictTypeCode?: string, whetherRetract?: string, whetherRequired?: string, whetherSortable?: string, queryWhether?: string, queryType?: string, whetherTable?: string, whetherAddUpdate?: string, columnKey?: string, dataType?: string, whetherCommon?: string, tableNickName?: string, displayColumn?: string, valueColumn?: string, pidColumn?: string, orderNo?: number, rules?: string, defaultValue?: string, ruleItems?: Array<VerifyRuleItem>, remoteVerify?: boolean, anyRule?: boolean, trigger?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultSysCodeGenConfig>> {
return SysCodeGenConfigApiFp(configuration).apiSysCodeGenConfigDetailGet(id, codeGenId, columnName, propertyName, columnLength, lowerPropertyName, columnComment, netType, effectType, fkConfigId, fkEntityName, fkTableName, lowerFkEntityName, fkColumnName, fkLinkColumnName, lowerFkColumnName, fkColumnNetType, dictTypeCode, whetherRetract, whetherRequired, whetherSortable, queryWhether, queryType, whetherTable, whetherAddUpdate, columnKey, dataType, whetherCommon, tableNickName, displayColumn, valueColumn, pidColumn, orderNo, rules, defaultValue, ruleItems, remoteVerify, anyRule, trigger, options).then((request) => request(axios, basePath));
async apiSysCodeGenConfigDetailGet(id?: number, codeGenId?: number, columnName?: string, propertyName?: string, columnLength?: number, lowerPropertyName?: string, columnComment?: string, netType?: string, effectType?: string, fkConfigId?: string, fkEntityName?: string, fkTableName?: string, lowerFkEntityName?: string, fkColumnName?: string, fkLinkColumnName?: string, lowerFkColumnName?: string, fkColumnNetType?: string, dictTypeCode?: string, whetherRetract?: string, whetherRequired?: string, whetherSortable?: string, statistical?: string, queryWhether?: string, queryType?: string, whetherTable?: string, whetherAddUpdate?: string, columnKey?: string, dataType?: string, whetherCommon?: string, tableNickName?: string, displayColumn?: string, valueColumn?: string, pidColumn?: string, orderNo?: number, rules?: string, defaultValue?: string, ruleItems?: Array<VerifyRuleItem>, remoteVerify?: boolean, anyRule?: boolean, trigger?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultSysCodeGenConfig>> {
return SysCodeGenConfigApiFp(configuration).apiSysCodeGenConfigDetailGet(id, codeGenId, columnName, propertyName, columnLength, lowerPropertyName, columnComment, netType, effectType, fkConfigId, fkEntityName, fkTableName, lowerFkEntityName, fkColumnName, fkLinkColumnName, lowerFkColumnName, fkColumnNetType, dictTypeCode, whetherRetract, whetherRequired, whetherSortable, statistical, queryWhether, queryType, whetherTable, whetherAddUpdate, columnKey, dataType, whetherCommon, tableNickName, displayColumn, valueColumn, pidColumn, orderNo, rules, defaultValue, ruleItems, remoteVerify, anyRule, trigger, options).then((request) => request(axios, basePath));
},
/**
*
* @summary
* @param {boolean} excludeSysTable SysTable属性的表
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysCodeGenConfigEntityInfosExcludeSysTableGet(excludeSysTable: boolean, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultIEnumerableEntityInfo>> {
return SysCodeGenConfigApiFp(configuration).apiSysCodeGenConfigEntityInfosExcludeSysTableGet(excludeSysTable, options).then((request) => request(axios, basePath));
},
/**
*
@ -759,6 +1321,7 @@ export const SysCodeGenConfigApiFactory = function (configuration?: Configuratio
* @param {string} [whetherRetract]
* @param {string} [whetherRequired]
* @param {string} [whetherSortable]
* @param {string} [statistical]
* @param {string} [queryWhether]
* @param {string} [queryType]
* @param {string} [whetherTable]
@ -780,8 +1343,8 @@ export const SysCodeGenConfigApiFactory = function (configuration?: Configuratio
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysCodeGenConfigListGet(id?: number, codeGenId?: number, columnName?: string, propertyName?: string, columnLength?: number, lowerPropertyName?: string, columnComment?: string, netType?: string, effectType?: string, fkConfigId?: string, fkEntityName?: string, fkTableName?: string, lowerFkEntityName?: string, fkColumnName?: string, fkLinkColumnName?: string, lowerFkColumnName?: string, fkColumnNetType?: string, dictTypeCode?: string, whetherRetract?: string, whetherRequired?: string, whetherSortable?: string, queryWhether?: string, queryType?: string, whetherTable?: string, whetherAddUpdate?: string, columnKey?: string, dataType?: string, whetherCommon?: string, tableNickName?: string, displayColumn?: string, valueColumn?: string, pidColumn?: string, orderNo?: number, rules?: string, defaultValue?: string, ruleItems?: Array<VerifyRuleItem>, remoteVerify?: boolean, anyRule?: boolean, trigger?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListCodeGenConfig>> {
return SysCodeGenConfigApiFp(configuration).apiSysCodeGenConfigListGet(id, codeGenId, columnName, propertyName, columnLength, lowerPropertyName, columnComment, netType, effectType, fkConfigId, fkEntityName, fkTableName, lowerFkEntityName, fkColumnName, fkLinkColumnName, lowerFkColumnName, fkColumnNetType, dictTypeCode, whetherRetract, whetherRequired, whetherSortable, queryWhether, queryType, whetherTable, whetherAddUpdate, columnKey, dataType, whetherCommon, tableNickName, displayColumn, valueColumn, pidColumn, orderNo, rules, defaultValue, ruleItems, remoteVerify, anyRule, trigger, options).then((request) => request(axios, basePath));
async apiSysCodeGenConfigListGet(id?: number, codeGenId?: number, columnName?: string, propertyName?: string, columnLength?: number, lowerPropertyName?: string, columnComment?: string, netType?: string, effectType?: string, fkConfigId?: string, fkEntityName?: string, fkTableName?: string, lowerFkEntityName?: string, fkColumnName?: string, fkLinkColumnName?: string, lowerFkColumnName?: string, fkColumnNetType?: string, dictTypeCode?: string, whetherRetract?: string, whetherRequired?: string, whetherSortable?: string, statistical?: string, queryWhether?: string, queryType?: string, whetherTable?: string, whetherAddUpdate?: string, columnKey?: string, dataType?: string, whetherCommon?: string, tableNickName?: string, displayColumn?: string, valueColumn?: string, pidColumn?: string, orderNo?: number, rules?: string, defaultValue?: string, ruleItems?: Array<VerifyRuleItem>, remoteVerify?: boolean, anyRule?: boolean, trigger?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListCodeGenConfig>> {
return SysCodeGenConfigApiFp(configuration).apiSysCodeGenConfigListGet(id, codeGenId, columnName, propertyName, columnLength, lowerPropertyName, columnComment, netType, effectType, fkConfigId, fkEntityName, fkTableName, lowerFkEntityName, fkColumnName, fkLinkColumnName, lowerFkColumnName, fkColumnNetType, dictTypeCode, whetherRetract, whetherRequired, whetherSortable, statistical, queryWhether, queryType, whetherTable, whetherAddUpdate, columnKey, dataType, whetherCommon, tableNickName, displayColumn, valueColumn, pidColumn, orderNo, rules, defaultValue, ruleItems, remoteVerify, anyRule, trigger, options).then((request) => request(axios, basePath));
},
/**
*
@ -803,6 +1366,71 @@ export const SysCodeGenConfigApiFactory = function (configuration?: Configuratio
* @extends {BaseAPI}
*/
export class SysCodeGenConfigApi extends BaseAPI {
/**
*
* @summary
* @param {string} entityName
* @param {string} configId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SysCodeGenConfigApi
*/
public async apiSysCodeGenConfigColumnListEntityNameConfigIdGet(entityName: string, configId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListColumnOuput>> {
return SysCodeGenConfigApiFp(this.configuration).apiSysCodeGenConfigColumnListEntityNameConfigIdGet(entityName, configId, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary
* @param {string} tableName
* @param {string} busName
* @param {string} nameSpace
* @param {string} authorName
* @param {string} generateType
* @param {boolean} generateMenu
* @param {boolean} [isApiService] 使 Api Service
* @param {Array<number>} [codeGenTemplateIds] Id集合
* @param {string} [leftTab]
* @param {string} [leftKey]
* @param {string} [leftPrimaryKey]
* @param {string} [leftName] Name
* @param {string} [bottomTab]
* @param {string} [bottomKey]
* @param {string} [bottomPrimaryKey]
* @param {string} [template]
* @param {string} [className]
* @param {string} [tablePrefix]
* @param {string} [configId]
* @param {string} [dbName] ()
* @param {string} [dbType]
* @param {string} [connectionString]
* @param {string} [treeName]
* @param {string} [tableComment]
* @param {string} [menuApplication]
* @param {number} [menuPid]
* @param {string} [menuIcon]
* @param {string} [pagePath]
* @param {string} [printType]
* @param {string} [printName]
* @param {number} [page]
* @param {number} [pageSize]
* @param {string} [field]
* @param {string} [order]
* @param {string} [descStr]
* @param {Array<string>} [searchFields]
* @param {string} [searchKeyword]
* @param {string} [keyword]
* @param {FilterLogicEnum} [filterLogic]
* @param {Array<Filter>} [filterFilters]
* @param {string} [filterField]
* @param {FilterOperatorEnum} [filterOperator]
* @param {any} [filterValue]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SysCodeGenConfigApi
*/
public async apiSysCodeGenConfigColumnListGet(tableName: string, busName: string, nameSpace: string, authorName: string, generateType: string, generateMenu: boolean, isApiService?: boolean, codeGenTemplateIds?: Array<number>, leftTab?: string, leftKey?: string, leftPrimaryKey?: string, leftName?: string, bottomTab?: string, bottomKey?: string, bottomPrimaryKey?: string, template?: string, className?: string, tablePrefix?: string, configId?: string, dbName?: string, dbType?: string, connectionString?: string, treeName?: string, tableComment?: string, menuApplication?: string, menuPid?: number, menuIcon?: string, pagePath?: string, printType?: string, printName?: string, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, searchFields?: Array<string>, searchKeyword?: string, keyword?: string, filterLogic?: FilterLogicEnum, filterFilters?: Array<Filter>, filterField?: string, filterOperator?: FilterOperatorEnum, filterValue?: any, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListColumnOuput>> {
return SysCodeGenConfigApiFp(this.configuration).apiSysCodeGenConfigColumnListGet(tableName, busName, nameSpace, authorName, generateType, generateMenu, isApiService, codeGenTemplateIds, leftTab, leftKey, leftPrimaryKey, leftName, bottomTab, bottomKey, bottomPrimaryKey, template, className, tablePrefix, configId, dbName, dbType, connectionString, treeName, tableComment, menuApplication, menuPid, menuIcon, pagePath, printType, printName, page, pageSize, field, order, descStr, searchFields, searchKeyword, keyword, filterLogic, filterFilters, filterField, filterOperator, filterValue, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 🔖
@ -827,6 +1455,7 @@ export class SysCodeGenConfigApi extends BaseAPI {
* @param {string} [whetherRetract]
* @param {string} [whetherRequired]
* @param {string} [whetherSortable]
* @param {string} [statistical]
* @param {string} [queryWhether]
* @param {string} [queryType]
* @param {string} [whetherTable]
@ -849,8 +1478,19 @@ export class SysCodeGenConfigApi extends BaseAPI {
* @throws {RequiredError}
* @memberof SysCodeGenConfigApi
*/
public async apiSysCodeGenConfigDetailGet(id?: number, codeGenId?: number, columnName?: string, propertyName?: string, columnLength?: number, lowerPropertyName?: string, columnComment?: string, netType?: string, effectType?: string, fkConfigId?: string, fkEntityName?: string, fkTableName?: string, lowerFkEntityName?: string, fkColumnName?: string, fkLinkColumnName?: string, lowerFkColumnName?: string, fkColumnNetType?: string, dictTypeCode?: string, whetherRetract?: string, whetherRequired?: string, whetherSortable?: string, queryWhether?: string, queryType?: string, whetherTable?: string, whetherAddUpdate?: string, columnKey?: string, dataType?: string, whetherCommon?: string, tableNickName?: string, displayColumn?: string, valueColumn?: string, pidColumn?: string, orderNo?: number, rules?: string, defaultValue?: string, ruleItems?: Array<VerifyRuleItem>, remoteVerify?: boolean, anyRule?: boolean, trigger?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultSysCodeGenConfig>> {
return SysCodeGenConfigApiFp(this.configuration).apiSysCodeGenConfigDetailGet(id, codeGenId, columnName, propertyName, columnLength, lowerPropertyName, columnComment, netType, effectType, fkConfigId, fkEntityName, fkTableName, lowerFkEntityName, fkColumnName, fkLinkColumnName, lowerFkColumnName, fkColumnNetType, dictTypeCode, whetherRetract, whetherRequired, whetherSortable, queryWhether, queryType, whetherTable, whetherAddUpdate, columnKey, dataType, whetherCommon, tableNickName, displayColumn, valueColumn, pidColumn, orderNo, rules, defaultValue, ruleItems, remoteVerify, anyRule, trigger, options).then((request) => request(this.axios, this.basePath));
public async apiSysCodeGenConfigDetailGet(id?: number, codeGenId?: number, columnName?: string, propertyName?: string, columnLength?: number, lowerPropertyName?: string, columnComment?: string, netType?: string, effectType?: string, fkConfigId?: string, fkEntityName?: string, fkTableName?: string, lowerFkEntityName?: string, fkColumnName?: string, fkLinkColumnName?: string, lowerFkColumnName?: string, fkColumnNetType?: string, dictTypeCode?: string, whetherRetract?: string, whetherRequired?: string, whetherSortable?: string, statistical?: string, queryWhether?: string, queryType?: string, whetherTable?: string, whetherAddUpdate?: string, columnKey?: string, dataType?: string, whetherCommon?: string, tableNickName?: string, displayColumn?: string, valueColumn?: string, pidColumn?: string, orderNo?: number, rules?: string, defaultValue?: string, ruleItems?: Array<VerifyRuleItem>, remoteVerify?: boolean, anyRule?: boolean, trigger?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultSysCodeGenConfig>> {
return SysCodeGenConfigApiFp(this.configuration).apiSysCodeGenConfigDetailGet(id, codeGenId, columnName, propertyName, columnLength, lowerPropertyName, columnComment, netType, effectType, fkConfigId, fkEntityName, fkTableName, lowerFkEntityName, fkColumnName, fkLinkColumnName, lowerFkColumnName, fkColumnNetType, dictTypeCode, whetherRetract, whetherRequired, whetherSortable, statistical, queryWhether, queryType, whetherTable, whetherAddUpdate, columnKey, dataType, whetherCommon, tableNickName, displayColumn, valueColumn, pidColumn, orderNo, rules, defaultValue, ruleItems, remoteVerify, anyRule, trigger, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary
* @param {boolean} excludeSysTable SysTable属性的表
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SysCodeGenConfigApi
*/
public async apiSysCodeGenConfigEntityInfosExcludeSysTableGet(excludeSysTable: boolean, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultIEnumerableEntityInfo>> {
return SysCodeGenConfigApiFp(this.configuration).apiSysCodeGenConfigEntityInfosExcludeSysTableGet(excludeSysTable, options).then((request) => request(this.axios, this.basePath));
}
/**
*
@ -876,6 +1516,7 @@ export class SysCodeGenConfigApi extends BaseAPI {
* @param {string} [whetherRetract]
* @param {string} [whetherRequired]
* @param {string} [whetherSortable]
* @param {string} [statistical]
* @param {string} [queryWhether]
* @param {string} [queryType]
* @param {string} [whetherTable]
@ -898,8 +1539,8 @@ export class SysCodeGenConfigApi extends BaseAPI {
* @throws {RequiredError}
* @memberof SysCodeGenConfigApi
*/
public async apiSysCodeGenConfigListGet(id?: number, codeGenId?: number, columnName?: string, propertyName?: string, columnLength?: number, lowerPropertyName?: string, columnComment?: string, netType?: string, effectType?: string, fkConfigId?: string, fkEntityName?: string, fkTableName?: string, lowerFkEntityName?: string, fkColumnName?: string, fkLinkColumnName?: string, lowerFkColumnName?: string, fkColumnNetType?: string, dictTypeCode?: string, whetherRetract?: string, whetherRequired?: string, whetherSortable?: string, queryWhether?: string, queryType?: string, whetherTable?: string, whetherAddUpdate?: string, columnKey?: string, dataType?: string, whetherCommon?: string, tableNickName?: string, displayColumn?: string, valueColumn?: string, pidColumn?: string, orderNo?: number, rules?: string, defaultValue?: string, ruleItems?: Array<VerifyRuleItem>, remoteVerify?: boolean, anyRule?: boolean, trigger?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListCodeGenConfig>> {
return SysCodeGenConfigApiFp(this.configuration).apiSysCodeGenConfigListGet(id, codeGenId, columnName, propertyName, columnLength, lowerPropertyName, columnComment, netType, effectType, fkConfigId, fkEntityName, fkTableName, lowerFkEntityName, fkColumnName, fkLinkColumnName, lowerFkColumnName, fkColumnNetType, dictTypeCode, whetherRetract, whetherRequired, whetherSortable, queryWhether, queryType, whetherTable, whetherAddUpdate, columnKey, dataType, whetherCommon, tableNickName, displayColumn, valueColumn, pidColumn, orderNo, rules, defaultValue, ruleItems, remoteVerify, anyRule, trigger, options).then((request) => request(this.axios, this.basePath));
public async apiSysCodeGenConfigListGet(id?: number, codeGenId?: number, columnName?: string, propertyName?: string, columnLength?: number, lowerPropertyName?: string, columnComment?: string, netType?: string, effectType?: string, fkConfigId?: string, fkEntityName?: string, fkTableName?: string, lowerFkEntityName?: string, fkColumnName?: string, fkLinkColumnName?: string, lowerFkColumnName?: string, fkColumnNetType?: string, dictTypeCode?: string, whetherRetract?: string, whetherRequired?: string, whetherSortable?: string, statistical?: string, queryWhether?: string, queryType?: string, whetherTable?: string, whetherAddUpdate?: string, columnKey?: string, dataType?: string, whetherCommon?: string, tableNickName?: string, displayColumn?: string, valueColumn?: string, pidColumn?: string, orderNo?: number, rules?: string, defaultValue?: string, ruleItems?: Array<VerifyRuleItem>, remoteVerify?: boolean, anyRule?: boolean, trigger?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListCodeGenConfig>> {
return SysCodeGenConfigApiFp(this.configuration).apiSysCodeGenConfigListGet(id, codeGenId, columnName, propertyName, columnLength, lowerPropertyName, columnComment, netType, effectType, fkConfigId, fkEntityName, fkTableName, lowerFkEntityName, fkColumnName, fkLinkColumnName, lowerFkColumnName, fkColumnNetType, dictTypeCode, whetherRetract, whetherRequired, whetherSortable, statistical, queryWhether, queryType, whetherTable, whetherAddUpdate, columnKey, dataType, whetherCommon, tableNickName, displayColumn, valueColumn, pidColumn, orderNo, rules, defaultValue, ruleItems, remoteVerify, anyRule, trigger, options).then((request) => request(this.axios, this.basePath));
}
/**
*

View File

@ -174,6 +174,59 @@ export const SysCommonApiAxiosParamCreator = function (configuration?: Configura
options: localVarRequestOptions,
};
},
/**
*
* @summary 🔖
* @param {string} [groupName]
* @param {boolean} [isAppApi]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSysCommonGenerateAppApiGet: async (groupName?: string, isAppApi?: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/sysCommon/generateAppApi`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
// http bearer authentication required
if (configuration && configuration.accessToken) {
const accessToken = typeof configuration.accessToken === 'function'
? await configuration.accessToken()
: await configuration.accessToken;
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
}
if (groupName !== undefined) {
localVarQueryParameter['groupName'] = groupName;
}
if (isAppApi !== undefined) {
localVarQueryParameter['isAppApi'] = isAppApi;
}
const query = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
query.set(key, localVarQueryParameter[key]);
}
for (const key in options.params) {
query.set(key, options.params[key]);
}
localVarUrlObj.search = (new URLSearchParams(query)).toString();
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
*
* @summary MD5加密字符串 🏆
@ -512,6 +565,21 @@ export const SysCommonApiFp = function(configuration?: Configuration) {
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary 🔖
* @param {string} [groupName]
* @param {boolean} [isAppApi]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysCommonGenerateAppApiGet(groupName?: string, isAppApi?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
const localVarAxiosArgs = await SysCommonApiAxiosParamCreator(configuration).apiSysCommonGenerateAppApiGet(groupName, isAppApi, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary MD5加密字符串 🏆
@ -634,6 +702,17 @@ export const SysCommonApiFactory = function (configuration?: Configuration, base
async apiSysCommonDownloadErrorExcelTempPost(fileName?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultIActionResult>> {
return SysCommonApiFp(configuration).apiSysCommonDownloadErrorExcelTempPost(fileName, options).then((request) => request(axios, basePath));
},
/**
*
* @summary 🔖
* @param {string} [groupName]
* @param {boolean} [isAppApi]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysCommonGenerateAppApiGet(groupName?: string, isAppApi?: boolean, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
return SysCommonApiFp(configuration).apiSysCommonGenerateAppApiGet(groupName, isAppApi, options).then((request) => request(axios, basePath));
},
/**
*
* @summary MD5加密字符串 🏆
@ -736,6 +815,18 @@ export class SysCommonApi extends BaseAPI {
public async apiSysCommonDownloadErrorExcelTempPost(fileName?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultIActionResult>> {
return SysCommonApiFp(this.configuration).apiSysCommonDownloadErrorExcelTempPost(fileName, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 🔖
* @param {string} [groupName]
* @param {boolean} [isAppApi]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SysCommonApi
*/
public async apiSysCommonGenerateAppApiGet(groupName?: string, isAppApi?: boolean, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
return SysCommonApiFp(this.configuration).apiSysCommonGenerateAppApiGet(groupName, isAppApi, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary MD5加密字符串 🏆

View File

@ -20,6 +20,7 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr
import { AdminNETResultListDbColumnOutput } from '../models';
import { AdminNETResultListDbTableInfo } from '../models';
import { AdminNETResultListString } from '../models';
import { AdminNETResultString } from '../models';
import { AdminNETResultVisualDbTable } from '../models';
import { CreateEntityInput } from '../models';
import { CreateSeedDataInput } from '../models';
@ -470,6 +471,121 @@ export const SysDatabaseApiAxiosParamCreator = function (configuration?: Configu
options: localVarRequestOptions,
};
},
/**
*
* @summary
* @param {string} configId
* @param {string} tableName
* @param {string} position
* @param {string} baseClassName
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSysDatabaseGenerateEntityConfigIdTableNamePositionBaseClassNamePost: async (configId: string, tableName: string, position: string, baseClassName: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'configId' is not null or undefined
if (configId === null || configId === undefined) {
throw new RequiredError('configId','Required parameter configId was null or undefined when calling apiSysDatabaseGenerateEntityConfigIdTableNamePositionBaseClassNamePost.');
}
// verify required parameter 'tableName' is not null or undefined
if (tableName === null || tableName === undefined) {
throw new RequiredError('tableName','Required parameter tableName was null or undefined when calling apiSysDatabaseGenerateEntityConfigIdTableNamePositionBaseClassNamePost.');
}
// verify required parameter 'position' is not null or undefined
if (position === null || position === undefined) {
throw new RequiredError('position','Required parameter position was null or undefined when calling apiSysDatabaseGenerateEntityConfigIdTableNamePositionBaseClassNamePost.');
}
// verify required parameter 'baseClassName' is not null or undefined
if (baseClassName === null || baseClassName === undefined) {
throw new RequiredError('baseClassName','Required parameter baseClassName was null or undefined when calling apiSysDatabaseGenerateEntityConfigIdTableNamePositionBaseClassNamePost.');
}
const localVarPath = `/api/sysDatabase/generateEntity/{configId}/{tableName}/{position}/{baseClassName}`
.replace(`{${"configId"}}`, encodeURIComponent(String(configId)))
.replace(`{${"tableName"}}`, encodeURIComponent(String(tableName)))
.replace(`{${"position"}}`, encodeURIComponent(String(position)))
.replace(`{${"baseClassName"}}`, encodeURIComponent(String(baseClassName)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
// http bearer authentication required
if (configuration && configuration.accessToken) {
const accessToken = typeof configuration.accessToken === 'function'
? await configuration.accessToken()
: await configuration.accessToken;
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
}
const query = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
query.set(key, localVarQueryParameter[key]);
}
for (const key in options.params) {
query.set(key, options.params[key]);
}
localVarUrlObj.search = (new URLSearchParams(query)).toString();
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
*
* @summary
* @param {CreateEntityInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSysDatabaseGenerateEntityPost: async (body?: CreateEntityInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/sysDatabase/generateEntity`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
// http bearer authentication required
if (configuration && configuration.accessToken) {
const accessToken = typeof configuration.accessToken === 'function'
? await configuration.accessToken()
: await configuration.accessToken;
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
}
localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
const query = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
query.set(key, localVarQueryParameter[key]);
}
for (const key in options.params) {
query.set(key, options.params[key]);
}
localVarUrlObj.search = (new URLSearchParams(query)).toString();
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
*
* @summary 🔖
@ -836,6 +952,37 @@ export const SysDatabaseApiFp = function(configuration?: Configuration) {
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary
* @param {string} configId
* @param {string} tableName
* @param {string} position
* @param {string} baseClassName
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysDatabaseGenerateEntityConfigIdTableNamePositionBaseClassNamePost(configId: string, tableName: string, position: string, baseClassName: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultString>>> {
const localVarAxiosArgs = await SysDatabaseApiAxiosParamCreator(configuration).apiSysDatabaseGenerateEntityConfigIdTableNamePositionBaseClassNamePost(configId, tableName, position, baseClassName, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary
* @param {CreateEntityInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysDatabaseGenerateEntityPost(body?: CreateEntityInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultString>>> {
const localVarAxiosArgs = await SysDatabaseApiAxiosParamCreator(configuration).apiSysDatabaseGenerateEntityPost(body, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary 🔖
@ -1003,6 +1150,29 @@ export const SysDatabaseApiFactory = function (configuration?: Configuration, ba
async apiSysDatabaseDeleteTablePost(body?: DeleteDbTableInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
return SysDatabaseApiFp(configuration).apiSysDatabaseDeleteTablePost(body, options).then((request) => request(axios, basePath));
},
/**
*
* @summary
* @param {string} configId
* @param {string} tableName
* @param {string} position
* @param {string} baseClassName
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysDatabaseGenerateEntityConfigIdTableNamePositionBaseClassNamePost(configId: string, tableName: string, position: string, baseClassName: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultString>> {
return SysDatabaseApiFp(configuration).apiSysDatabaseGenerateEntityConfigIdTableNamePositionBaseClassNamePost(configId, tableName, position, baseClassName, options).then((request) => request(axios, basePath));
},
/**
*
* @summary
* @param {CreateEntityInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysDatabaseGenerateEntityPost(body?: CreateEntityInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultString>> {
return SysDatabaseApiFp(configuration).apiSysDatabaseGenerateEntityPost(body, options).then((request) => request(axios, basePath));
},
/**
*
* @summary 🔖
@ -1160,6 +1330,31 @@ export class SysDatabaseApi extends BaseAPI {
public async apiSysDatabaseDeleteTablePost(body?: DeleteDbTableInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
return SysDatabaseApiFp(this.configuration).apiSysDatabaseDeleteTablePost(body, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary
* @param {string} configId
* @param {string} tableName
* @param {string} position
* @param {string} baseClassName
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SysDatabaseApi
*/
public async apiSysDatabaseGenerateEntityConfigIdTableNamePositionBaseClassNamePost(configId: string, tableName: string, position: string, baseClassName: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultString>> {
return SysDatabaseApiFp(this.configuration).apiSysDatabaseGenerateEntityConfigIdTableNamePositionBaseClassNamePost(configId, tableName, position, baseClassName, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary
* @param {CreateEntityInput} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SysDatabaseApi
*/
public async apiSysDatabaseGenerateEntityPost(body?: CreateEntityInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultString>> {
return SysDatabaseApiFp(this.configuration).apiSysDatabaseGenerateEntityPost(body, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 🔖

View File

@ -24,6 +24,7 @@ import { AdminNETResultListSysUser } from '../models';
import { AdminNETResultObject } from '../models';
import { AdminNETResultSqlSugarPagedListTenantOutput } from '../models';
import { AdminNETResultString } from '../models';
import { AdminNETResultSysFile } from '../models';
import { DeleteTenantInput } from '../models';
import { PageTenantInput } from '../models';
import { RoleMenuInput } from '../models';
@ -658,6 +659,58 @@ export const SysTenantApiAxiosParamCreator = function (configuration?: Configura
options: localVarRequestOptions,
};
},
/**
*
* @summary 🔖
* @param {Blob} [file]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSysTenantUploadCarouselFilePostForm: async (file?: Blob, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/sysTenant/uploadCarouselFile`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
const localVarFormParams = new FormData();
// authentication Bearer required
// http bearer authentication required
if (configuration && configuration.accessToken) {
const accessToken = typeof configuration.accessToken === 'function'
? await configuration.accessToken()
: await configuration.accessToken;
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
}
if (file !== undefined) {
localVarFormParams.append('file', file as any);
}
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
const query = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
query.set(key, localVarQueryParameter[key]);
}
for (const key in options.params) {
query.set(key, options.params[key]);
}
localVarUrlObj.search = (new URLSearchParams(query)).toString();
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = localVarFormParams;
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
*
* @summary 🔖
@ -896,6 +949,20 @@ export const SysTenantApiFp = function(configuration?: Configuration) {
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary 🔖
* @param {Blob} [file]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysTenantUploadCarouselFilePostForm(file?: Blob, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultSysFile>>> {
const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).apiSysTenantUploadCarouselFilePostForm(file, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary 🔖
@ -1048,6 +1115,16 @@ export const SysTenantApiFactory = function (configuration?: Configuration, base
async apiSysTenantUpdatePost(body?: UpdateTenantInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
return SysTenantApiFp(configuration).apiSysTenantUpdatePost(body, options).then((request) => request(axios, basePath));
},
/**
*
* @summary 🔖
* @param {Blob} [file]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysTenantUploadCarouselFilePostForm(file?: Blob, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultSysFile>> {
return SysTenantApiFp(configuration).apiSysTenantUploadCarouselFilePostForm(file, options).then((request) => request(axios, basePath));
},
/**
*
* @summary 🔖
@ -1210,6 +1287,17 @@ export class SysTenantApi extends BaseAPI {
public async apiSysTenantUpdatePost(body?: UpdateTenantInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
return SysTenantApiFp(this.configuration).apiSysTenantUpdatePost(body, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 🔖
* @param {Blob} [file]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SysTenantApi
*/
public async apiSysTenantUploadCarouselFilePostForm(file?: Blob, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultSysFile>> {
return SysTenantApiFp(this.configuration).apiSysTenantUploadCarouselFilePostForm(file, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 🔖

View File

@ -132,54 +132,6 @@ export const SysUserApiAxiosParamCreator = function (configuration?: Configurati
options: localVarRequestOptions,
};
},
/**
*
* @summary 🔖
* @param {SysUser} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSysUserBaseInfoPost: async (body?: SysUser, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/sysUser/baseInfo`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
// http bearer authentication required
if (configuration && configuration.accessToken) {
const accessToken = typeof configuration.accessToken === 'function'
? await configuration.accessToken()
: await configuration.accessToken;
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
}
localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
const query = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
query.set(key, localVarQueryParameter[key]);
}
for (const key in options.params) {
query.set(key, options.params[key]);
}
localVarUrlObj.search = (new URLSearchParams(query)).toString();
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
*
* @summary 🔖
@ -614,6 +566,54 @@ export const SysUserApiAxiosParamCreator = function (configuration?: Configurati
options: localVarRequestOptions,
};
},
/**
*
* @summary 🔖
* @param {SysUser} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiSysUserUpdateBaseInfoPost: async (body?: SysUser, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/sysUser/updateBaseInfo`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
// http bearer authentication required
if (configuration && configuration.accessToken) {
const accessToken = typeof configuration.accessToken === 'function'
? await configuration.accessToken()
: await configuration.accessToken;
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
}
localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
const query = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
query.set(key, localVarQueryParameter[key]);
}
for (const key in options.params) {
query.set(key, options.params[key]);
}
localVarUrlObj.search = (new URLSearchParams(query)).toString();
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
*
* @summary 🔖
@ -741,20 +741,6 @@ export const SysUserApiFp = function(configuration?: Configuration) {
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary 🔖
* @param {SysUser} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysUserBaseInfoPost(body?: SysUser, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultInt32>>> {
const localVarAxiosArgs = await SysUserApiAxiosParamCreator(configuration).apiSysUserBaseInfoPost(body, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary 🔖
@ -881,6 +867,20 @@ export const SysUserApiFp = function(configuration?: Configuration) {
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary 🔖
* @param {SysUser} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysUserUpdateBaseInfoPost(body?: SysUser, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultInt32>>> {
const localVarAxiosArgs = await SysUserApiAxiosParamCreator(configuration).apiSysUserUpdateBaseInfoPost(body, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary 🔖
@ -936,16 +936,6 @@ export const SysUserApiFactory = function (configuration?: Configuration, basePa
async apiSysUserBaseInfoGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultSysUser>> {
return SysUserApiFp(configuration).apiSysUserBaseInfoGet(options).then((request) => request(axios, basePath));
},
/**
*
* @summary 🔖
* @param {SysUser} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysUserBaseInfoPost(body?: SysUser, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultInt32>> {
return SysUserApiFp(configuration).apiSysUserBaseInfoPost(body, options).then((request) => request(axios, basePath));
},
/**
*
* @summary 🔖
@ -1036,6 +1026,16 @@ export const SysUserApiFactory = function (configuration?: Configuration, basePa
async apiSysUserUnlockLoginPost(body?: UnlockLoginInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
return SysUserApiFp(configuration).apiSysUserUnlockLoginPost(body, options).then((request) => request(axios, basePath));
},
/**
*
* @summary 🔖
* @param {SysUser} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiSysUserUpdateBaseInfoPost(body?: SysUser, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultInt32>> {
return SysUserApiFp(configuration).apiSysUserUpdateBaseInfoPost(body, options).then((request) => request(axios, basePath));
},
/**
*
* @summary 🔖
@ -1086,17 +1086,6 @@ export class SysUserApi extends BaseAPI {
public async apiSysUserBaseInfoGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultSysUser>> {
return SysUserApiFp(this.configuration).apiSysUserBaseInfoGet(options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 🔖
* @param {SysUser} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SysUserApi
*/
public async apiSysUserBaseInfoPost(body?: SysUser, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultInt32>> {
return SysUserApiFp(this.configuration).apiSysUserBaseInfoPost(body, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 🔖
@ -1196,6 +1185,17 @@ export class SysUserApi extends BaseAPI {
public async apiSysUserUnlockLoginPost(body?: UnlockLoginInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
return SysUserApiFp(this.configuration).apiSysUserUnlockLoginPost(body, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 🔖
* @param {SysUser} [body]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SysUserApi
*/
public async apiSysUserUpdateBaseInfoPost(body?: SysUser, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultInt32>> {
return SysUserApiFp(this.configuration).apiSysUserUpdateBaseInfoPost(body, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 🔖

View File

@ -287,7 +287,7 @@ export interface AddTenantInput {
* @type {boolean}
* @memberof AddTenantInput
*/
captcha?: boolean;
captcha?: boolean | null;
/**
*
@ -295,7 +295,7 @@ export interface AddTenantInput {
* @type {boolean}
* @memberof AddTenantInput
*/
secondVer?: boolean;
secondVer?: boolean | null;
/**
*

View File

@ -0,0 +1,71 @@
/* tslint:disable */
/* eslint-disable */
/**
* Admin.NET
* .NET <br/><u><b><font color='FF0000'> 👮</font></b></u>
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
import { EntityInfo } from './entity-info';
/**
*
*
* @export
* @interface AdminNETResultIEnumerableEntityInfo
*/
export interface AdminNETResultIEnumerableEntityInfo {
/**
*
*
* @type {number}
* @memberof AdminNETResultIEnumerableEntityInfo
*/
code?: number;
/**
* successwarningerror
*
* @type {string}
* @memberof AdminNETResultIEnumerableEntityInfo
*/
type?: string | null;
/**
*
*
* @type {string}
* @memberof AdminNETResultIEnumerableEntityInfo
*/
message?: string | null;
/**
*
*
* @type {Array<EntityInfo>}
* @memberof AdminNETResultIEnumerableEntityInfo
*/
result?: Array<EntityInfo> | null;
/**
*
*
* @type {any}
* @memberof AdminNETResultIEnumerableEntityInfo
*/
extras?: any | null;
/**
*
*
* @type {Date}
* @memberof AdminNETResultIEnumerableEntityInfo
*/
time?: Date;
}

View File

@ -45,6 +45,14 @@ export interface ApiOutput {
*/
route?: string | null;
/**
*
*
* @type {string}
* @memberof ApiOutput
*/
action?: string | null;
/**
*
*

View File

@ -189,6 +189,14 @@ export interface CodeGenConfig {
*/
whetherSortable?: string | null;
/**
*
*
* @type {string}
* @memberof CodeGenConfig
*/
statistical?: string | null;
/**
*
*

View File

@ -0,0 +1,271 @@
/* tslint:disable */
/* eslint-disable */
/**
* Admin.NET
* .NET <br/><u><b><font color='FF0000'> 👮</font></b></u>
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
import { Navigate } from './navigate';
import { PropertyInfo } from './property-info';
import { Type } from './type';
/**
*
*
* @export
* @interface EntityColumnInfo
*/
export interface EntityColumnInfo {
/**
* @type {PropertyInfo}
* @memberof EntityColumnInfo
*/
propertyInfo?: PropertyInfo;
/**
* @type {string}
* @memberof EntityColumnInfo
*/
propertyName?: string | null;
/**
* @type {string}
* @memberof EntityColumnInfo
*/
dbColumnName?: string | null;
/**
* @type {string}
* @memberof EntityColumnInfo
*/
oldDbColumnName?: string | null;
/**
* @type {number}
* @memberof EntityColumnInfo
*/
length?: number;
/**
* @type {string}
* @memberof EntityColumnInfo
*/
columnDescription?: string | null;
/**
* @type {string}
* @memberof EntityColumnInfo
*/
defaultValue?: string | null;
/**
* @type {boolean}
* @memberof EntityColumnInfo
*/
isNullable?: boolean;
/**
* @type {boolean}
* @memberof EntityColumnInfo
*/
isIdentity?: boolean;
/**
* @type {boolean}
* @memberof EntityColumnInfo
*/
isPrimarykey?: boolean;
/**
* @type {boolean}
* @memberof EntityColumnInfo
*/
isTreeKey?: boolean;
/**
* @type {boolean}
* @memberof EntityColumnInfo
*/
isEnableUpdateVersionValidation?: boolean;
/**
* @type {any}
* @memberof EntityColumnInfo
*/
sqlParameterDbType?: any | null;
/**
* @type {string}
* @memberof EntityColumnInfo
*/
entityName?: string | null;
/**
* @type {string}
* @memberof EntityColumnInfo
*/
dbTableName?: string | null;
/**
* @type {boolean}
* @memberof EntityColumnInfo
*/
isIgnore?: boolean;
/**
* @type {string}
* @memberof EntityColumnInfo
*/
dataType?: string | null;
/**
* @type {number}
* @memberof EntityColumnInfo
*/
decimalDigits?: number;
/**
* @type {string}
* @memberof EntityColumnInfo
*/
oracleSequenceName?: string | null;
/**
* @type {boolean}
* @memberof EntityColumnInfo
*/
isOnlyIgnoreInsert?: boolean;
/**
* @type {boolean}
* @memberof EntityColumnInfo
*/
isOnlyIgnoreUpdate?: boolean;
/**
* @type {boolean}
* @memberof EntityColumnInfo
*/
isTranscoding?: boolean;
/**
* @type {string}
* @memberof EntityColumnInfo
*/
serializeDateTimeFormat?: string | null;
/**
* @type {boolean}
* @memberof EntityColumnInfo
*/
isJson?: boolean;
/**
* @type {boolean}
* @memberof EntityColumnInfo
*/
noSerialize?: boolean;
/**
* @type {Array<string>}
* @memberof EntityColumnInfo
*/
indexGroupNameList?: Array<string> | null;
/**
* @type {Array<string>}
* @memberof EntityColumnInfo
*/
uIndexGroupNameList?: Array<string> | null;
/**
* @type {boolean}
* @memberof EntityColumnInfo
*/
isArray?: boolean;
/**
* @type {Type}
* @memberof EntityColumnInfo
*/
underType?: Type;
/**
* @type {Navigate}
* @memberof EntityColumnInfo
*/
navigat?: Navigate;
/**
* @type {number}
* @memberof EntityColumnInfo
*/
createTableFieldSort?: number;
/**
* @type {any}
* @memberof EntityColumnInfo
*/
sqlParameterSize?: any | null;
/**
* @type {string}
* @memberof EntityColumnInfo
*/
insertSql?: string | null;
/**
* @type {boolean}
* @memberof EntityColumnInfo
*/
insertServerTime?: boolean;
/**
* @type {boolean}
* @memberof EntityColumnInfo
*/
updateServerTime?: boolean;
/**
* @type {string}
* @memberof EntityColumnInfo
*/
updateSql?: string | null;
/**
* @type {any}
* @memberof EntityColumnInfo
*/
extendedAttribute?: any | null;
/**
* @type {boolean}
* @memberof EntityColumnInfo
*/
isDisabledAlterColumn?: boolean;
/**
* @type {string}
* @memberof EntityColumnInfo
*/
querySql?: string | null;
/**
* @type {boolean}
* @memberof EntityColumnInfo
*/
isOwnsOne?: boolean;
/**
* @type {PropertyInfo}
* @memberof EntityColumnInfo
*/
forOwnsOnePropertyInfo?: PropertyInfo;
}

View File

@ -0,0 +1,85 @@
/* tslint:disable */
/* eslint-disable */
/**
* Admin.NET
* .NET <br/><u><b><font color='FF0000'> 👮</font></b></u>
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
import { EntityColumnInfo } from './entity-column-info';
import { SugarIndexAttribute } from './sugar-index-attribute';
import { Type } from './type';
/**
*
*
* @export
* @interface EntityInfo
*/
export interface EntityInfo {
/**
* @type {string}
* @memberof EntityInfo
*/
entityName?: string | null;
/**
* @type {string}
* @memberof EntityInfo
*/
dbTableName?: string | null;
/**
* @type {string}
* @memberof EntityInfo
*/
tableDescription?: string | null;
/**
* @type {Type}
* @memberof EntityInfo
*/
type?: Type;
/**
* @type {Array<EntityColumnInfo>}
* @memberof EntityInfo
*/
columns?: Array<EntityColumnInfo> | null;
/**
* @type {boolean}
* @memberof EntityInfo
*/
isDisabledDelete?: boolean;
/**
* @type {boolean}
* @memberof EntityInfo
*/
isDisabledUpdateAll?: boolean;
/**
* @type {Array<SugarIndexAttribute>}
* @memberof EntityInfo
*/
indexs?: Array<SugarIndexAttribute> | null;
/**
* @type {boolean}
* @memberof EntityInfo
*/
isCreateTableFiledSort?: boolean;
/**
* @type {string}
* @memberof EntityInfo
*/
discrimator?: string | null;
}

View File

@ -32,6 +32,7 @@ export * from './admin-netresult-get-refund-domestic-refund-by-out-refund-number
export * from './admin-netresult-grant-role-output';
export * from './admin-netresult-iaction-result';
export * from './admin-netresult-idisposable';
export * from './admin-netresult-ienumerable-entity-info';
export * from './admin-netresult-int32';
export * from './admin-netresult-int64';
export * from './admin-netresult-jobject';
@ -204,6 +205,8 @@ export * from './delete-user-input';
export * from './dict-data-input';
export * from './dict-type-input';
export * from './digit-shapes';
export * from './entity-column-info';
export * from './entity-info';
export * from './enum-entity';
export * from './enum-type-output';
export * from './event-attributes';
@ -268,6 +271,7 @@ export * from './method-impl-attributes';
export * from './method-info';
export * from './module';
export * from './module-handle';
export * from './navigate';
export * from './notice-input';
export * from './notice-status-enum';
export * from './notice-type-enum';
@ -276,6 +280,7 @@ export * from './number-format-info';
export * from './oauth-user-input';
export * from './oauth-user-output';
export * from './open-access-output';
export * from './order-by-type';
export * from './page-code-gen-input';
export * from './page-config-input';
export * from './page-dict-data-input';
@ -367,6 +372,7 @@ export * from './status-enum';
export * from './stress-test-harness-result';
export * from './stress-test-input';
export * from './struct-layout-attribute';
export * from './sugar-index-attribute';
export * from './swagger-submit-url-body';
export * from './sync-sys-ldap-input';
export * from './sys-code-gen';
@ -403,6 +409,7 @@ export * from './sys-plugin';
export * from './sys-print';
export * from './sys-region';
export * from './sys-schedule';
export * from './sys-tenant-upload-carousel-file-body';
export * from './sys-upgrade';
export * from './sys-user';
export * from './sys-user-ext-org';

View File

@ -0,0 +1,28 @@
/* tslint:disable */
/* eslint-disable */
/**
* Admin.NET
* .NET <br/><u><b><font color='FF0000'> 👮</font></b></u>
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
/**
*
*
* @export
* @interface Navigate
*/
export interface Navigate {
/**
* @type {any}
* @memberof Navigate
*/
typeId?: any | null;
}

View File

@ -0,0 +1,24 @@
/* tslint:disable */
/* eslint-disable */
/**
* Admin.NET
* .NET <br/><u><b><font color='FF0000'> 👮</font></b></u>
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
/**
*
* @export
* @enum {string}
*/
export enum OrderByType {
NUMBER_0 = 0,
NUMBER_1 = 1
}

View File

@ -0,0 +1,47 @@
/* tslint:disable */
/* eslint-disable */
/**
* Admin.NET
* .NET <br/><u><b><font color='FF0000'> 👮</font></b></u>
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
import { OrderByType } from './order-by-type';
/**
*
*
* @export
* @interface SugarIndexAttribute
*/
export interface SugarIndexAttribute {
/**
* @type {any}
* @memberof SugarIndexAttribute
*/
typeId?: any | null;
/**
* @type {string}
* @memberof SugarIndexAttribute
*/
indexName?: string | null;
/**
* @type {{ [key: string]: OrderByType; }}
* @memberof SugarIndexAttribute
*/
indexFields?: { [key: string]: OrderByType; } | null;
/**
* @type {boolean}
* @memberof SugarIndexAttribute
*/
isUnique?: boolean;
}

View File

@ -220,6 +220,14 @@ export interface SysCodeGenConfig {
*/
whetherSortable?: string | null;
/**
*
*
* @type {string}
* @memberof SysCodeGenConfig
*/
statistical?: string | null;
/**
*
*

View File

@ -147,4 +147,12 @@ export interface SysInfoInput {
* @memberof SysInfoInput
*/
secondVer?: boolean;
/**
*
*
* @type {Array<Blob>}
* @memberof SysInfoInput
*/
carouselFiles?: Array<Blob> | null;
}

View File

@ -0,0 +1,28 @@
/* tslint:disable */
/* eslint-disable */
/**
* Admin.NET
* .NET <br/><u><b><font color='FF0000'> 👮</font></b></u>
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
/**
*
*
* @export
* @interface SysTenantUploadCarouselFileBody
*/
export interface SysTenantUploadCarouselFileBody {
/**
* @type {Blob}
* @memberof SysTenantUploadCarouselFileBody
*/
file: Blob;
}

View File

@ -287,7 +287,7 @@ export interface TenantOutput {
* @type {boolean}
* @memberof TenantOutput
*/
captcha?: boolean;
captcha?: boolean | null;
/**
*
@ -295,7 +295,7 @@ export interface TenantOutput {
* @type {boolean}
* @memberof TenantOutput
*/
secondVer?: boolean;
secondVer?: boolean | null;
/**
*

View File

@ -287,7 +287,7 @@ export interface UpdateTenantInput {
* @type {boolean}
* @memberof UpdateTenantInput
*/
captcha?: boolean;
captcha?: boolean | null;
/**
*
@ -295,7 +295,7 @@ export interface UpdateTenantInput {
* @type {boolean}
* @memberof UpdateTenantInput
*/
secondVer?: boolean;
secondVer?: boolean | null;
/**
*

View File

@ -6,7 +6,7 @@ import { storeToRefs } from 'pinia';
import { useKeepALiveNames } from '/@/stores/keepAliveNames';
import { useRoutesList } from '/@/stores/routesList';
import { useThemeConfig } from '/@/stores/themeConfig';
import { Session } from '/@/utils/storage';
import { Session, Local } from '/@/utils/storage';
import { staticRoutes, notFoundAndNoPower } from '/@/router/route';
import { initFrontEndControlRoutes } from '/@/router/frontEnd';
import { initBackEndControlRoutes } from '/@/router/backEnd';
@ -102,7 +102,11 @@ router.beforeEach(async (to, from, next) => {
NProgress.done();
} else {
if (!token) {
next(`/login?redirect=${to.path}&params=${JSON.stringify(to.query ? to.query : to.params)}`);
var routeLocation = `/login?redirect=${to.path}&params=${JSON.stringify(to.query ? to.query : to.params)}`;
// 附加租户Id标识
var tenantid = Number(Local.get('tid'));
if (!isNaN(tenantid) && tenantid > 99999) routeLocation += `&tid=${tenantid}`;
next(routeLocation);
Session.clear();
NProgress.done();
} else if (token && to.path === '/login') {

View File

@ -1,7 +1,5 @@
import { defineStore } from 'pinia';
import { Local, Session } from '/@/utils/storage';
import Watermark from '/@/utils/watermark';
import { useThemeConfig } from '/@/stores/themeConfig';
import { Session } from '/@/utils/storage';
import { i18n } from '/@/i18n';
import { getAPI } from '/@/utils/axios-utils';
@ -92,15 +90,6 @@ export const useUserInfo = defineStore('userInfo', {
// 增加了下面代码,引起当前会话的用户信息不会刷新,如:重新提交的头像不更新,需要新开一个页面才能正确显示
// Session.set('userInfo', userInfos);
// 用户水印
const storesThemeConfig = useThemeConfig();
storesThemeConfig.themeConfig.watermarkText = d.watermarkText ?? '';
if (storesThemeConfig.themeConfig.isWatermark) Watermark.set(storesThemeConfig.themeConfig.watermarkText);
else Watermark.del();
Local.remove('themeConfig');
Local.set('themeConfig', storesThemeConfig.themeConfig);
resolve(userInfos);
});
});

View File

@ -28,7 +28,9 @@ export const Local = {
},
// 移除全部永久缓存
clear() {
var tid = Local.get('tid');
window.localStorage.clear();
Local.set('tid', tid);
},
};

View File

@ -65,6 +65,7 @@ import loginIconTwo1 from '/@/assets/login-icon-two1.svg';
import loginIconTwo2 from '/@/assets/login-icon-two2.svg';
//
import { loadSysInfo } from '/@/utils/sysInfo';
import { Local } from '/@/utils/storage';
//
const Account = defineAsyncComponent(() => import('/@/views/login/component/account.vue'));
@ -84,8 +85,14 @@ const getThemeConfig = computed(() => {
});
//
onMounted(() => {
var tenantid = route.query.tenantid ?? 0;
loadSysInfo(Number(tenantid));
// Id
var tenantid = Number(route.query.tid);
if (isNaN(tenantid)) {
tenantid = 0;
} else if (tenantid > 99999) {
Local.set('tid', tenantid);
}
loadSysInfo(tenantid);
NextLoading.done();
});

View File

@ -35,6 +35,9 @@
<vxe-tag v-if="row.whetherRequired" status="success"></vxe-tag>
<vxe-tag v-else status="info"></vxe-tag>
</template>
<template #statistical="{ row }">
<vxe-switch v-model="row.statistical" open-label="是" close-label="否" :openValue="true" :closeValue="false"></vxe-switch>
</template>
<template #queryWhether="{ row }">
<vxe-switch v-model="row.queryWhether" open-label="是" close-label="否" :openValue="true" :closeValue="false"></vxe-switch>
</template>
@ -83,6 +86,8 @@ const verifyDialogRef = ref();
const state = reactive({
isShowDialog: false,
loading: false,
EntityName: '',
ConfigId: '',
dbData: [] as any,
effectTypeList: [] as any,
dictTypeCodeList: [] as any,
@ -191,6 +196,15 @@ const options = reactive<VxeGridProps>({
default: 'whetherSortable',
},
},
{
field: 'statistical',
title: '统计字段',
minWidth: 70,
slots: {
edit: 'statistical',
default: 'statistical',
},
},
{
field: 'queryWhether',
title: '是否是查询',
@ -342,7 +356,8 @@ function effectTypeEnable(data: any) {
//
const openDialog = async (addRow: any) => {
state.isShowDialog = true;
state.ConfigId = addRow.configId;
state.EntityName = addRow.tableName;
nextTick(async () => {
await handleQuery(addRow);
rowDrop();

View File

@ -152,7 +152,7 @@
<template #label>
<el-icon><ele-Picture /></el-icon>
</template>
<el-upload v-model:file-list="carouselFileList" list-type="picture-card" :on-preview="handlePictureCardPreview" :on-remove="handleRemove">
<el-upload :file-list="state.carouselFileList" list-type="picture-card" :http-request="uploadCarouselFile" :on-preview="previewCarouselFile" :before-remove="beforeRemoveCarouselFile">
<el-icon><ele-Plus /></el-icon>
</el-upload>
</el-descriptions-item>
@ -191,16 +191,12 @@
<script setup lang="ts" name="sysInfoSetting">
import { nextTick, onMounted, reactive, ref } from 'vue';
import { ElMessage, UploadInstance, UploadProps, UploadUserFile } from 'element-plus';
import { ElMessage, ElMessageBox, UploadInstance } from 'element-plus';
import { fileToBase64 } from '/@/utils/base64Conver';
import chineseColors from '/@/layout/navBars/topBar/colors.json';
import { getAPI } from '/@/utils/axios-utils';
import { SysInfoInput, SysTenantApi } from '/@/api-services';
import loginIconTwo from '/@/assets/login-icon-two.svg';
import loginIconTwo1 from '/@/assets/login-icon-two1.svg';
import loginIconTwo2 from '/@/assets/login-icon-two2.svg';
import { SysFileApi, SysInfoInput, SysTenantApi } from '/@/api-services';
const host = window.location.host;
const uploadRef = ref<UploadInstance>();
@ -212,24 +208,10 @@ const state = reactive({
colorName: '飞燕草蓝', //
dialogImagePreviewVisible: false, //
dialogImagePreviewUrl: '', //
isDelete: false, //
carouselFileList: [] as any, //
});
//
const carouselFileList = ref<UploadUserFile[]>([
{
name: '1',
url: loginIconTwo,
},
{
name: '2',
url: loginIconTwo1,
},
{
name: '3',
url: loginIconTwo2,
},
]);
//
onMounted(async () => {
await loadSysInfoData();
@ -268,7 +250,9 @@ const loadSysInfoData = async () => {
state.isLoading = true;
const res = await getAPI(SysTenantApi).apiSysTenantSysInfoTenantIdGet(0);
if (res.data!.type !== 'success') return;
state.sysInfo = res.data.result;
if (state.sysInfo.carouselFiles) state.carouselFileList = state.sysInfo.carouselFiles;
} finally {
nextTick(() => {
state.isLoading = false;
@ -276,14 +260,48 @@ const loadSysInfoData = async () => {
}
};
//
const handleRemove: UploadProps['onRemove'] = (uploadFile, uploadFiles) => {
console.log(uploadFile, uploadFiles);
// file
// const onlineImageToFile = async (imageUrl: string | URL | Request, fileName: string) => {
// try {
// const response = await fetch(imageUrl);
// const blob = await response.blob();
// const file = new File([blob], fileName, { type: blob.type });
// return file;
// } catch (error) {
// return null;
// }
// };
//
const uploadCarouselFile = async (e: any) => {
await getAPI(SysTenantApi).apiSysTenantUploadCarouselFilePostForm(e.file);
};
//
const beforeRemoveCarouselFile = (file: any, fileList: any) => {
const result = new Promise((resolve, reject) => {
ElMessageBox.confirm(`确定删除此轮播图?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(async () => {
state.isDelete = true;
let index = fileList.indexOf(file);
await getAPI(SysFileApi).apiSysFileDeletePost(fileList[index]);
fileList.splice(index, 1);
state.carouselFileList.splice(index, 1);
})
.catch(() => {
reject(false);
});
});
return result;
};
//
const handlePictureCardPreview: UploadProps['onPreview'] = (uploadFile) => {
state.dialogImagePreviewUrl = uploadFile.url!;
const previewCarouselFile = (file: any) => {
state.dialogImagePreviewUrl = file.url!;
state.dialogImagePreviewVisible = true;
};

View File

@ -5,7 +5,7 @@
</div>
<splitpanes>
<pane size="20" class="vh100">
<pane size="20" class="vh100" style="overflow: auto">
<el-card class="vh80" shadow="hover" header="" v-loading="state.loading">
<el-row :gutter="35">
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb10">

View File

@ -277,7 +277,7 @@ const submitUserBase = () => {
cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
await getAPI(SysUserApi).apiSysUserBaseInfoPost(state.ruleFormBase);
await getAPI(SysUserApi).apiSysUserUpdateBaseInfoPost(state.ruleFormBase);
});
});
};