This commit is contained in:
Putoo
2026-06-09 17:51:12 +08:00
parent 9f3e4871a4
commit 46bacd1e38
10 changed files with 279 additions and 24 deletions

View File

@@ -16,9 +16,10 @@ public class UserController : ControllerBase
private readonly IGameGoodsService _goodsService;
private readonly IGameChatService _chatService;
private readonly IGameSkillService _skillService;
private readonly IGameTeamService _teamService;
public UserController(IUnitUserService userService, IUnitUserAttrService attrService,
IUnitUserAccService accService, IGameMapService mapService, IUnitUserRelationService relationService,
IGameGoodsService goodsService, IGameChatService chatService,IGameSkillService skillService)
IGameGoodsService goodsService, IGameChatService chatService,IGameSkillService skillService,IGameTeamService teamService)
{
_userService = userService;
_attrService = attrService;
@@ -28,6 +29,7 @@ public class UserController : ControllerBase
_goodsService = goodsService;
_chatService = chatService;
_skillService = skillService;
_teamService = teamService;
}
@@ -160,7 +162,8 @@ public class UserController : ControllerBase
string onMapName = $"{onCity.cityName}-{onMapInfo.mapName}";
bool isFriend = await _relationService.CheckIsFriend(userId, userInfo.userId);
bool isEnemy = await _relationService.CheckUserEnemy(userId, userInfo.userId);
object result = new { user, attr = new { attrInfo.lev }, acc, isOnline, onMapName, isFriend, isEnemy };
var team = await _teamService.GetUserTeamInfo(userInfo.userId);
object result = new { user, attr = new { attrInfo.lev }, acc, isOnline, onMapName, isFriend, isEnemy ,team};
return PoAction.Ok(result);
}