/// <summary> /// 签到 /// </summary> public void Checkin() { if (IsCheckin) { return; } IsCheckin = true; SqliteHelper.SetConnectionString(MainPlugin.MainDatabase, ""); SqliteHelper helper = new SqliteHelper(); SQLiteDataReader reader = helper.ExecuteReader( "update user set last_checkin_date = " + TimeStampHelper.ConvertDateTimeInt(new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 0, 0, 0)).ToString() + " where uid = " + Uid, new SQLiteParameter() { }); }
/// <summary> /// 在数据库中创建某用户的数据 /// </summary> /// <param name="QQ"></param> void CreateUser(long QQ) { if (Exists()) { return; } SqliteHelper.SetConnectionString(MainPlugin.MainDatabase, ""); SqliteHelper helper = new SqliteHelper(); helper.ExecuteReader("insert into user values(null, " + QQ + ", 0,0,0,'',0" + TimeStampHelper.ConvertDateTimeInt(DateTime.Now) + " )", new SQLiteParameter() { }); }