1233
This commit is contained in:
@@ -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>
|
||||
/// 获取用户资料
|
||||
|
||||
Reference in New Issue
Block a user