完成字典、字典类型管理相关
This commit is contained in:
@@ -4,6 +4,26 @@
|
||||
<name>Yi.RBAC.Application.Contracts</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Yi.RBAC.Application.Contracts.Dictionary.Dtos.DictionaryTypeCreateInputVo">
|
||||
<summary>
|
||||
DictionaryType输入创建对象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.RBAC.Application.Contracts.Dictionary.Dtos.DictionaryCreateInputVo">
|
||||
<summary>
|
||||
Dictionary输入创建对象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.RBAC.Application.Contracts.Dictionary.IDictionaryService">
|
||||
<summary>
|
||||
Dictionary服务抽象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.RBAC.Application.Contracts.Dictionary.IDictionaryTypeService">
|
||||
<summary>
|
||||
DictionaryType服务抽象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.RBAC.Application.Contracts.Identity.Dtos.DeptCreateInputVo">
|
||||
<summary>
|
||||
Dept输入创建对象
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.RBAC.Application.Contracts.Dictionary.Dtos
|
||||
{
|
||||
/// <summary>
|
||||
/// Dictionary输入创建对象
|
||||
/// </summary>
|
||||
public class DictionaryCreateInputVo
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public long? CreatorId { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public string? ListClass { get; set; }
|
||||
public string? CssClass { get; set; }
|
||||
public string DictType { get; set; } = string.Empty;
|
||||
public string? DictLabel { get; set; }
|
||||
public string DictValue { get; set; } = string.Empty;
|
||||
public bool IsDefault { get; set; }
|
||||
|
||||
public bool State { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.RBAC.Application.Contracts.Dictionary.Dtos
|
||||
{
|
||||
public class DictionaryGetListInputVo : PagedAndSortedResultRequestDto
|
||||
{
|
||||
public string? DictType { get; set; }
|
||||
public string? DictLabel { get; set; }
|
||||
public bool? State { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.RBAC.Application.Contracts.Dictionary.Dtos
|
||||
{
|
||||
public class DictionaryGetListOutputDto : IEntityDto<long>
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public long? CreatorId { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public string? ListClass { get; set; }
|
||||
public string? CssClass { get; set; }
|
||||
public string DictType { get; set; } = string.Empty;
|
||||
public string? DictLabel { get; set; }
|
||||
public string DictValue { get; set; } = string.Empty;
|
||||
public bool IsDefault { get; set; }
|
||||
public bool State { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.RBAC.Application.Contracts.Dictionary.Dtos
|
||||
{
|
||||
public class DictionaryGetOutputDto : IEntityDto<long>
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public long? CreatorId { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public string? ListClass { get; set; }
|
||||
public string? CssClass { get; set; }
|
||||
public string DictType { get; set; } = string.Empty;
|
||||
public string? DictLabel { get; set; }
|
||||
public string DictValue { get; set; } = string.Empty;
|
||||
public bool IsDefault { get; set; }
|
||||
|
||||
public bool State { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.RBAC.Application.Contracts.Dictionary.Dtos
|
||||
{
|
||||
public class DictionaryUpdateInputVo
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public long? CreatorId { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public string? ListClass { get; set; }
|
||||
public string? CssClass { get; set; }
|
||||
public string DictType { get; set; } = string.Empty;
|
||||
public string? DictLabel { get; set; }
|
||||
public string DictValue { get; set; } = string.Empty;
|
||||
public bool IsDefault { get; set; }
|
||||
|
||||
public bool State { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.RBAC.Application.Contracts.Dictionary.Dtos
|
||||
{
|
||||
/// <summary>
|
||||
/// DictionaryType输入创建对象
|
||||
/// </summary>
|
||||
public class DictionaryTypeCreateInputVo
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public long? CreatorId { get; set; }
|
||||
public string DictName { get; set; } = string.Empty;
|
||||
public string DictType { get; set; } = string.Empty;
|
||||
public string? Remark { get; set; }
|
||||
|
||||
public bool State { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.RBAC.Application.Contracts.Dictionary.Dtos
|
||||
{
|
||||
public class DictionaryTypeGetListInputVo : PagedAllResultRequestDto
|
||||
{
|
||||
public string? DictName { get; set; }
|
||||
public string? DictType { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
|
||||
public bool? State { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.RBAC.Application.Contracts.Dictionary.Dtos
|
||||
{
|
||||
public class DictionaryTypeGetListOutputDto : IEntityDto<long>
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public long? CreatorId { get; set; }
|
||||
public string DictName { get; set; } = string.Empty;
|
||||
public string DictType { get; set; } = string.Empty;
|
||||
public string? Remark { get; set; }
|
||||
|
||||
public bool State { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.RBAC.Application.Contracts.Dictionary.Dtos
|
||||
{
|
||||
public class DictionaryTypeGetOutputDto : IEntityDto<long>
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public long? CreatorId { get; set; }
|
||||
public string DictName { get; set; } = string.Empty;
|
||||
public string DictType { get; set; } = string.Empty;
|
||||
public string? Remark { get; set; }
|
||||
|
||||
public bool State { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.RBAC.Application.Contracts.Dictionary.Dtos
|
||||
{
|
||||
public class DictionaryTypeUpdateInputVo
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public long? CreatorId { get; set; }
|
||||
public string DictName { get; set; } = string.Empty;
|
||||
public string DictType { get; set; } = string.Empty;
|
||||
public string? Remark { get; set; }
|
||||
public bool State { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.RBAC.Application.Contracts.Dictionary.Dtos;
|
||||
using Yi.Framework.Ddd.Services.Abstract;
|
||||
|
||||
namespace Yi.RBAC.Application.Contracts.Dictionary
|
||||
{
|
||||
/// <summary>
|
||||
/// Dictionary服务抽象
|
||||
/// </summary>
|
||||
public interface IDictionaryService : ICrudAppService<DictionaryGetOutputDto, DictionaryGetListOutputDto, long, DictionaryGetListInputVo, DictionaryCreateInputVo, DictionaryUpdateInputVo>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.RBAC.Application.Contracts.Dictionary.Dtos;
|
||||
using Yi.Framework.Ddd.Services.Abstract;
|
||||
|
||||
namespace Yi.RBAC.Application.Contracts.Dictionary
|
||||
{
|
||||
/// <summary>
|
||||
/// DictionaryType服务抽象
|
||||
/// </summary>
|
||||
public interface IDictionaryTypeService : ICrudAppService<DictionaryTypeGetOutputDto, DictionaryTypeGetListOutputDto, long, DictionaryTypeGetListInputVo, DictionaryTypeCreateInputVo, DictionaryTypeUpdateInputVo>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.RBAC.Application.Contracts.Account.Dtos
|
||||
namespace Yi.RBAC.Application.Contracts.Identity.Dtos.Account
|
||||
{
|
||||
public class LoginInputVo
|
||||
{
|
||||
@@ -4,7 +4,29 @@
|
||||
<name>Yi.RBAC.Application</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="M:Yi.RBAC.Application.Identity.AccountService.PostLoginAsync(Yi.RBAC.Application.Contracts.Account.Dtos.LoginInputVo)">
|
||||
<member name="T:Yi.RBAC.Application.Dictionary.DictionaryService">
|
||||
<summary>
|
||||
Dictionary服务实现
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Application.Dictionary.DictionaryService._dictionaryRepository">
|
||||
<summary>
|
||||
查询
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.RBAC.Application.Dictionary.DictionaryService.GetDicType(System.String)">
|
||||
<summary>
|
||||
根据字典类型获取字典列表
|
||||
</summary>
|
||||
<param name="dicType"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:Yi.RBAC.Application.Dictionary.DictionaryTypeService">
|
||||
<summary>
|
||||
DictionaryType服务实现
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.RBAC.Application.Identity.AccountService.PostLoginAsync(Yi.RBAC.Application.Contracts.Identity.Dtos.Account.LoginInputVo)">
|
||||
<summary>
|
||||
登录
|
||||
</summary>
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
using Yi.RBAC.Application.Contracts.Dictionary;
|
||||
using NET.AutoWebApi.Setting;
|
||||
using Yi.RBAC.Application.Contracts.Dictionary.Dtos;
|
||||
using Yi.RBAC.Domain.Dictionary.Entities;
|
||||
using Yi.Framework.Ddd.Services;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
using Yi.RBAC.Domain.Dictionary.Repositories;
|
||||
|
||||
namespace Yi.RBAC.Application.Dictionary
|
||||
{
|
||||
/// <summary>
|
||||
/// Dictionary服务实现
|
||||
/// </summary>
|
||||
[AppService]
|
||||
public class DictionaryService : CrudAppService<DictionaryEntity, DictionaryGetOutputDto, DictionaryGetListOutputDto, long, DictionaryGetListInputVo, DictionaryCreateInputVo, DictionaryUpdateInputVo>,
|
||||
IDictionaryService, IAutoApiService
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
[Autowired]
|
||||
private IDictionaryRepository _dictionaryRepository { get; set; }
|
||||
public override async Task<PagedResultDto<DictionaryGetListOutputDto>> GetListAsync(DictionaryGetListInputVo input)
|
||||
{
|
||||
var data = await _dictionaryRepository.SelectGetListAsync(await MapToEntityAsync(input), input);
|
||||
return new PagedResultDto<DictionaryGetListOutputDto>
|
||||
{
|
||||
Total = data.Total,
|
||||
Items = await MapToGetListOutputDtosAsync(data.Items)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据字典类型获取字典列表
|
||||
/// </summary>
|
||||
/// <param name="dicType"></param>
|
||||
/// <returns></returns>
|
||||
[Route("/api/dictionary/dic-type/{dicType}")]
|
||||
public async Task<List<DictionaryGetListOutputDto>> GetDicType([FromRoute] string dicType)
|
||||
{
|
||||
var entities = await _repository.GetListAsync(u => u.DictType == dicType && u.State == true);
|
||||
var result = await MapToGetListOutputDtosAsync(entities);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using Yi.RBAC.Application.Contracts.Dictionary;
|
||||
using NET.AutoWebApi.Setting;
|
||||
using Yi.RBAC.Application.Contracts.Dictionary.Dtos;
|
||||
using Yi.RBAC.Domain.Dictionary.Entities;
|
||||
using Yi.Framework.Ddd.Services;
|
||||
using Yi.RBAC.Domain.Dictionary.Repositories;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.RBAC.Application.Dictionary
|
||||
{
|
||||
/// <summary>
|
||||
/// DictionaryType服务实现
|
||||
/// </summary>
|
||||
[AppService]
|
||||
public class DictionaryTypeService : CrudAppService<DictionaryTypeEntity, DictionaryTypeGetOutputDto, DictionaryTypeGetListOutputDto, long, DictionaryTypeGetListInputVo, DictionaryTypeCreateInputVo, DictionaryTypeUpdateInputVo>,
|
||||
IDictionaryTypeService, IAutoApiService
|
||||
{
|
||||
|
||||
[Autowired]
|
||||
private IDictionaryTypeRepository _dictionaryTypeRepository { get; set; }
|
||||
|
||||
public async override Task<PagedResultDto<DictionaryTypeGetListOutputDto>> GetListAsync(DictionaryTypeGetListInputVo input)
|
||||
{
|
||||
var data = await _dictionaryTypeRepository.SelectGetListAsync(await MapToEntityAsync(input), input);
|
||||
return new PagedResultDto<DictionaryTypeGetListOutputDto>
|
||||
{
|
||||
Total = data.Total,
|
||||
Items = await MapToGetListOutputDtosAsync(data.Items)
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using AutoMapper;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.RBAC.Application.Contracts.Dictionary.Dtos;
|
||||
using Yi.RBAC.Domain.Dictionary.Entities;
|
||||
|
||||
namespace Yi.RBAC.Application.Dictionary.MapperConfig
|
||||
{
|
||||
public class DictionaryProfile: Profile
|
||||
{
|
||||
public DictionaryProfile()
|
||||
{
|
||||
CreateMap<DictionaryGetListInputVo, DictionaryEntity>();
|
||||
CreateMap<DictionaryCreateInputVo, DictionaryEntity>();
|
||||
CreateMap<DictionaryUpdateInputVo, DictionaryEntity>();
|
||||
CreateMap<DictionaryEntity, DictionaryGetListOutputDto>();
|
||||
CreateMap<DictionaryEntity, DictionaryGetOutputDto>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using AutoMapper;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.RBAC.Application.Contracts.Dictionary.Dtos;
|
||||
using Yi.RBAC.Domain.Dictionary.Entities;
|
||||
|
||||
namespace Yi.RBAC.Application.Dictionary.MapperConfig
|
||||
{
|
||||
public class DictionaryTypeProfile: Profile
|
||||
{
|
||||
public DictionaryTypeProfile()
|
||||
{
|
||||
CreateMap<DictionaryTypeGetListInputVo, DictionaryTypeEntity>();
|
||||
CreateMap<DictionaryTypeCreateInputVo, DictionaryTypeEntity>();
|
||||
CreateMap<DictionaryTypeUpdateInputVo, DictionaryTypeEntity>();
|
||||
CreateMap<DictionaryTypeEntity, DictionaryTypeGetListOutputDto>();
|
||||
CreateMap<DictionaryTypeEntity, DictionaryTypeGetOutputDto>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,6 @@ using Yi.Framework.Core.Exceptions;
|
||||
using Yi.Framework.Ddd.Repositories;
|
||||
using Yi.Framework.Ddd.Services;
|
||||
using Yi.Framework.ThumbnailSharp;
|
||||
using Yi.RBAC.Application.Contracts.Account.Dtos;
|
||||
using Yi.RBAC.Application.Contracts.Identity;
|
||||
using Yi.RBAC.Application.Contracts.Identity.Dtos.Account;
|
||||
using Yi.RBAC.Domain.Identity;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.RBAC.Domain.Shared.Dictionary.ConstClasses
|
||||
{
|
||||
/// <summary>
|
||||
/// 常量定义
|
||||
/// </summary>
|
||||
|
||||
public class DictionaryConst
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.RBAC.Domain.Shared.Dictionary.ConstClasses
|
||||
{
|
||||
/// <summary>
|
||||
/// 常量定义
|
||||
/// </summary>
|
||||
|
||||
public class DictionaryTypeConst
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,369 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Data.DataSeeds;
|
||||
using Yi.Framework.Ddd.Repositories;
|
||||
using Yi.RBAC.Domain.Dictionary.Entities;
|
||||
|
||||
namespace Yi.RBAC.Domain.DataSeeds
|
||||
{
|
||||
[AppService(typeof(IDataSeed))]
|
||||
public class DictionaryDataSeed : AbstractDataSeed<DictionaryEntity>
|
||||
{
|
||||
public DictionaryDataSeed(IRepository<DictionaryEntity> repository) : base(repository)
|
||||
{
|
||||
}
|
||||
|
||||
public override List<DictionaryEntity> GetSeedData()
|
||||
{
|
||||
List<DictionaryEntity> entities= new List<DictionaryEntity>();
|
||||
DictionaryEntity dictInfo1 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "男",
|
||||
DictValue = "0",
|
||||
DictType = "sys_user_sex",
|
||||
OrderNum = 100,
|
||||
Remark = "性别男",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dictInfo1);
|
||||
|
||||
DictionaryEntity dictInfo2 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "女",
|
||||
DictValue = "1",
|
||||
DictType = "sys_user_sex",
|
||||
OrderNum = 99,
|
||||
Remark = "性别女",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dictInfo2);
|
||||
|
||||
DictionaryEntity dictInfo3 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "未知",
|
||||
DictValue = "2",
|
||||
DictType = "sys_user_sex",
|
||||
OrderNum = 98,
|
||||
Remark = "性别未知",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dictInfo3);
|
||||
|
||||
|
||||
|
||||
DictionaryEntity dictInfo4 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "显示",
|
||||
DictValue = "true",
|
||||
DictType = "sys_show_hide",
|
||||
OrderNum = 100,
|
||||
Remark = "显示菜单",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dictInfo4);
|
||||
|
||||
DictionaryEntity dictInfo5 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "隐藏",
|
||||
DictValue = "false",
|
||||
DictType = "sys_show_hide",
|
||||
OrderNum = 99,
|
||||
Remark = "隐藏菜单",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dictInfo5);
|
||||
|
||||
|
||||
|
||||
DictionaryEntity dictInfo6 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "正常",
|
||||
DictValue = "true",
|
||||
DictType = "sys_normal_disable",
|
||||
OrderNum = 100,
|
||||
Remark = "正常状态",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dictInfo6);
|
||||
DictionaryEntity dictInfo7 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "停用",
|
||||
DictValue = "false",
|
||||
DictType = "sys_normal_disable",
|
||||
OrderNum = 99,
|
||||
Remark = "停用状态",
|
||||
IsDeleted = false,
|
||||
ListClass = "danger"
|
||||
};
|
||||
entities.Add(dictInfo7);
|
||||
|
||||
|
||||
|
||||
DictionaryEntity dictInfo8 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "正常",
|
||||
DictValue = "0",
|
||||
DictType = "sys_job_status",
|
||||
OrderNum = 100,
|
||||
Remark = "正常状态",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dictInfo8);
|
||||
DictionaryEntity dictInfo9 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "暂停",
|
||||
DictValue = "1",
|
||||
DictType = "sys_job_status",
|
||||
OrderNum = 99,
|
||||
Remark = "停用状态",
|
||||
IsDeleted = false,
|
||||
ListClass = "danger"
|
||||
};
|
||||
entities.Add(dictInfo9);
|
||||
|
||||
|
||||
|
||||
|
||||
DictionaryEntity dictInfo10 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "默认",
|
||||
DictValue = "DEFAULT",
|
||||
DictType = "sys_job_group",
|
||||
OrderNum = 100,
|
||||
Remark = "默认分组",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dictInfo10);
|
||||
DictionaryEntity dictInfo11 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "系统",
|
||||
DictValue = "SYSTEM",
|
||||
DictType = "sys_job_group",
|
||||
OrderNum = 99,
|
||||
Remark = "系统分组",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dictInfo11);
|
||||
|
||||
|
||||
|
||||
DictionaryEntity dictInfo12 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "是",
|
||||
DictValue = "Y",
|
||||
DictType = "sys_yes_no",
|
||||
OrderNum = 100,
|
||||
Remark = "系统默认是",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dictInfo12);
|
||||
DictionaryEntity dictInfo13 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "否",
|
||||
DictValue = "N",
|
||||
DictType = "sys_yes_no",
|
||||
OrderNum = 99,
|
||||
Remark = "系统默认否",
|
||||
IsDeleted = false,
|
||||
ListClass = "danger"
|
||||
};
|
||||
entities.Add(dictInfo13);
|
||||
|
||||
|
||||
|
||||
DictionaryEntity dictInfo14 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "通知",
|
||||
DictValue = "1",
|
||||
DictType = "sys_notice_type",
|
||||
OrderNum = 100,
|
||||
Remark = "通知",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dictInfo14);
|
||||
DictionaryEntity dictInfo15 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "公告",
|
||||
DictValue = "2",
|
||||
DictType = "sys_notice_type",
|
||||
OrderNum = 99,
|
||||
Remark = "公告",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dictInfo15);
|
||||
|
||||
DictionaryEntity dictInfo16 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "正常",
|
||||
DictValue = "0",
|
||||
DictType = "sys_notice_status",
|
||||
OrderNum = 100,
|
||||
Remark = "正常状态",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dictInfo16);
|
||||
DictionaryEntity dictInfo17 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "关闭",
|
||||
DictValue = "1",
|
||||
DictType = "sys_notice_status",
|
||||
OrderNum = 99,
|
||||
Remark = "关闭状态",
|
||||
IsDeleted = false,
|
||||
ListClass = "danger"
|
||||
};
|
||||
entities.Add(dictInfo17);
|
||||
|
||||
DictionaryEntity dictInfo18 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "新增",
|
||||
DictValue = "1",
|
||||
DictType = "sys_oper_type",
|
||||
OrderNum = 100,
|
||||
Remark = "新增操作",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dictInfo18);
|
||||
DictionaryEntity dictInfo19 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "修改",
|
||||
DictValue = "2",
|
||||
DictType = "sys_oper_type",
|
||||
OrderNum = 99,
|
||||
Remark = "修改操作",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dictInfo19);
|
||||
DictionaryEntity dictInfo22 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "删除",
|
||||
DictValue = "3",
|
||||
DictType = "sys_oper_type",
|
||||
OrderNum = 98,
|
||||
Remark = "删除操作",
|
||||
IsDeleted = false,
|
||||
ListClass = "danger"
|
||||
};
|
||||
entities.Add(dictInfo22);
|
||||
DictionaryEntity dictInfo23 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "授权",
|
||||
DictValue = "4",
|
||||
DictType = "sys_oper_type",
|
||||
OrderNum = 97,
|
||||
Remark = "授权操作",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dictInfo23);
|
||||
DictionaryEntity dictInfo24 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "导出",
|
||||
DictValue = "5",
|
||||
DictType = "sys_oper_type",
|
||||
OrderNum = 96,
|
||||
Remark = "导出操作",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dictInfo24);
|
||||
DictionaryEntity dictInfo25 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "导入",
|
||||
DictValue = "6",
|
||||
DictType = "sys_oper_type",
|
||||
OrderNum = 95,
|
||||
Remark = "导入操作",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dictInfo25);
|
||||
DictionaryEntity dictInfo26 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "强退",
|
||||
DictValue = "7",
|
||||
DictType = "sys_oper_type",
|
||||
OrderNum = 94,
|
||||
Remark = "强退操作",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dictInfo26);
|
||||
DictionaryEntity dictInfo27 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "生成代码",
|
||||
DictValue = "8",
|
||||
DictType = "sys_oper_type",
|
||||
OrderNum = 93,
|
||||
Remark = "生成代码操作",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dictInfo27);
|
||||
DictionaryEntity dictInfo28 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "清空数据",
|
||||
DictValue = "9",
|
||||
DictType = "sys_oper_type",
|
||||
OrderNum = 92,
|
||||
Remark = "清空数据操作",
|
||||
IsDeleted = false,
|
||||
ListClass = "danger"
|
||||
};
|
||||
entities.Add(dictInfo28);
|
||||
|
||||
|
||||
|
||||
DictionaryEntity dictInfo20 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "成功",
|
||||
DictValue = "false",
|
||||
DictType = "sys_common_status",
|
||||
OrderNum = 100,
|
||||
Remark = "正常状态",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dictInfo20);
|
||||
DictionaryEntity dictInfo21 = new DictionaryEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictLabel = "失败",
|
||||
DictValue = "true",
|
||||
DictType = "sys_common_status",
|
||||
OrderNum = 99,
|
||||
Remark = "失败状态",
|
||||
IsDeleted = false,
|
||||
ListClass = "danger"
|
||||
};
|
||||
entities.Add(dictInfo21);
|
||||
|
||||
return entities;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Data.DataSeeds;
|
||||
using Yi.Framework.Ddd.Repositories;
|
||||
using Yi.RBAC.Domain.Dictionary.Entities;
|
||||
|
||||
namespace Yi.RBAC.Domain.DataSeeds
|
||||
{
|
||||
[AppService(typeof(IDataSeed))]
|
||||
public class DictionaryTypeDataSeed : AbstractDataSeed<DictionaryTypeEntity>
|
||||
{
|
||||
public DictionaryTypeDataSeed(IRepository<DictionaryTypeEntity> repository) : base(repository)
|
||||
{
|
||||
}
|
||||
|
||||
public override List<DictionaryTypeEntity> GetSeedData()
|
||||
{
|
||||
List<DictionaryTypeEntity> entities= new List<DictionaryTypeEntity>();
|
||||
DictionaryTypeEntity dict1 = new DictionaryTypeEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictName = "用户性别",
|
||||
DictType = "sys_user_sex",
|
||||
OrderNum = 100,
|
||||
Remark = "用户性别列表",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dict1);
|
||||
|
||||
DictionaryTypeEntity dict2 = new DictionaryTypeEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictName = "菜单状态",
|
||||
DictType = "sys_show_hide",
|
||||
OrderNum = 100,
|
||||
Remark = "菜单状态列表",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dict2);
|
||||
|
||||
DictionaryTypeEntity dict3 = new DictionaryTypeEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictName = "系统开关",
|
||||
DictType = "sys_normal_disable",
|
||||
OrderNum = 100,
|
||||
Remark = "系统开关列表",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dict3);
|
||||
|
||||
DictionaryTypeEntity dict4 = new DictionaryTypeEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictName = "任务状态",
|
||||
DictType = "sys_job_status",
|
||||
OrderNum = 100,
|
||||
Remark = "任务状态列表",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dict4);
|
||||
|
||||
DictionaryTypeEntity dict5 = new DictionaryTypeEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictName = "任务分组",
|
||||
DictType = "sys_job_group",
|
||||
OrderNum = 100,
|
||||
Remark = "任务分组列表",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dict5);
|
||||
|
||||
DictionaryTypeEntity dict6 = new DictionaryTypeEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictName = "系统是否",
|
||||
DictType = "sys_yes_no",
|
||||
OrderNum = 100,
|
||||
Remark = "系统是否列表",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dict6);
|
||||
|
||||
DictionaryTypeEntity dict7 = new DictionaryTypeEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictName = "通知类型",
|
||||
DictType = "sys_notice_type",
|
||||
OrderNum = 100,
|
||||
Remark = "通知类型列表",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dict7);
|
||||
DictionaryTypeEntity dict8 = new DictionaryTypeEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictName = "通知状态",
|
||||
DictType = "sys_notice_status",
|
||||
OrderNum = 100,
|
||||
Remark = "通知状态列表",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dict8);
|
||||
|
||||
DictionaryTypeEntity dict9 = new DictionaryTypeEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictName = "操作类型",
|
||||
DictType = "sys_oper_type",
|
||||
OrderNum = 100,
|
||||
Remark = "操作类型列表",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dict9);
|
||||
|
||||
|
||||
DictionaryTypeEntity dict10 = new DictionaryTypeEntity()
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId(),
|
||||
DictName = "系统状态",
|
||||
DictType = "sys_common_status",
|
||||
OrderNum = 100,
|
||||
Remark = "登录状态列表",
|
||||
IsDeleted = false,
|
||||
};
|
||||
entities.Add(dict10);
|
||||
return entities;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Data.Auditing;
|
||||
using Yi.Framework.Data.Entities;
|
||||
using Yi.Framework.Ddd.Entities;
|
||||
|
||||
namespace Yi.RBAC.Domain.Dictionary.Entities
|
||||
{
|
||||
[SugarTable("Dictionary")]
|
||||
public class DictionaryEntity : AuditedObject, IEntity<long>, ISoftDelete, IOrderNum,IState
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 逻辑删除
|
||||
/// </summary>
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
public int OrderNum { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public bool? State { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string? Remark { get; set; }
|
||||
/// <summary>
|
||||
/// tag类型
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "ListClass")]
|
||||
public string? ListClass { get; set; }
|
||||
/// <summary>
|
||||
/// tagClass
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "CssClass")]
|
||||
public string? CssClass { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 字典类型
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "DictType")]
|
||||
public string DictType { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 字典标签
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "DictLabel")]
|
||||
public string? DictLabel { get; set; }
|
||||
/// <summary>
|
||||
/// 字典值
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "DictValue")]
|
||||
public string DictValue { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 是否为该类型的默认值
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "IsDefault")]
|
||||
public bool IsDefault { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Data.Auditing;
|
||||
using Yi.Framework.Data.Entities;
|
||||
using Yi.Framework.Ddd.Entities;
|
||||
|
||||
namespace Yi.RBAC.Domain.Dictionary.Entities
|
||||
{
|
||||
[SugarTable("DictionaryType")]
|
||||
public class DictionaryTypeEntity : AuditedObject,IEntity<long>, ISoftDelete, IOrderNum
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 逻辑删除
|
||||
/// </summary>
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
public int OrderNum { get; set; } = 0;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public bool? State { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 字典名称
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "DictName")]
|
||||
public string DictName { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 字典类型
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "DictType")]
|
||||
public string DictType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
using Yi.Framework.Ddd.Dtos.Abstract;
|
||||
using Yi.Framework.Ddd.Repositories;
|
||||
using Yi.RBAC.Domain.Dictionary.Entities;
|
||||
using Yi.RBAC.Domain.Identity.Entities;
|
||||
|
||||
namespace Yi.RBAC.Domain.Dictionary.Repositories
|
||||
{
|
||||
public interface IDictionaryRepository : IRepository<DictionaryEntity>
|
||||
{
|
||||
Task<PagedDto<DictionaryEntity>> SelectGetListAsync(DictionaryEntity input, IPagedAndSortedResultRequestDto pageInput);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
using Yi.Framework.Ddd.Dtos.Abstract;
|
||||
using Yi.Framework.Ddd.Repositories;
|
||||
using Yi.RBAC.Domain.Dictionary.Entities;
|
||||
using Yi.RBAC.Domain.Identity.Entities;
|
||||
|
||||
namespace Yi.RBAC.Domain.Dictionary.Repositories
|
||||
{
|
||||
public interface IDictionaryTypeRepository : IRepository<DictionaryTypeEntity>
|
||||
{
|
||||
Task<PagedDto<DictionaryTypeEntity>> SelectGetListAsync(DictionaryTypeEntity input, IPagedAllResultRequestDto pageInput);
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,96 @@
|
||||
<name>Yi.RBAC.Domain</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="P:Yi.RBAC.Domain.Dictionary.Entities.DictionaryEntity.Id">
|
||||
<summary>
|
||||
主键
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Dictionary.Entities.DictionaryEntity.IsDeleted">
|
||||
<summary>
|
||||
逻辑删除
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Dictionary.Entities.DictionaryEntity.OrderNum">
|
||||
<summary>
|
||||
排序
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Dictionary.Entities.DictionaryEntity.State">
|
||||
<summary>
|
||||
状态
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Dictionary.Entities.DictionaryEntity.Remark">
|
||||
<summary>
|
||||
描述
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Dictionary.Entities.DictionaryEntity.ListClass">
|
||||
<summary>
|
||||
tag类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Dictionary.Entities.DictionaryEntity.CssClass">
|
||||
<summary>
|
||||
tagClass
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Dictionary.Entities.DictionaryEntity.DictType">
|
||||
<summary>
|
||||
字典类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Dictionary.Entities.DictionaryEntity.DictLabel">
|
||||
<summary>
|
||||
字典标签
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Dictionary.Entities.DictionaryEntity.DictValue">
|
||||
<summary>
|
||||
字典值
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Dictionary.Entities.DictionaryEntity.IsDefault">
|
||||
<summary>
|
||||
是否为该类型的默认值
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Dictionary.Entities.DictionaryTypeEntity.Id">
|
||||
<summary>
|
||||
主键
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Dictionary.Entities.DictionaryTypeEntity.IsDeleted">
|
||||
<summary>
|
||||
逻辑删除
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Dictionary.Entities.DictionaryTypeEntity.OrderNum">
|
||||
<summary>
|
||||
排序
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Dictionary.Entities.DictionaryTypeEntity.State">
|
||||
<summary>
|
||||
状态
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Dictionary.Entities.DictionaryTypeEntity.DictName">
|
||||
<summary>
|
||||
字典名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Dictionary.Entities.DictionaryTypeEntity.DictType">
|
||||
<summary>
|
||||
字典类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Dictionary.Entities.DictionaryTypeEntity.Remark">
|
||||
<summary>
|
||||
描述
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.RBAC.Domain.Identity.AccountManager">
|
||||
<summary>
|
||||
用户领域服务
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace Yi.RBAC.Domain.Identity.Entities
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public bool State { get; set; }
|
||||
public bool? State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 部门名称
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Yi.RBAC.Domain.Identity.Entities
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public bool State { get; set; }
|
||||
public bool? State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 菜单名
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Yi.RBAC.Domain.Identity.Entities
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public bool State { get; set; }
|
||||
public bool? State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 岗位编码
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace Yi.RBAC.Domain.Identity.Entities
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public bool State { get; set; }
|
||||
public bool? State { get; set; }
|
||||
|
||||
|
||||
[Navigate(typeof(RoleMenuEntity), nameof(RoleMenuEntity.RoleId), nameof(RoleMenuEntity.MenuId))]
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace Yi.RBAC.Domain.Identity.Entities
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public bool State { get; set; } = true;
|
||||
public bool? State { get; set; } = true;
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Core.Sqlsugar.Repositories;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
using Yi.Framework.Ddd.Dtos.Abstract;
|
||||
using Yi.RBAC.Domain.Dictionary.Entities;
|
||||
using Yi.RBAC.Domain.Dictionary.Repositories;
|
||||
using Yi.RBAC.Domain.Identity.Entities;
|
||||
using Yi.RBAC.Domain.Identity.Repositories;
|
||||
|
||||
namespace Yi.RBAC.Sqlsugar.Repositories
|
||||
{
|
||||
[AppService]
|
||||
public class DictionaryRepository : SqlsugarRepository<DictionaryEntity>, IDictionaryRepository
|
||||
{
|
||||
public DictionaryRepository(ISqlSugarClient context) : base(context)
|
||||
{
|
||||
}
|
||||
|
||||
public async Task<PagedDto<DictionaryEntity>> SelectGetListAsync(DictionaryEntity input, IPagedAndSortedResultRequestDto pageInput)
|
||||
{
|
||||
RefAsync<int> total = 0;
|
||||
var entities = await _DbQueryable.WhereIF(input.DictType is not null, x => x.DictType == input.DictType)
|
||||
.WhereIF(input.DictLabel is not null, x => x.DictLabel!.Contains(input.DictLabel!))
|
||||
.WhereIF(input.State is not null,x => x.State == input.State)
|
||||
.ToPageListAsync(pageInput.PageNum, pageInput.PageSize, total);
|
||||
|
||||
|
||||
return new PagedDto<DictionaryEntity>(total, entities);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Core.Sqlsugar.Repositories;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
using Yi.Framework.Ddd.Dtos.Abstract;
|
||||
using Yi.RBAC.Domain.Dictionary.Entities;
|
||||
using Yi.RBAC.Domain.Dictionary.Repositories;
|
||||
|
||||
namespace Yi.RBAC.Sqlsugar.Repositories
|
||||
{
|
||||
[AppService]
|
||||
public class DictionaryTypeRepository : SqlsugarRepository<DictionaryTypeEntity>, IDictionaryTypeRepository
|
||||
{
|
||||
public DictionaryTypeRepository(ISqlSugarClient context) : base(context)
|
||||
{
|
||||
}
|
||||
|
||||
public async Task<PagedDto<DictionaryTypeEntity>> SelectGetListAsync(DictionaryTypeEntity input, IPagedAllResultRequestDto pageInput)
|
||||
{
|
||||
RefAsync<int> total = 0;
|
||||
var entities = await _DbQueryable.WhereIF(input.DictName is not null, x => x.DictName.Contains(input.DictName!))
|
||||
.WhereIF(input.DictType is not null, x => x.DictType!.Contains(input.DictType!))
|
||||
.WhereIF(input.State is not null, x => x.State == input.State)
|
||||
.WhereIF(pageInput.StartTime is not null && pageInput.EndTime is not null ,x=>x.CreationTime>=pageInput.StartTime && x.CreationTime<=pageInput.EndTime)
|
||||
.ToPageListAsync(pageInput.PageNum, pageInput.PageSize, total);
|
||||
|
||||
|
||||
return new PagedDto<DictionaryTypeEntity>(total, entities);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,7 +29,7 @@ namespace Yi.RBAC.Sqlsugar.Repositories
|
||||
var entities = await _DbQueryable.WhereIF(!string.IsNullOrEmpty(input.UserName), x => x.UserName.Contains(input.UserName!)).
|
||||
WhereIF(input.Phone is not null, x => x.Phone.ToString()! .Contains(input.Phone.ToString()!)).
|
||||
WhereIF(!string.IsNullOrEmpty(input.Name), x => x.Name!.Contains(input.Name!)).
|
||||
WhereIF(pageInput.StartTime is not null && pageInput.EndTime is not null, x => x.CreationTime >= pageInput.StartTime && x.CreationTime <= pageInput.EndTime).ToPageListAsync(pageInput.PageIndex, pageInput.PageSize);
|
||||
WhereIF(pageInput.StartTime is not null && pageInput.EndTime is not null, x => x.CreationTime >= pageInput.StartTime && x.CreationTime <= pageInput.EndTime).ToPageListAsync(pageInput.PageNum, pageInput.PageSize);
|
||||
|
||||
return entities;
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user