This commit is contained in:
lwl0608 2024-11-11 22:20:07 +08:00
parent c3b6cf1cc2
commit 5ae982c9b0
1 changed files with 4 additions and 3 deletions

View File

@ -558,7 +558,7 @@ mid_zid_list = [
[999164, 91]
]
csv_ = Csv("myts_refund.csv", ["订单id", "商品", "订单金额", "结果", "res"])
csv_ = Csv("myts_refund.csv", ["订单id", "时间", "商品", "订单金额", "结果", "res"])
def refund_order(order_id):
@ -622,12 +622,13 @@ class S:
order_id = safe_get_str(d, "id")
product_id = safe_get_str(d, "product_id")
pay_amount = safe_get_int(d, "pay_amount")
print(order_id, pay_amount)
ct = safe_get_int(d, "ct")
# print(order_id, pay_amount)
refund_amount += pay_amount
res = refund_order(order_id)
ret = safe_get_int(res, "ret")
docu = [order_id, product_id, pay_amount, ret, str(res)]
docu = [order_id, get_time_str_by_ts(ct), product_id, pay_amount, ret, dict2json(ret)]
print(idx, docu)
csv_.append(docu)