😎1、恢复配置参数模式去掉默认参数处理 2、升级依赖
This commit is contained in:
parent
7e02e177b1
commit
ff7967ea91
@ -32,7 +32,6 @@
|
||||
<PackageReference Include="Magicodes.IE.Pdf" Version="2.7.5.2" />
|
||||
<PackageReference Include="Magicodes.IE.Word" Version="2.7.5.2" />
|
||||
<PackageReference Include="MailKit" Version="4.9.0" />
|
||||
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.4.6" />
|
||||
<PackageReference Include="MiniExcel" Version="1.37.0" />
|
||||
<PackageReference Include="MiniWord" Version="0.9.2" />
|
||||
<PackageReference Include="MQTTnet" Version="5.0.1.1416" />
|
||||
@ -61,6 +60,7 @@
|
||||
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="8.0.11" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="8.0.11" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" Version="8.0.11" />
|
||||
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.4.7" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net9.0' ">
|
||||
@ -70,6 +70,7 @@
|
||||
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="9.0.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="9.0.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" Version="9.0.1" />
|
||||
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.5.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@ -1,35 +0,0 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 系统配置参数值表
|
||||
/// </summary>
|
||||
[SugarTable(null, "系统配置参数值表")]
|
||||
[SysTable]
|
||||
[SugarIndex("index_{table}_N", nameof(ConfigId), OrderByType.Asc)]
|
||||
public partial class SysConfigValue : EntityTenant
|
||||
{
|
||||
/// <summary>
|
||||
/// 系统配置Id
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "系统配置Id")]
|
||||
public long ConfigId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 系统配置
|
||||
/// </summary>
|
||||
[Navigate(NavigateType.OneToOne, nameof(ConfigId))]
|
||||
public SysConfig Config { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 参数默认值
|
||||
/// </summary>
|
||||
[MaxLength(64)]
|
||||
[SugarColumn(ColumnDescription = "参数默认值", Length = 512)]
|
||||
public string? Value { get; set; }
|
||||
}
|
||||
@ -530,9 +530,9 @@ public enum ErrorCodeEnum
|
||||
D8004,
|
||||
|
||||
/// <summary>
|
||||
/// 已存在同名或同编码参数配置
|
||||
/// 已存在同名或同编码配置参数
|
||||
/// </summary>
|
||||
[ErrorCodeItemMetadata("已存在同名或同编码参数配置")]
|
||||
[ErrorCodeItemMetadata("已存在同名或同编码配置参数")]
|
||||
D9000,
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -109,12 +109,11 @@ public class SysMenuSeedData : ISqlSugarEntitySeedData<SysMenu>
|
||||
new SysMenu{ Id=1310000000324, Pid=1310000000321, Title="增加", Permission="sysMenu/add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
new SysMenu{ Id=1310000000325, Pid=1310000000321, Title="删除", Permission="sysMenu/delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
|
||||
new SysMenu{ Id=1310000000331, Pid=1310000000301, Title="参数配置", Path="/platform/config", Name="sysConfig", Component="/system/config/index", Icon="ele-DocumentCopy", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=120 },
|
||||
new SysMenu{ Id=1310000000331, Pid=1310000000301, Title="配置参数", Path="/platform/config", Name="sysConfig", Component="/system/config/index", Icon="ele-DocumentCopy", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=120 },
|
||||
new SysMenu{ Id=1310000000332, Pid=1310000000331, Title="查询", Permission="sysConfig/page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
new SysMenu{ Id=1310000000333, Pid=1310000000331, Title="编辑", Permission="sysConfig/update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
new SysMenu{ Id=1310000000334, Pid=1310000000331, Title="增加", Permission="sysConfig/add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
new SysMenu{ Id=1310000000335, Pid=1310000000331, Title="删除", Permission="sysConfig/delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
new SysMenu{ Id=1310000000336, Pid=1310000000331, Title="更新默认值", Permission="sysConfig/updateDefault", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
|
||||
new SysMenu{ Id=1310000000341, Pid=1310000000301, Title="字典管理", Path="/platform/dict", Name="sysDict", Component="/system/dict/index", Icon="ele-Collection", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=130 },
|
||||
new SysMenu{ Id=1310000000342, Pid=1310000000341, Title="查询", Permission="sysDictType/page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
|
||||
@ -36,14 +36,6 @@ public class UpdateConfigInput : AddConfigInput
|
||||
{
|
||||
}
|
||||
|
||||
public class UpdateDefaultValueInput : BaseIdInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 默认属性值
|
||||
/// </summary>
|
||||
public string DefaultValue { get; set; }
|
||||
}
|
||||
|
||||
public class DeleteConfigInput : BaseIdInput
|
||||
{
|
||||
}
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Service;
|
||||
|
||||
public class ConfigOutput : SysConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 默认属性值
|
||||
/// </summary>
|
||||
public string DefaultValue { get; set; }
|
||||
}
|
||||
@ -12,21 +12,14 @@ namespace Admin.NET.Core.Service;
|
||||
[ApiDescriptionSettings(Order = 440, Description = "配置参数")]
|
||||
public class SysConfigService : IDynamicApiController, ITransient
|
||||
{
|
||||
private readonly UserManager _userManager;
|
||||
private readonly SysCacheService _sysCacheService;
|
||||
private readonly SqlSugarRepository<SysConfig> _sysConfigRep;
|
||||
private readonly SqlSugarRepository<SysConfigValue> _sysConfigValueRep;
|
||||
|
||||
public SysConfigService(
|
||||
UserManager userManager,
|
||||
SysCacheService sysCacheService,
|
||||
SqlSugarRepository<SysConfigValue> sysConfigValueRep,
|
||||
public SysConfigService(SysCacheService sysCacheService,
|
||||
SqlSugarRepository<SysConfig> sysConfigRep)
|
||||
{
|
||||
_sysConfigValueRep = sysConfigValueRep;
|
||||
_sysCacheService = sysCacheService;
|
||||
_sysConfigRep = sysConfigRep;
|
||||
_userManager = userManager;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -35,10 +28,9 @@ public class SysConfigService : IDynamicApiController, ITransient
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取配置参数分页列表")]
|
||||
public async Task<SqlSugarPagedList<ConfigOutput>> Page(PageConfigInput input)
|
||||
public async Task<SqlSugarPagedList<SysConfig>> Page(PageConfigInput input)
|
||||
{
|
||||
var query = await GetConfigQueryable();
|
||||
return await query.WhereIF(!_userManager.SuperAdmin, u => u.SysFlag == YesNoEnum.N)
|
||||
return await _sysConfigRep.AsQueryable()
|
||||
.Where(u => u.GroupCode != ConfigConst.SysWebConfigGroup || u.GroupCode == null) // 不显示 WebConfig 分组
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Name?.Trim()), u => u.Name.Contains(input.Name))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Code?.Trim()), u => u.Code.Contains(input.Code))
|
||||
@ -52,10 +44,10 @@ public class SysConfigService : IDynamicApiController, ITransient
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取配置参数列表")]
|
||||
public async Task<List<ConfigOutput>> List(PageConfigInput input)
|
||||
public async Task<List<SysConfig>> List(PageConfigInput input)
|
||||
{
|
||||
var query = await GetConfigQueryable();
|
||||
return await query.WhereIF(!string.IsNullOrWhiteSpace(input.GroupCode?.Trim()), u => u.GroupCode.Equals(input.GroupCode))
|
||||
return await _sysConfigRep.AsQueryable()
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.GroupCode?.Trim()), u => u.GroupCode.Equals(input.GroupCode))
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
@ -68,9 +60,9 @@ public class SysConfigService : IDynamicApiController, ITransient
|
||||
[DisplayName("增加配置参数")]
|
||||
public async Task AddConfig(AddConfigInput input)
|
||||
{
|
||||
if (input.SysFlag == YesNoEnum.Y && !_userManager.SuperAdmin) throw Oops.Oh(ErrorCodeEnum.D9002);
|
||||
var isExist = await _sysConfigRep.IsAnyAsync(u => u.Name == input.Name || u.Code == input.Code);
|
||||
if (isExist) throw Oops.Oh(ErrorCodeEnum.D9000);
|
||||
|
||||
await _sysConfigRep.InsertAsync(input.Adapt<SysConfig>());
|
||||
}
|
||||
|
||||
@ -84,7 +76,6 @@ public class SysConfigService : IDynamicApiController, ITransient
|
||||
[UnitOfWork]
|
||||
public async Task UpdateConfig(UpdateConfigInput input)
|
||||
{
|
||||
if (input.SysFlag == YesNoEnum.Y && !_userManager.SuperAdmin) throw Oops.Oh(ErrorCodeEnum.D9002);
|
||||
var isExist = await _sysConfigRep.IsAnyAsync(u => (u.Name == input.Name || u.Code == input.Code) && u.Id != input.Id);
|
||||
if (isExist) throw Oops.Oh(ErrorCodeEnum.D9000);
|
||||
|
||||
@ -101,49 +92,8 @@ public class SysConfigService : IDynamicApiController, ITransient
|
||||
//}
|
||||
|
||||
var config = input.Adapt<SysConfig>();
|
||||
if (input.SysFlag != YesNoEnum.Y)
|
||||
{
|
||||
config.Value = null;
|
||||
var tenantId = _userManager.TenantId;
|
||||
if (tenantId <= 0) tenantId = SqlSugarConst.DefaultTenantId;
|
||||
var configValue = await _sysConfigValueRep.AsQueryable().ClearFilter().Where(u => u.TenantId == tenantId).SingleAsync(u => u.ConfigId == config.Id);
|
||||
if (configValue == null)
|
||||
{
|
||||
await _sysConfigValueRep.InsertAsync(new SysConfigValue()
|
||||
{
|
||||
ConfigId = config.Id,
|
||||
Value = input.Value
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
configValue.Value = input.Value;
|
||||
await _sysConfigValueRep.UpdateAsync(configValue);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
await _sysConfigValueRep.DeleteAsync(u => u.ConfigId == config.Id);
|
||||
}
|
||||
// 非超管用户仅修改参数值
|
||||
if (_userManager.SuperAdmin) await _sysConfigRep.AsUpdateable(config).IgnoreColumnsIF(input.SysFlag != YesNoEnum.Y, u => u.Value).ExecuteCommandAsync();
|
||||
RemoveConfigCache(config);
|
||||
}
|
||||
await _sysConfigRep.AsUpdateable(config).IgnoreColumns(true).ExecuteCommandAsync();
|
||||
|
||||
/// <summary>
|
||||
/// 更新参数默认值 🔖
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[ApiDescriptionSettings(Name = "UpdateDefault"), HttpPost]
|
||||
[DisplayName("更新参数默认值")]
|
||||
[UnitOfWork]
|
||||
public async Task UpdateDefaultConfig(UpdateDefaultValueInput input)
|
||||
{
|
||||
var config = await _sysConfigRep.GetByIdAsync(input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002);
|
||||
if (config.SysFlag == YesNoEnum.Y && !_userManager.SuperAdmin) throw Oops.Oh(ErrorCodeEnum.D9002);
|
||||
config.Value = input.DefaultValue;
|
||||
await _sysConfigRep.UpdateAsync(config);
|
||||
RemoveConfigCache(config);
|
||||
}
|
||||
|
||||
@ -161,7 +111,6 @@ public class SysConfigService : IDynamicApiController, ITransient
|
||||
if (config.SysFlag == YesNoEnum.Y) throw Oops.Oh(ErrorCodeEnum.D9001);
|
||||
|
||||
await _sysConfigRep.DeleteAsync(config);
|
||||
await _sysConfigValueRep.DeleteAsync(u => u.ConfigId == config.Id);
|
||||
|
||||
RemoveConfigCache(config);
|
||||
}
|
||||
@ -182,7 +131,6 @@ public class SysConfigService : IDynamicApiController, ITransient
|
||||
if (config.SysFlag == YesNoEnum.Y) continue;
|
||||
|
||||
await _sysConfigRep.DeleteAsync(config);
|
||||
await _sysConfigValueRep.DeleteAsync(u => u.ConfigId == id);
|
||||
|
||||
RemoveConfigCache(config);
|
||||
}
|
||||
@ -207,8 +155,7 @@ public class SysConfigService : IDynamicApiController, ITransient
|
||||
[NonAction]
|
||||
public async Task<SysConfig> GetConfig(string code)
|
||||
{
|
||||
var query = await GetConfigQueryable();
|
||||
return await query.FirstAsync(u => u.Code == code);
|
||||
return await _sysConfigRep.GetFirstAsync(u => u.Code == code);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -235,9 +182,8 @@ public class SysConfigService : IDynamicApiController, ITransient
|
||||
var value = _sysCacheService.Get<string>($"{CacheConst.KeyConfig}{code}");
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
var query = await GetConfigQueryable();
|
||||
var config = await query.FirstAsync(u => u.Code == code);
|
||||
value = config?.Value;
|
||||
var config = await _sysConfigRep.CopyNew().GetFirstAsync(u => u.Code == code);
|
||||
value = config != null ? config.Value : default;
|
||||
_sysCacheService.Set($"{CacheConst.KeyConfig}{code}", value);
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(value)) return default;
|
||||
@ -257,7 +203,7 @@ public class SysConfigService : IDynamicApiController, ITransient
|
||||
if (config == null) return;
|
||||
|
||||
config.Value = value;
|
||||
await UpdateConfig(config.Adapt<UpdateConfigInput>());
|
||||
await _sysConfigRep.AsUpdateable(config).ExecuteCommandAsync();
|
||||
|
||||
RemoveConfigCache(config);
|
||||
}
|
||||
@ -269,8 +215,7 @@ public class SysConfigService : IDynamicApiController, ITransient
|
||||
[DisplayName("获取分组列表")]
|
||||
public async Task<List<string>> GetGroupList()
|
||||
{
|
||||
var query = await GetConfigQueryable();
|
||||
return await query
|
||||
return await _sysConfigRep.AsQueryable()
|
||||
.Where(u => u.GroupCode != ConfigConst.SysWebConfigGroup || u.GroupCode == null) // 不显示 WebConfig 分组
|
||||
.GroupBy(u => u.GroupCode)
|
||||
.Select(u => u.GroupCode).ToListAsync();
|
||||
@ -314,45 +259,11 @@ public class SysConfigService : IDynamicApiController, ITransient
|
||||
var configInfo = await _sysConfigRep.GetFirstAsync(u => u.Code == config.Code);
|
||||
if (configInfo == null) continue;
|
||||
|
||||
configInfo.Value = config.Value;
|
||||
await UpdateConfig(configInfo.Adapt<UpdateConfigInput>());
|
||||
await _sysConfigRep.AsUpdateable().SetColumns(u => u.Value == config.Value).Where(u => u.Code == config.Code).ExecuteCommandAsync();
|
||||
RemoveConfigCache(configInfo);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取配置参数查询器
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[NonAction]
|
||||
public Task<ISugarQueryable<ConfigOutput>> GetConfigQueryable()
|
||||
{
|
||||
var tenantId = _userManager.TenantId;
|
||||
if (_userManager.TenantId <= 0) tenantId = SqlSugarConst.DefaultTenantId;
|
||||
return Task.FromResult(
|
||||
_sysConfigRep.AsQueryable()
|
||||
.LeftJoin<SysConfigValue>((u, w) => u.Id == w.ConfigId).ClearFilter()
|
||||
.Where((u, w) => w.TenantId == null || w.TenantId == tenantId)
|
||||
.Select((u, w) => new ConfigOutput
|
||||
{
|
||||
Id = u.Id,
|
||||
Name = u.Name,
|
||||
Code = u.Code,
|
||||
GroupCode = u.GroupCode,
|
||||
SysFlag = u.SysFlag,
|
||||
Remark = u.Remark,
|
||||
DefaultValue = u.Value,
|
||||
Value = w.Value ?? u.Value,
|
||||
CreateTime = SqlFunc.IIF(u.SysFlag == YesNoEnum.Y, u.CreateTime, w.CreateTime),
|
||||
UpdateTime = SqlFunc.IIF(u.SysFlag == YesNoEnum.Y, u.UpdateTime, w.UpdateTime),
|
||||
CreateUserId = SqlFunc.IIF(u.SysFlag == YesNoEnum.Y, u.CreateUserId, w.CreateUserId),
|
||||
CreateUserName = SqlFunc.IIF(u.SysFlag == YesNoEnum.Y, u.CreateUserName, w.CreateUserName),
|
||||
UpdateUserId = SqlFunc.IIF(u.SysFlag == YesNoEnum.Y, u.UpdateUserId, w.UpdateUserId),
|
||||
UpdateUserName = SqlFunc.IIF(u.SysFlag == YesNoEnum.Y, u.UpdateUserName, w.UpdateUserName),
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 清除配置缓存
|
||||
/// </summary>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "admin.net.pro",
|
||||
"type": "module",
|
||||
"version": "2.4.33",
|
||||
"lastBuildTime": "2025.01.24",
|
||||
"lastBuildTime": "2025.01.25",
|
||||
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
|
||||
"author": "zuohuaijun",
|
||||
"license": "MIT",
|
||||
@ -85,7 +85,7 @@
|
||||
"@iconify/vue": "^4.3.0",
|
||||
"@plugin-web-update-notification/vite": "^2.0.0",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/node": "^20.17.14",
|
||||
"@types/node": "^20.17.16",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@types/sortablejs": "^1.15.8",
|
||||
"@typescript-eslint/eslint-plugin": "^8.21.0",
|
||||
@ -94,7 +94,7 @@
|
||||
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
||||
"@vue/compiler-sfc": "^3.5.13",
|
||||
"code-inspector-plugin": "^0.19.2",
|
||||
"eslint": "^9.18.0",
|
||||
"eslint": "^9.19.0",
|
||||
"eslint-plugin-vue": "^9.32.0",
|
||||
"globals": "^15.14.0",
|
||||
"less": "^4.2.2",
|
||||
|
||||
@ -18,16 +18,15 @@ import { Configuration } from '../configuration';
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
||||
import { AddConfigInput } from '../models';
|
||||
import { AdminNETResultListConfigOutput } from '../models';
|
||||
import { AdminNETResultListString } from '../models';
|
||||
import { AdminNETResultSqlSugarPagedListConfigOutput } from '../models';
|
||||
import { AdminNETResultListSysConfig } from '../models';
|
||||
import { AdminNETResultSqlSugarPagedListSysConfig } from '../models';
|
||||
import { AdminNETResultString } from '../models';
|
||||
import { AdminNETResultSysConfig } from '../models';
|
||||
import { BatchConfigInput } from '../models';
|
||||
import { DeleteConfigInput } from '../models';
|
||||
import { PageConfigInput } from '../models';
|
||||
import { UpdateConfigInput } from '../models';
|
||||
import { UpdateDefaultValueInput } from '../models';
|
||||
/**
|
||||
* SysConfigApi - axios parameter creator
|
||||
* @export
|
||||
@ -466,54 +465,6 @@ export const SysConfigApiAxiosParamCreator = function (configuration?: Configura
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 更新参数默认值 🔖
|
||||
* @param {UpdateDefaultValueInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysConfigUpdateDefaultPost: async (body?: UpdateDefaultValueInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysConfig/updateDefault`;
|
||||
// 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 更新配置参数 🔖
|
||||
@ -675,7 +626,7 @@ export const SysConfigApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigListPost(body?: PageConfigInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListConfigOutput>>> {
|
||||
async apiSysConfigListPost(body?: PageConfigInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListSysConfig>>> {
|
||||
const localVarAxiosArgs = await SysConfigApiAxiosParamCreator(configuration).apiSysConfigListPost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
@ -689,27 +640,13 @@ export const SysConfigApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigPagePost(body?: PageConfigInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultSqlSugarPagedListConfigOutput>>> {
|
||||
async apiSysConfigPagePost(body?: PageConfigInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultSqlSugarPagedListSysConfig>>> {
|
||||
const localVarAxiosArgs = await SysConfigApiAxiosParamCreator(configuration).apiSysConfigPagePost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 更新参数默认值 🔖
|
||||
* @param {UpdateDefaultValueInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigUpdateDefaultPost(body?: UpdateDefaultValueInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
||||
const localVarAxiosArgs = await SysConfigApiAxiosParamCreator(configuration).apiSysConfigUpdateDefaultPost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 更新配置参数 🔖
|
||||
@ -809,7 +746,7 @@ export const SysConfigApiFactory = function (configuration?: Configuration, base
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigListPost(body?: PageConfigInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListConfigOutput>> {
|
||||
async apiSysConfigListPost(body?: PageConfigInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListSysConfig>> {
|
||||
return SysConfigApiFp(configuration).apiSysConfigListPost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
@ -819,19 +756,9 @@ export const SysConfigApiFactory = function (configuration?: Configuration, base
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigPagePost(body?: PageConfigInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultSqlSugarPagedListConfigOutput>> {
|
||||
async apiSysConfigPagePost(body?: PageConfigInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultSqlSugarPagedListSysConfig>> {
|
||||
return SysConfigApiFp(configuration).apiSysConfigPagePost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 更新参数默认值 🔖
|
||||
* @param {UpdateDefaultValueInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigUpdateDefaultPost(body?: UpdateDefaultValueInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
||||
return SysConfigApiFp(configuration).apiSysConfigUpdateDefaultPost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 更新配置参数 🔖
|
||||
@ -936,7 +863,7 @@ export class SysConfigApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysConfigApi
|
||||
*/
|
||||
public async apiSysConfigListPost(body?: PageConfigInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListConfigOutput>> {
|
||||
public async apiSysConfigListPost(body?: PageConfigInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListSysConfig>> {
|
||||
return SysConfigApiFp(this.configuration).apiSysConfigListPost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
@ -947,20 +874,9 @@ export class SysConfigApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysConfigApi
|
||||
*/
|
||||
public async apiSysConfigPagePost(body?: PageConfigInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultSqlSugarPagedListConfigOutput>> {
|
||||
public async apiSysConfigPagePost(body?: PageConfigInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultSqlSugarPagedListSysConfig>> {
|
||||
return SysConfigApiFp(this.configuration).apiSysConfigPagePost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 更新参数默认值 🔖
|
||||
* @param {UpdateDefaultValueInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysConfigApi
|
||||
*/
|
||||
public async apiSysConfigUpdateDefaultPost(body?: UpdateDefaultValueInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
||||
return SysConfigApiFp(this.configuration).apiSysConfigUpdateDefaultPost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 更新配置参数 🔖
|
||||
|
||||
@ -12,20 +12,20 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { ConfigOutput } from './config-output';
|
||||
import { SysConfig } from './sys-config';
|
||||
/**
|
||||
* 全局返回结果
|
||||
*
|
||||
* @export
|
||||
* @interface AdminNETResultListConfigOutput
|
||||
* @interface AdminNETResultListSysConfig
|
||||
*/
|
||||
export interface AdminNETResultListConfigOutput {
|
||||
export interface AdminNETResultListSysConfig {
|
||||
|
||||
/**
|
||||
* 状态码
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AdminNETResultListConfigOutput
|
||||
* @memberof AdminNETResultListSysConfig
|
||||
*/
|
||||
code?: number;
|
||||
|
||||
@ -33,7 +33,7 @@ export interface AdminNETResultListConfigOutput {
|
||||
* 类型success、warning、error
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminNETResultListConfigOutput
|
||||
* @memberof AdminNETResultListSysConfig
|
||||
*/
|
||||
type?: string | null;
|
||||
|
||||
@ -41,23 +41,23 @@ export interface AdminNETResultListConfigOutput {
|
||||
* 错误信息
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminNETResultListConfigOutput
|
||||
* @memberof AdminNETResultListSysConfig
|
||||
*/
|
||||
message?: string | null;
|
||||
|
||||
/**
|
||||
* 数据
|
||||
*
|
||||
* @type {Array<ConfigOutput>}
|
||||
* @memberof AdminNETResultListConfigOutput
|
||||
* @type {Array<SysConfig>}
|
||||
* @memberof AdminNETResultListSysConfig
|
||||
*/
|
||||
result?: Array<ConfigOutput> | null;
|
||||
result?: Array<SysConfig> | null;
|
||||
|
||||
/**
|
||||
* 附加数据
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof AdminNETResultListConfigOutput
|
||||
* @memberof AdminNETResultListSysConfig
|
||||
*/
|
||||
extras?: any | null;
|
||||
|
||||
@ -65,7 +65,7 @@ export interface AdminNETResultListConfigOutput {
|
||||
* 时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AdminNETResultListConfigOutput
|
||||
* @memberof AdminNETResultListSysConfig
|
||||
*/
|
||||
time?: Date;
|
||||
}
|
||||
@ -12,20 +12,20 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { SqlSugarPagedListConfigOutput } from './sql-sugar-paged-list-config-output';
|
||||
import { SqlSugarPagedListSysConfig } from './sql-sugar-paged-list-sys-config';
|
||||
/**
|
||||
* 全局返回结果
|
||||
*
|
||||
* @export
|
||||
* @interface AdminNETResultSqlSugarPagedListConfigOutput
|
||||
* @interface AdminNETResultSqlSugarPagedListSysConfig
|
||||
*/
|
||||
export interface AdminNETResultSqlSugarPagedListConfigOutput {
|
||||
export interface AdminNETResultSqlSugarPagedListSysConfig {
|
||||
|
||||
/**
|
||||
* 状态码
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AdminNETResultSqlSugarPagedListConfigOutput
|
||||
* @memberof AdminNETResultSqlSugarPagedListSysConfig
|
||||
*/
|
||||
code?: number;
|
||||
|
||||
@ -33,7 +33,7 @@ export interface AdminNETResultSqlSugarPagedListConfigOutput {
|
||||
* 类型success、warning、error
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminNETResultSqlSugarPagedListConfigOutput
|
||||
* @memberof AdminNETResultSqlSugarPagedListSysConfig
|
||||
*/
|
||||
type?: string | null;
|
||||
|
||||
@ -41,21 +41,21 @@ export interface AdminNETResultSqlSugarPagedListConfigOutput {
|
||||
* 错误信息
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminNETResultSqlSugarPagedListConfigOutput
|
||||
* @memberof AdminNETResultSqlSugarPagedListSysConfig
|
||||
*/
|
||||
message?: string | null;
|
||||
|
||||
/**
|
||||
* @type {SqlSugarPagedListConfigOutput}
|
||||
* @memberof AdminNETResultSqlSugarPagedListConfigOutput
|
||||
* @type {SqlSugarPagedListSysConfig}
|
||||
* @memberof AdminNETResultSqlSugarPagedListSysConfig
|
||||
*/
|
||||
result?: SqlSugarPagedListConfigOutput;
|
||||
result?: SqlSugarPagedListSysConfig;
|
||||
|
||||
/**
|
||||
* 附加数据
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof AdminNETResultSqlSugarPagedListConfigOutput
|
||||
* @memberof AdminNETResultSqlSugarPagedListSysConfig
|
||||
*/
|
||||
extras?: any | null;
|
||||
|
||||
@ -63,7 +63,7 @@ export interface AdminNETResultSqlSugarPagedListConfigOutput {
|
||||
* 时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AdminNETResultSqlSugarPagedListConfigOutput
|
||||
* @memberof AdminNETResultSqlSugarPagedListSysConfig
|
||||
*/
|
||||
time?: Date;
|
||||
}
|
||||
@ -1,149 +0,0 @@
|
||||
/* 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 { YesNoEnum } from './yes-no-enum';
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @export
|
||||
* @interface ConfigOutput
|
||||
*/
|
||||
export interface ConfigOutput {
|
||||
|
||||
/**
|
||||
* 雪花Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ConfigOutput
|
||||
*/
|
||||
id?: number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof ConfigOutput
|
||||
*/
|
||||
createTime?: Date;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof ConfigOutput
|
||||
*/
|
||||
updateTime?: Date | null;
|
||||
|
||||
/**
|
||||
* 创建者Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ConfigOutput
|
||||
*/
|
||||
createUserId?: number | null;
|
||||
|
||||
/**
|
||||
* 创建者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ConfigOutput
|
||||
*/
|
||||
createUserName?: string | null;
|
||||
|
||||
/**
|
||||
* 修改者Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ConfigOutput
|
||||
*/
|
||||
updateUserId?: number | null;
|
||||
|
||||
/**
|
||||
* 修改者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ConfigOutput
|
||||
*/
|
||||
updateUserName?: string | null;
|
||||
|
||||
/**
|
||||
* 软删除
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ConfigOutput
|
||||
*/
|
||||
isDelete?: boolean;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ConfigOutput
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ConfigOutput
|
||||
*/
|
||||
code?: string | null;
|
||||
|
||||
/**
|
||||
* 参数值
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ConfigOutput
|
||||
*/
|
||||
value?: string | null;
|
||||
|
||||
/**
|
||||
* @type {YesNoEnum}
|
||||
* @memberof ConfigOutput
|
||||
*/
|
||||
sysFlag?: YesNoEnum;
|
||||
|
||||
/**
|
||||
* 分组编码
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ConfigOutput
|
||||
*/
|
||||
groupCode?: string | null;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ConfigOutput
|
||||
*/
|
||||
orderNo?: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ConfigOutput
|
||||
*/
|
||||
remark?: string | null;
|
||||
|
||||
/**
|
||||
* 默认属性值
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ConfigOutput
|
||||
*/
|
||||
defaultValue?: string | null;
|
||||
}
|
||||
@ -39,7 +39,6 @@ export * from './admin-netresult-jobject';
|
||||
export * from './admin-netresult-list-api-output';
|
||||
export * from './admin-netresult-list-code-gen-config';
|
||||
export * from './admin-netresult-list-column-ouput';
|
||||
export * from './admin-netresult-list-config-output';
|
||||
export * from './admin-netresult-list-const-output';
|
||||
export * from './admin-netresult-list-database-output';
|
||||
export * from './admin-netresult-list-db-backup-output';
|
||||
@ -57,6 +56,7 @@ export * from './admin-netresult-list-role-table-output';
|
||||
export * from './admin-netresult-list-stat-log-output';
|
||||
export * from './admin-netresult-list-string';
|
||||
export * from './admin-netresult-list-sys-code-gen-template';
|
||||
export * from './admin-netresult-list-sys-config';
|
||||
export * from './admin-netresult-list-sys-dict-data';
|
||||
export * from './admin-netresult-list-sys-dict-type';
|
||||
export * from './admin-netresult-list-sys-file';
|
||||
@ -78,13 +78,13 @@ export * from './admin-netresult-login-output';
|
||||
export * from './admin-netresult-login-user-output';
|
||||
export * from './admin-netresult-object';
|
||||
export * from './admin-netresult-sm-key-pair-output';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-config-output';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-job-detail-output';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-oauth-user-output';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-open-access-output';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-page-pos-output';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-page-role-output';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-sys-code-gen';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-sys-config';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-sys-dict-data';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-sys-dict-type';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-sys-file';
|
||||
@ -148,7 +148,6 @@ export * from './code-gen-type-enum';
|
||||
export * from './column-ouput';
|
||||
export * from './column-relation';
|
||||
export * from './compare-info';
|
||||
export * from './config-output';
|
||||
export * from './const-output';
|
||||
export * from './constructor-info';
|
||||
export * from './create-entity-input';
|
||||
@ -340,13 +339,13 @@ export * from './signature-input';
|
||||
export * from './sm-key-pair-output';
|
||||
export * from './sms-verify-code-input';
|
||||
export * from './sort-version';
|
||||
export * from './sql-sugar-paged-list-config-output';
|
||||
export * from './sql-sugar-paged-list-job-detail-output';
|
||||
export * from './sql-sugar-paged-list-oauth-user-output';
|
||||
export * from './sql-sugar-paged-list-open-access-output';
|
||||
export * from './sql-sugar-paged-list-page-pos-output';
|
||||
export * from './sql-sugar-paged-list-page-role-output';
|
||||
export * from './sql-sugar-paged-list-sys-code-gen';
|
||||
export * from './sql-sugar-paged-list-sys-config';
|
||||
export * from './sql-sugar-paged-list-sys-dict-data';
|
||||
export * from './sql-sugar-paged-list-sys-dict-type';
|
||||
export * from './sql-sugar-paged-list-sys-file';
|
||||
@ -437,7 +436,6 @@ export * from './update-code-gen-input';
|
||||
export * from './update-config-input';
|
||||
export * from './update-db-column-input';
|
||||
export * from './update-db-table-input';
|
||||
export * from './update-default-value-input';
|
||||
export * from './update-dict-data-input';
|
||||
export * from './update-dict-type-input';
|
||||
export * from './update-job-detail-input';
|
||||
|
||||
@ -12,20 +12,20 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { ConfigOutput } from './config-output';
|
||||
import { SysConfig } from './sys-config';
|
||||
/**
|
||||
* 分页泛型集合
|
||||
*
|
||||
* @export
|
||||
* @interface SqlSugarPagedListConfigOutput
|
||||
* @interface SqlSugarPagedListSysConfig
|
||||
*/
|
||||
export interface SqlSugarPagedListConfigOutput {
|
||||
export interface SqlSugarPagedListSysConfig {
|
||||
|
||||
/**
|
||||
* 页码
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SqlSugarPagedListConfigOutput
|
||||
* @memberof SqlSugarPagedListSysConfig
|
||||
*/
|
||||
page?: number;
|
||||
|
||||
@ -33,7 +33,7 @@ export interface SqlSugarPagedListConfigOutput {
|
||||
* 页容量
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SqlSugarPagedListConfigOutput
|
||||
* @memberof SqlSugarPagedListSysConfig
|
||||
*/
|
||||
pageSize?: number;
|
||||
|
||||
@ -41,7 +41,7 @@ export interface SqlSugarPagedListConfigOutput {
|
||||
* 总条数
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SqlSugarPagedListConfigOutput
|
||||
* @memberof SqlSugarPagedListSysConfig
|
||||
*/
|
||||
total?: number;
|
||||
|
||||
@ -49,23 +49,23 @@ export interface SqlSugarPagedListConfigOutput {
|
||||
* 总页数
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SqlSugarPagedListConfigOutput
|
||||
* @memberof SqlSugarPagedListSysConfig
|
||||
*/
|
||||
totalPages?: number;
|
||||
|
||||
/**
|
||||
* 当前页集合
|
||||
*
|
||||
* @type {Array<ConfigOutput>}
|
||||
* @memberof SqlSugarPagedListConfigOutput
|
||||
* @type {Array<SysConfig>}
|
||||
* @memberof SqlSugarPagedListSysConfig
|
||||
*/
|
||||
items?: Array<ConfigOutput> | null;
|
||||
items?: Array<SysConfig> | null;
|
||||
|
||||
/**
|
||||
* 是否有上一页
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SqlSugarPagedListConfigOutput
|
||||
* @memberof SqlSugarPagedListSysConfig
|
||||
*/
|
||||
hasPrevPage?: boolean;
|
||||
|
||||
@ -73,7 +73,7 @@ export interface SqlSugarPagedListConfigOutput {
|
||||
* 是否有下一页
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SqlSugarPagedListConfigOutput
|
||||
* @memberof SqlSugarPagedListSysConfig
|
||||
*/
|
||||
hasNextPage?: boolean;
|
||||
}
|
||||
@ -1,38 +0,0 @@
|
||||
/* 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 UpdateDefaultValueInput
|
||||
*/
|
||||
export interface UpdateDefaultValueInput {
|
||||
|
||||
/**
|
||||
* 主键Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof UpdateDefaultValueInput
|
||||
*/
|
||||
id: number;
|
||||
|
||||
/**
|
||||
* 默认属性值
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateDefaultValueInput
|
||||
*/
|
||||
defaultValue?: string | null;
|
||||
}
|
||||
@ -52,7 +52,6 @@
|
||||
</el-space>
|
||||
</template> -->
|
||||
</el-input>
|
||||
<span v-if="state.ruleForm.id > 0">默认值:{{ state.ruleForm.defaultValue }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||
@ -83,7 +82,6 @@
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button icon="ele-CircleCloseFilled" @click="cancel">取 消</el-button>
|
||||
<el-button type="primary" icon="ele-CircleCheckFilled" v-if="state.ruleForm.id > 0" v-auth="'sysConfig/updateDefault'" @click="updateDefault">更新默认值</el-button>
|
||||
<el-button type="primary" icon="ele-CircleCheckFilled" @click="submit">确 定</el-button>
|
||||
</span>
|
||||
</template>
|
||||
@ -93,10 +91,10 @@
|
||||
|
||||
<script lang="ts" setup name="sysEditConfig">
|
||||
import { reactive, ref } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
|
||||
import { getAPI } from '/@/utils/axios-utils';
|
||||
import { SysConfigApi } from '/@/api-services/api';
|
||||
import { ConfigOutput } from '/@/api-services/models';
|
||||
import { UpdateConfigInput } from '/@/api-services/models';
|
||||
|
||||
const props = defineProps({
|
||||
title: String,
|
||||
@ -105,7 +103,7 @@ const emits = defineEmits(['updateData']);
|
||||
const ruleFormRef = ref();
|
||||
const state = reactive({
|
||||
isShowDialog: false,
|
||||
ruleForm: {} as ConfigOutput,
|
||||
ruleForm: {} as UpdateConfigInput,
|
||||
});
|
||||
|
||||
// 打开弹窗
|
||||
@ -126,18 +124,6 @@ const cancel = () => {
|
||||
state.isShowDialog = false;
|
||||
};
|
||||
|
||||
// 更新默认值
|
||||
const updateDefault = () => {
|
||||
getAPI(SysConfigApi)
|
||||
.apiSysConfigUpdateDefaultPost({
|
||||
id: state.ruleForm.id,
|
||||
defaultValue: state.ruleForm.value,
|
||||
} as any)
|
||||
.then((res: any) => {
|
||||
if (res.data.code == 200) ElMessage.success('更新成功');
|
||||
});
|
||||
};
|
||||
|
||||
// 提交
|
||||
const submit = () => {
|
||||
ruleFormRef.value.validate(async (valid: boolean) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user