This commit is contained in:
Putoo
2026-07-11 18:52:38 +08:00
parent dec8c2e076
commit c40f3711bc
27 changed files with 577 additions and 18 deletions

View File

@@ -55,11 +55,18 @@ public class UserController : ControllerBase
var vigourInfo = await _attrService.GetUserVigourInfo(userId);
var accInfo = await _accService.GetUserAccInfo(userId);
var userDataInfo = await _accService.GetUserDataInfo(userId);
object acc = new { accInfo.gold, accInfo.cowry, userDataInfo.teach, userDataInfo.renown,userDataInfo.enemy };
object acc = new { accInfo.gold, accInfo.cowry, userDataInfo.teach, userDataInfo.renown, userDataInfo.enemy };
var buff = await _attrService.GetUserStateData(userId, "ALL");
var stock = await _attrService.GetUserStock(userId);
object result = new { user, attr = attrInfo, exp, vigourInfo.vitality, acc, buff, stock };
string gift = string.Empty;
var giftData = await _relationService.GetUserNewGift(userId);
if (!string.IsNullOrEmpty(giftData.logId))
{
gift = $"收到{giftData.name}";
}
object result = new { user, attr = attrInfo, exp, vigourInfo.vitality, acc, buff, stock,gift };
return PoAction.Ok(result);
}
@@ -176,7 +183,7 @@ public class UserController : ControllerBase
object user = new { userInfo.userNo, userInfo.nick, userInfo.sex, userInfo.sign };
var attrInfo = await _attrService.GetUserAttrModel(userInfo.userId); //基础属性
var accInfo = await _accService.GetUserDataInfo(userInfo.userId);
object acc = new { accInfo.teach,accInfo.enemy };
object acc = new { accInfo.teach, accInfo.enemy };
var online = await _mapService.GetUserOnMap(userInfo.userId);
int isOnline = online.upTime >
@@ -192,11 +199,17 @@ public class UserController : ControllerBase
var equ = await _equService.GetUserOnEqu(userInfo.userId);
var suit = await _equService.GetUserEquSuit(userInfo.userId);
string gift = string.Empty;
var giftData = await _relationService.GetUserNewGift(userInfo.userId);
if (!string.IsNullOrEmpty(giftData.logId))
{
gift = $"收到{giftData.name}";
}
var isPk = await UserStateTool.CheckPkState(userId, userInfo.userId, isEnemy, isAtArea);
object result = new
{
user, attr = new { attrInfo.lev }, acc, isOnline, onMapName, isFriend, isEnemy, team, equ, suit,isPk
user, attr = new { attrInfo.lev }, acc, isOnline, onMapName, isFriend, isEnemy, team, equ, suit, gift, isPk
};
return PoAction.Ok(result);
}