This commit is contained in:
Putoo
2026-06-01 18:49:17 +08:00
parent 8a5b6d31ca
commit eb81a1c381
50 changed files with 1367 additions and 59 deletions

View File

@@ -84,6 +84,40 @@ public class UserController : ControllerBase
var model = await UserModelTool.GetUserView(userId);
return PoAction.Ok(model);
}
/// <summary>
/// 获取基础属性信息
/// </summary>
/// <param name="no"></param>
/// <returns></returns>
[HttpGet]
public async Task<IPoAction> GetUserBaseAttrInfo(string? no)
{
string userId = StateHelper.userId;
if (!string.IsNullOrEmpty(no))
{
var userInfo = await _userService.GetUserInfoByUserNo(no); //基础资料
if (userInfo == null)
{
return PoAction.Message("玩家不存在!", 102);
}
if (userInfo.userId == userId)
{
return PoAction.Message("用户本身!", 101);
}
if (userInfo.areaId != StateHelper.areaId)
{
return PoAction.Message("玩家不存在!", 102);
}
userId = userInfo.userId;
}
var model = await _attrService.GetUserAttrModel(userId);
return PoAction.Ok(model);
}
/// <summary>
/// 获取用户资料