//存储大局战绩记录 public static async Task SaveTotalMiltary(this FiveStarRoom fiveStarRoom) { //只有房卡才记录 如果一局小局信息都没有 就不用保存大局录像了 if (fiveStarRoom.RoomType != RoomType.RoomCard || fiveStarRoom.ParticularMiltarys.Count == 0) { return; } Miltary miltary = ComponentFactory.Create <Miltary>(); miltary.MiltaryId = FiveStarRoomComponent.Ins.GetMiltaryVideoId(); //大局录像Id miltary.RoomNumber = fiveStarRoom.RoomId; //房号 miltary.FriendCircleId = fiveStarRoom.FriendsCircleId; //所属亲友ID miltary.ToyGameId = ToyGameId.CardFiveStar; //游戏类型 miltary.Time = TimeTool.GetCurrenTimeStamp(); //当前时间 miltary.PlayerInofs = fiveStarRoom.GetMiltaryPlayerInfo(); //玩家信息 for (int i = 0; i < miltary.PlayerInofs.Count; i++) { miltary.PlayerUserIds.Add(miltary.PlayerInofs[i].UserId); } fiveStarRoom.SaveMiltarySmallInfo(miltary.MiltaryId); await FiveStarRoomComponent.Ins.SaveVideo(miltary);//存储大局战绩到数据库 miltary.Dispose(); }