Commit 1fc76cdb authored by xianyang's avatar xianyang

优化公会结算

parent d30feaa0
......@@ -296,7 +296,7 @@ def transfer_trigger_task(uuid, user_id, balance, type, amount_type, remark='用
status = 3
amount_type_id = 1 if amount_type == 'consumable' else 2
add_sql = f"insert into all_record_table(user_id, type, status, reference_number, remark, money, is_add, money_data,create_time,amount_type) " \
f"values({user_id}, '{type}', {status},'{get_order()}','{remark}', {balance * 10 if amount_type == 'consumable' else balance * 100},1,'{json.dumps(money_data)}',{get_now_timestamp()},{amount_type_id});"
f"values({user_id}, '{type}', {status},'{get_order()}','{remark}', {float(balance) * 10 if amount_type == 'consumable' else float(balance) * 100},1,'{json.dumps(money_data)}',{get_now_timestamp()},{amount_type_id});"
LinkMysql(env.DB_3YV2).perform_mysql(add_sql)
return ''
......@@ -566,7 +566,7 @@ def GuildSettlementAdd(db, data):
db.query(GuildSettlementLog).filter(GuildSettlementLog.work_id == guild_data.work_id).update(
{GuildSettlementLog.status: data.status, GuildSettlementLog.update_time: get_now_timestamp()})
db.commit()
return ''
return 200, ''
else:
db_export = GuildSettlementLog(work_id=data.id, guild_id=data.guild_id, balance=data.balance,
pearl=data.pearl, status=data.status, create_time=data.create_time,
......
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