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