12121
This commit is contained in:
@@ -13,12 +13,15 @@ public class ChatController : ControllerBase
|
||||
private readonly IGameChatService _chatService;
|
||||
private readonly IGameGoodsService _goodsService;
|
||||
private readonly IUnitUserService _userService;
|
||||
private readonly IGameTeamService _teamService;
|
||||
|
||||
public ChatController(IGameChatService chatService, IGameGoodsService goodsService, IUnitUserService userService)
|
||||
public ChatController(IGameChatService chatService, IGameGoodsService goodsService, IUnitUserService userService,
|
||||
IGameTeamService teamService)
|
||||
{
|
||||
_chatService = chatService;
|
||||
_goodsService = goodsService;
|
||||
_userService = userService;
|
||||
_teamService = teamService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -32,7 +35,8 @@ public class ChatController : ControllerBase
|
||||
{
|
||||
string userId = StateHelper.userId;
|
||||
int areaId = StateHelper.areaId;
|
||||
string teamId = "";
|
||||
var myTeam = await _teamService.GetUserTeamData(userId);
|
||||
string teamId = myTeam.teamId;
|
||||
string groupId = "";
|
||||
RefAsync<int> Total = 0;
|
||||
var data = await _chatService.GetChatData(userId, type, areaId, teamId, groupId, page, 10, Total);
|
||||
@@ -88,9 +92,10 @@ public class ChatController : ControllerBase
|
||||
goodsId = GameConfig.SendChatGoodsBase;
|
||||
break;
|
||||
case 1:
|
||||
isSend = true;
|
||||
code = nameof(GameChatEnum.Code.Team);
|
||||
par = "";
|
||||
var myTeam = await _teamService.GetUserTeamData(userId);
|
||||
par = myTeam.teamId;
|
||||
isSend = par != "0";
|
||||
break;
|
||||
case 2:
|
||||
isSend = true;
|
||||
|
||||
Reference in New Issue
Block a user