mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
🐛 修正字段
This commit is contained in:
parent
8720ec9f32
commit
d38c53c13e
@ -453,7 +453,7 @@ class ShopManage:
|
|||||||
if goods.uuid not in user.props:
|
if goods.uuid not in user.props:
|
||||||
user.props[goods.uuid] = 0
|
user.props[goods.uuid] = 0
|
||||||
user.props[goods.uuid] += num
|
user.props[goods.uuid] += num
|
||||||
await user.save(update_Fields=["gold", "props"])
|
await user.save(update_fields=["gold", "props"])
|
||||||
return f"花费 {price} 金币购买 {goods.goods_name} ×{num} 成功!"
|
return f"花费 {price} 金币购买 {goods.goods_name} ×{num} 成功!"
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ -479,7 +479,7 @@ class ShopManage:
|
|||||||
is_change = True
|
is_change = True
|
||||||
del user.props[uuid]
|
del user.props[uuid]
|
||||||
if is_change:
|
if is_change:
|
||||||
await user.save(update_Fields=["props"])
|
await user.save(update_fields=["props"])
|
||||||
result = await GoodsInfo.filter(uuid__in=user.props.keys()).all()
|
result = await GoodsInfo.filter(uuid__in=user.props.keys()).all()
|
||||||
data_list = []
|
data_list = []
|
||||||
uuid2goods = {item.uuid: item for item in result}
|
uuid2goods = {item.uuid: item for item in result}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user