mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-12-14 11:45:47 +08:00
feat: ✨ 框架代码同步 (#148)
[skip ci] Co-authored-by: tk <fiyne1a@dingtalk.com>
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user