feat: 完成字典模块改造,前端完成首页界面
This commit is contained in:
@@ -4,28 +4,6 @@
|
||||
<name>Yi.RBAC.Application</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<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>
|
||||
登录
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
using Yi.RBAC.Application.Contracts.Dictionary;
|
||||
using Cike.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;
|
||||
|
||||
namespace Yi.RBAC.Application.Dictionary
|
||||
{
|
||||
/// <summary>
|
||||
/// Dictionary服务实现
|
||||
/// </summary>
|
||||
[AppService]
|
||||
public class DictionaryService : CrudAppService<DictionaryEntity, DictionaryGetOutputDto, DictionaryGetListOutputDto, long, DictionaryGetListInputVo, DictionaryCreateInputVo, DictionaryUpdateInputVo>,
|
||||
IDictionaryService, IAutoApiService
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
|
||||
public override async Task<PagedResultDto<DictionaryGetListOutputDto>> GetListAsync(DictionaryGetListInputVo input)
|
||||
{
|
||||
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(input.PageNum, input.PageSize, total);
|
||||
return new PagedResultDto<DictionaryGetListOutputDto>
|
||||
{
|
||||
Total = total,
|
||||
Items = await MapToGetListOutputDtosAsync(entities)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/// <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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
using Yi.RBAC.Application.Contracts.Dictionary;
|
||||
using Cike.AutoWebApi.Setting;
|
||||
using Yi.RBAC.Application.Contracts.Dictionary.Dtos;
|
||||
using Yi.RBAC.Domain.Dictionary.Entities;
|
||||
using Yi.Framework.Ddd.Services;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Yi.RBAC.Application.Dictionary
|
||||
{
|
||||
/// <summary>
|
||||
/// DictionaryType服务实现
|
||||
/// </summary>
|
||||
[AppService]
|
||||
public class DictionaryTypeService : CrudAppService<DictionaryTypeEntity, DictionaryTypeGetOutputDto, DictionaryTypeGetListOutputDto, long, DictionaryTypeGetListInputVo, DictionaryTypeCreateInputVo, DictionaryTypeUpdateInputVo>,
|
||||
IDictionaryTypeService, IAutoApiService
|
||||
{
|
||||
|
||||
|
||||
public async override Task<PagedResultDto<DictionaryTypeGetListOutputDto>> GetListAsync(DictionaryTypeGetListInputVo input)
|
||||
{
|
||||
|
||||
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(input.StartTime is not null && input.EndTime is not null, x => x.CreationTime >= input.StartTime && x.CreationTime <= input.EndTime)
|
||||
.ToPageListAsync(input.PageNum, input.PageSize, total);
|
||||
|
||||
return new PagedResultDto<DictionaryTypeGetListOutputDto>
|
||||
{
|
||||
Total = total,
|
||||
Items = await MapToGetListOutputDtosAsync(entities)
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user