/// <summary> /// 刪除走地事件 /// </summary> public static void DeleteScoutEvent(ScoutStruct scout) { Brook.Load(DbName.DevBetradar).Execute( "DELETE FROM [Betradar].[dbo].[LiveScoutSoccerEvent] WHERE [MatchId] = @MatchId AND [EventId] >= @EventId;", new DbParameter[] { new SqlParameter("@MatchId", SqlDbType.BigInt) { Value = scout.MatchId }, new SqlParameter("@EventId", SqlDbType.BigInt) { Value = scout.EventId } }); }
/// <summary> /// 寫入走地事件 /// </summary> /// <param name="scout"></param> public static void InsertScoutEvent(ScoutStruct scout) { Brook.Load(DbName.DevBetradar).Execute( "INSERT INTO [dbo].[LiveScoutSoccerEvent]([ScoutFeedType],[MatchId],[BetStatus],[EventId],[Info],[Side],[TypeId],[MatchTime],[MatchScore],[ServerTime],[Player1],[Player2],[PosX],[PosY],[ExtraInfo],[CreateTime])VALUES(@ScoutFeedType,@MatchId,@BetStatus,@EventId,@Info,@Side,@TypeId,@MatchTime,@MatchScore,@ServerTime,@Player1,@Player2,@PosX,@PosY,@ExtraInfo,@CreateTime);", new DbParameter[] { new SqlParameter("@ScoutFeedType", SqlDbType.Int) { Value = scout.ScoutFeedType }, new SqlParameter("@MatchId", SqlDbType.BigInt) { Value = scout.MatchId }, new SqlParameter("@BetStatus", SqlDbType.Int) { Value = scout.BetStatus }, new SqlParameter("@EventId", SqlDbType.BigInt) { Value = scout.EventId }, new SqlParameter("@Info", SqlDbType.NVarChar, -1) { Value = scout.Info }, new SqlParameter("@Side", SqlDbType.Int) { Value = scout.Side }, new SqlParameter("@TypeId", SqlDbType.Int) { Value = scout.TypeId }, new SqlParameter("@MatchTime", SqlDbType.VarChar, 24) { Value = scout.MatchTime }, new SqlParameter("@MatchScore", SqlDbType.VarChar, 12) { Value = scout.MatchScore }, new SqlParameter("@ServerTime", SqlDbType.DateTime) { Value = scout.ServerTime }, new SqlParameter("@Player1", SqlDbType.BigInt) { Value = scout.Player1 }, new SqlParameter("@Player2", SqlDbType.BigInt) { Value = scout.Player2 }, new SqlParameter("@PosX", SqlDbType.Int) { Value = scout.PosX }, new SqlParameter("@PosY", SqlDbType.Int) { Value = scout.PosY }, new SqlParameter("@ExtraInfo", SqlDbType.BigInt) { Value = scout.ExtraInfo }, new SqlParameter("@CreateTime", SqlDbType.DateTime) { Value = scout.CreateTime } }); }