Merge branch 'abp' into ai-hub

This commit is contained in:
chenchun
2025-11-06 11:00:04 +08:00
10 changed files with 68 additions and 31 deletions

View File

@@ -51,7 +51,7 @@ namespace Yi.Framework.Rbac.Application.Services.System
.WhereIF(!string.IsNullOrEmpty(input.DeptName), u => u.DeptName.Contains(input.DeptName!))
.WhereIF(input.State is not null, u => u.State == input.State)
.OrderBy(u => u.OrderNum, OrderByType.Asc)
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
.ToListAsync();
return new PagedResultDto<DeptGetListOutputDto>
{
Items = await MapToGetListOutputDtosAsync(entities),

View File

@@ -1,3 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using Volo.Abp.Application.Dtos;
using Yi.Framework.Ddd.Application;
@@ -54,5 +55,25 @@ namespace Yi.Framework.Rbac.Application.Services.System
throw new UserFriendlyException(RoleConst.Exist);
}
}
/// <summary>
/// 更新状态
/// </summary>
/// <param name="id"></param>
/// <param name="state"></param>
/// <returns></returns>
[Route("post/{id}/{state}")]
public async Task<PostGetOutputDto> UpdateStateAsync([FromRoute] Guid id, [FromRoute] bool state)
{
var entity = await _repository.GetByIdAsync(id);
if (entity is null)
{
throw new ApplicationException("岗位未存在");
}
entity.State = state;
await _repository.UpdateAsync(entity);
return await MapToGetOutputDtoAsync(entity);
}
}
}

View File

@@ -34,8 +34,7 @@ namespace Yi.Framework.Rbac.Domain.Entities
var type = GetFileType();
var savePath = GetSaveFilePath();
var filePath = Path.Combine(savePath, this.FileName);
this.FilePath = filePath;
this.FilePath = savePath;
}
/// <summary>