update v0.1.4.4

This commit is contained in:
HibiKier
2022-03-18 20:55:05 +08:00
parent 3f533516af
commit 14d1512b1e
11 changed files with 186 additions and 29 deletions
@@ -254,6 +254,7 @@ class Genshin(db.Model):
query = cls.query.where(cls.today_query_uid.contains(str(uid)))
x = await query.gino.first()
if x:
await cls._add_query_uid(uid, uid)
return x.cookie
for u in [
x for x in await cls.query.order_by(db.func.random()).gino.all() if x.cookie
@@ -356,7 +357,7 @@ class Genshin(db.Model):
"""
query = cls.query.where(cls.uid == cookie_uid).with_for_update()
user = await query.gino.first()
await user.update(today_query_uid=cls.today_query_uid + f"{uid} ").apply()
await user.update(today_query_uid=user.today_query_uid + f"{uid} ").apply()
@classmethod
async def _get_user_data(