あーーーーー
This commit is contained in:
parent
1147b50fd1
commit
18076cdf31
1 changed files with 3 additions and 0 deletions
|
@ -30,6 +30,7 @@ class Bot(discord.Client):
|
||||||
#パスワード生成、ハッシュ化
|
#パスワード生成、ハッシュ化
|
||||||
password = self.password_generate(4)
|
password = self.password_generate(4)
|
||||||
password_hash = self.hash_genarate(password)
|
password_hash = self.hash_genarate(password)
|
||||||
|
print("パスワード生成完了")
|
||||||
#メンバーリストと送信者を照合
|
#メンバーリストと送信者を照合
|
||||||
cursor = self.db.cursor()
|
cursor = self.db.cursor()
|
||||||
cursor.execute("SELECT * FROM club_member WHERE discord_userid = %s", (discord_user_id,))
|
cursor.execute("SELECT * FROM club_member WHERE discord_userid = %s", (discord_user_id,))
|
||||||
|
@ -39,9 +40,11 @@ class Bot(discord.Client):
|
||||||
result = {"result": "user_data_not_found"}
|
result = {"result": "user_data_not_found"}
|
||||||
#ユーザーデータが見つかった場合(登録済みの場合)
|
#ユーザーデータが見つかった場合(登録済みの場合)
|
||||||
else:
|
else:
|
||||||
|
print("ユーザーデータが見つかった")
|
||||||
cursor.execute("SELECT * FROM pc_usage_history WHERE member_id=%s ORDER BY id DESC LIMIT 1", (user_record[0][0],))
|
cursor.execute("SELECT * FROM pc_usage_history WHERE member_id=%s ORDER BY id DESC LIMIT 1", (user_record[0][0],))
|
||||||
pc_usage_history_record = cursor.fetchall()
|
pc_usage_history_record = cursor.fetchall()
|
||||||
if pc_usage_history_record:
|
if pc_usage_history_record:
|
||||||
|
print("使用したことがあります")
|
||||||
if pc_usage_history_record[0][5] == None:
|
if pc_usage_history_record[0][5] == None:
|
||||||
result = {"result": "pc_already_in_use_by_you", "pc_number": str(pc_usage_history_record[0][2]), "device_number": str(pc_usage_history_record[0][3]), "start_time": str(pc_usage_history_record[0][4]), "detail": str(pc_usage_history_record[0][6])}
|
result = {"result": "pc_already_in_use_by_you", "pc_number": str(pc_usage_history_record[0][2]), "device_number": str(pc_usage_history_record[0][3]), "start_time": str(pc_usage_history_record[0][4]), "detail": str(pc_usage_history_record[0][6])}
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue