Commit 3bd7fcff authored by xianyang's avatar xianyang

优化转账显示问题

parent ebf13841
......@@ -315,7 +315,7 @@ def transfer_money(db: Session, param, h_list):
else:
out_guild_sql = f"select guild_name from guild where uuid='{param.transfer_id}'"
out_guild = LinkMysql(env.DB_3YV2).query_mysql(out_guild_sql)
dst_name = out_guild[0]['guild_name'] if out_guild else ""
dst_name = out_guild[0]['guild_name'] if out_guild else param.transfer_id
amount_type = amount_type_dict.get(param.transfer_type) if amount_type_dict.get(param.transfer_type) else 1
try:
......
......@@ -27,7 +27,6 @@ class DecimalEncoder(json.JSONEncoder):
if isinstance(res, decimal.Decimal):
return float(res)
if isinstance(res, datetime):
print(res.strftime("%Y-%m-%d %H:%M:%S"))
return res.strftime("%Y-%m-%d %H:%M:%S")
super(DecimalEncoder, self).default(res)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment