This commit is contained in:
@@ -31,7 +31,7 @@ namespace Dilon.Core.Service
|
||||
/// 是否默认激活(Y-是,N-否),只能有一个系统默认激活
|
||||
/// 用户登录后默认展示此系统菜单
|
||||
/// </summary>
|
||||
public string Active { get; set; }
|
||||
public bool Active { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态(字典 0正常 1停用 2删除)
|
||||
@@ -76,7 +76,7 @@ namespace Dilon.Core.Service
|
||||
/// 应用Id
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "应用Id不能为空")]
|
||||
public long Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
}
|
||||
|
||||
public class UpdateAppInput : AppInput
|
||||
@@ -85,7 +85,7 @@ namespace Dilon.Core.Service
|
||||
/// 应用Id
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "应用Id不能为空")]
|
||||
public long Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
}
|
||||
|
||||
public class QueryAppInput : DeleteAppInput
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
/// <summary>
|
||||
/// 应用Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
@@ -23,7 +23,7 @@
|
||||
/// <summary>
|
||||
/// 是否默认
|
||||
/// </summary>
|
||||
public string Active { get; set; }
|
||||
public bool Active { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Dilon.Core.Service
|
||||
Task DeleteApp(DeleteAppInput input);
|
||||
Task<SysApp> GetApp([FromQuery] QueryAppInput input);
|
||||
Task<dynamic> GetAppList([FromQuery] AppInput input);
|
||||
Task<dynamic> GetLoginApps(long userId);
|
||||
Task<dynamic> GetLoginApps(string userId);
|
||||
Task<dynamic> QueryAppPageList([FromQuery] AppInput input);
|
||||
Task SetAsDefault(SetDefaultAppInput input);
|
||||
Task UpdateApp(UpdateAppInput input);
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Dilon.Core.Service
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
[NonAction]
|
||||
public async Task<dynamic> GetLoginApps(long userId)
|
||||
public async Task<dynamic> GetLoginApps(string userId)
|
||||
{
|
||||
var apps = _sysAppRep.DetachedEntities.Where(u => u.Status == (int)CommonStatus.ENABLE);
|
||||
if (!_userManager.SuperAdmin)
|
||||
@@ -89,7 +89,7 @@ namespace Dilon.Core.Service
|
||||
if (isExist)
|
||||
throw Oops.Oh(ErrorCode.D5000);
|
||||
|
||||
if (input.Active == YesOrNot.Y.ToString())
|
||||
if (input.Active)
|
||||
{
|
||||
isExist = await _sysAppRep.DetachedEntities.AnyAsync(u => u.Active == input.Active);
|
||||
if (isExist)
|
||||
@@ -129,7 +129,7 @@ namespace Dilon.Core.Service
|
||||
if (isExist)
|
||||
throw Oops.Oh(ErrorCode.D5000);
|
||||
|
||||
if (input.Active == YesOrNot.Y.ToString())
|
||||
if (input.Active)
|
||||
{
|
||||
isExist = await _sysAppRep.DetachedEntities.AnyAsync(u => u.Active == input.Active);
|
||||
if (isExist)
|
||||
@@ -173,11 +173,11 @@ namespace Dilon.Core.Service
|
||||
var apps = await _sysAppRep.Where(u => u.Status == (int)CommonStatus.ENABLE).ToListAsync();
|
||||
apps.ForEach(u =>
|
||||
{
|
||||
u.Active = YesOrNot.N.ToString();
|
||||
u.Active = false;
|
||||
});
|
||||
|
||||
var app = await _sysAppRep.FirstOrDefaultAsync(u => u.Id == input.Id);
|
||||
app.Active = YesOrNot.Y.ToString();
|
||||
app.Active = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -144,7 +144,7 @@ namespace Dilon.Core.Service
|
||||
// 菜单信息
|
||||
if (loginOutput.Apps.Count > 0)
|
||||
{
|
||||
var defaultActiveAppCode = loginOutput.Apps.FirstOrDefault(u => u.Active == YesOrNot.Y.ToString()).Code; // loginOutput.Apps[0].Code;
|
||||
var defaultActiveAppCode = loginOutput.Apps.FirstOrDefault(u => u.Active == true).Code; // loginOutput.Apps[0].Code;
|
||||
loginOutput.Menus = await _sysMenuService.GetLoginMenusAntDesign(userId, defaultActiveAppCode);
|
||||
}
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace Dilon.Core.Service
|
||||
/// <summary>
|
||||
/// 数据范围(机构)信息
|
||||
/// </summary>
|
||||
public List<long> DataScopes { get; set; } = new List<long>();
|
||||
public List<string> DataScopes { get; set; } = new List<string>();
|
||||
|
||||
///// <summary>
|
||||
///// 租户信息
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace Dilon.Core.Service
|
||||
/// <param name="codeGenId"></param>
|
||||
/// <returns></returns>
|
||||
[NonAction]
|
||||
public async Task Delete(long codeGenId)
|
||||
public async Task Delete(string codeGenId)
|
||||
{
|
||||
var codeGenConfigList = await _sysCodeGenConfigRep.Where(u => u.CodeGenId == codeGenId).ToListAsync();
|
||||
codeGenConfigList.ForEach(u =>
|
||||
|
||||
@@ -204,12 +204,12 @@ namespace Dilon.Core.Service.CodeGen
|
||||
{
|
||||
u.Delete();
|
||||
});
|
||||
|
||||
var emptyGuid = System.Guid.Empty.ToString();
|
||||
// 目录
|
||||
var menuType0 = new SysMenu
|
||||
{
|
||||
Pid = 0,
|
||||
Pids = "[0],",
|
||||
Pid = emptyGuid,
|
||||
Pids = "["+ emptyGuid + "],",
|
||||
Name = busName + "管理",
|
||||
Code = "dilon_" + className.ToLower(),
|
||||
Type = 1,
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 代码生成主表ID
|
||||
/// </summary>
|
||||
public long CodeGenId { get; set; }
|
||||
public string CodeGenId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库字段名
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace Dilon.Core.Service
|
||||
/// 代码生成器Id
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "代码生成器Id不能为空")]
|
||||
public long Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
}
|
||||
|
||||
public class UpdateCodeGenInput : CodeGenInput
|
||||
@@ -114,7 +114,7 @@ namespace Dilon.Core.Service
|
||||
/// 代码生成器Id
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "代码生成器Id不能为空")]
|
||||
public long Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
}
|
||||
|
||||
public class QueryCodeGenInput : DeleteCodeGenInput
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Dilon.Core.Service
|
||||
Task Add(CodeGenConfig input);
|
||||
void AddList(List<TableColumnOuput> tableColumnOuputList, SysCodeGen codeGenerate);
|
||||
string ConvertDataType(string dataType);
|
||||
Task Delete(long codeGenId);
|
||||
Task Delete(string codeGenId);
|
||||
Task<SysCodeGenConfig> Detail(CodeGenConfig input);
|
||||
Task<List<CodeGenConfig>> List([FromQuery] CodeGenConfig input);
|
||||
Task Update(List<CodeGenConfig> inputList);
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Dilon.Core.Service
|
||||
/// 应用Id
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "参数Id不能为空")]
|
||||
public long Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
}
|
||||
|
||||
public class UpdateConfigInput : AddConfigInput
|
||||
@@ -73,7 +73,7 @@ namespace Dilon.Core.Service
|
||||
/// 应用Id
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "应用Id不能为空")]
|
||||
public long Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
}
|
||||
|
||||
public class QueryConfigInput : DeleteConfigInput
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Dilon.Core.Service
|
||||
/// <summary>
|
||||
/// 字典类型Id
|
||||
/// </summary>
|
||||
public virtual long TypeId { get; set; }
|
||||
public virtual string TypeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 值
|
||||
@@ -45,7 +45,7 @@ namespace Dilon.Core.Service
|
||||
/// 字典类型Id
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "字典类型Id不能为空"), DataValidation(ValidationTypes.Numeric)]
|
||||
public long TypeId { get; set; }
|
||||
public string TypeId { get; set; }
|
||||
}
|
||||
|
||||
public class AddDictDataInput : DictDataInput
|
||||
@@ -54,7 +54,7 @@ namespace Dilon.Core.Service
|
||||
/// 字典类型Id
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "字典类型Id不能为空"), DataValidation(ValidationTypes.Numeric)]
|
||||
public override long TypeId { get; set; }
|
||||
public override string TypeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 值
|
||||
@@ -75,7 +75,7 @@ namespace Dilon.Core.Service
|
||||
/// 字典值Id
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "字典值Id不能为空"), DataValidation(ValidationTypes.Numeric)]
|
||||
public long Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
}
|
||||
|
||||
public class UpdateDictDataInput : AddDictDataInput
|
||||
@@ -84,7 +84,7 @@ namespace Dilon.Core.Service
|
||||
/// 字典值Id
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "字典值Id不能为空"), DataValidation(ValidationTypes.Numeric)]
|
||||
public long Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
}
|
||||
|
||||
public class QueryDictDataInput : DeleteDictDataInput
|
||||
|
||||
@@ -10,12 +10,12 @@ namespace Dilon.Core.Service
|
||||
/// <summary>
|
||||
/// Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 父Id
|
||||
/// </summary>
|
||||
public long Pid { get; set; }
|
||||
public string Pid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 编码-对应字典值的编码
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace Dilon.Core.Service
|
||||
/// 编号Id
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "字典类型Id不能为空")]
|
||||
public long Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
}
|
||||
|
||||
public class UpdateDictTypeInput : AddDictTypeInput
|
||||
@@ -63,7 +63,7 @@ namespace Dilon.Core.Service
|
||||
/// Id
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "字典类型Id不能为空")]
|
||||
public long Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
}
|
||||
|
||||
public class DropDownDictTypeInput
|
||||
|
||||
@@ -7,11 +7,11 @@ namespace Dilon.Core.Service
|
||||
{
|
||||
Task AddDictData(AddDictDataInput input);
|
||||
Task ChangeDictDataStatus(UpdateDictDataInput input);
|
||||
Task DeleteByTypeId(long dictTypeId);
|
||||
Task DeleteByTypeId(string dictTypeId);
|
||||
Task DeleteDictData(DeleteDictDataInput input);
|
||||
Task<dynamic> GetDictData([FromQuery] QueryDictDataInput input);
|
||||
Task<dynamic> GetDictDataList([FromQuery] QueryDictDataListInput input);
|
||||
Task<dynamic> GetDictDataListByDictTypeId(long dictTypeId);
|
||||
Task<dynamic> GetDictDataListByDictTypeId(string dictTypeId);
|
||||
Task<dynamic> QueryDictDataPageList([FromQuery] DictDataInput input);
|
||||
Task UpdateDictData(UpdateDictDataInput input);
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace Dilon.Core.Service
|
||||
/// <param name="dictTypeId"></param>
|
||||
/// <returns></returns>
|
||||
[NonAction]
|
||||
public async Task<dynamic> GetDictDataListByDictTypeId(long dictTypeId)
|
||||
public async Task<dynamic> GetDictDataListByDictTypeId(string dictTypeId)
|
||||
{
|
||||
return await _sysDictDataRep.DetachedEntities.Where(u => u.SysDictType.Id == dictTypeId)
|
||||
.Where(u => u.Status != CommonStatus.DELETED).OrderBy(u => u.Sort)
|
||||
@@ -152,7 +152,7 @@ namespace Dilon.Core.Service
|
||||
/// </summary>
|
||||
/// <param name="dictTypeId"></param>
|
||||
[NonAction]
|
||||
public async Task DeleteByTypeId(long dictTypeId)
|
||||
public async Task DeleteByTypeId(string dictTypeId)
|
||||
{
|
||||
var dictDatas = await _sysDictDataRep.Where(u => u.TypeId == dictTypeId).ToListAsync();
|
||||
dictDatas.ForEach(u =>
|
||||
|
||||
Reference in New Issue
Block a user