feat: 框架代码同步 (#148)

[skip ci]

Co-authored-by: tk <fiyne1a@dingtalk.com>
This commit is contained in:
2024-06-24 16:04:28 +08:00
committed by GitHub
parent d00f0d2d9c
commit 8bc8aa960c
121 changed files with 2369 additions and 1497 deletions

View File

@@ -56,7 +56,7 @@ public sealed class UserProfileService(BasicRepository<Sys_UserProfile, long> rp
/// <inheritdoc />
public Task<int> EditAsync(EditUserProfileReq req)
{
return UpdateAsync(req, null);
return UpdateAsync(req.Adapt<Sys_UserProfile>(), null);
}
/// <inheritdoc />
@@ -80,6 +80,13 @@ public sealed class UserProfileService(BasicRepository<Sys_UserProfile, long> rp
return ret.Adapt<QueryUserProfileRsp>();
}
/// <inheritdoc />
public async Task<GetSessionUserAppConfigRsp> GetSessionUserAppConfigAsync()
{
var ret = await Rpo.Select.Where(a => a.Id == UserToken.Id).ToOneAsync().ConfigureAwait(false);
return ret.Adapt<GetSessionUserAppConfigRsp>();
}
/// <inheritdoc />
public async Task<PagedQueryRsp<QueryUserProfileRsp>> PagedQueryAsync(PagedQueryReq<QueryUserProfileReq> req)
{
@@ -147,6 +154,13 @@ public sealed class UserProfileService(BasicRepository<Sys_UserProfile, long> rp
});
}
/// <inheritdoc />
public Task<int> SetSessionUserAppConfigAsync(SetSessionUserAppConfigReq req)
{
req.ThrowIfInvalid();
return UpdateAsync(req, [nameof(req.AppConfig)], null, a => a.Id == UserToken.Id, null, true);
}
private ISelect<Sys_UserProfile, Sys_DicContent, Sys_DicContent, Sys_DicContent, Sys_DicContent> QueryInternal(
QueryReq<QueryUserProfileReq> req)
{