This commit is contained in:
yumoqing 2026-02-25 11:33:34 +08:00
parent d80b177adb
commit 9f99790d38

View File

@ -64,14 +64,17 @@ async def set_promote_discount(request, params_kw):
customerid, biz_date, recs[0].discount) customerid, biz_date, recs[0].discount)
if not need_new_discount: if not need_new_discount:
return return
await sor.C('discount', { ret = {
'id': getID(), 'id': getID(),
'resellerid': recs[0].resellerid, 'resellerid': recs[0].resellerid,
'customerid': customerid, 'customerid': customerid,
'discount': recs[0].discount, 'discount': recs[0].discount,
'enabled_date': enabled_date, 'enabled_date': enabled_date,
'expired_date': expired_date 'expired_date': expired_date
} }
await sor.C('discount', ret.copy())
return ret
return None
async def disable_old_discount(sor, resellerid, customerid, biz_date, new_discount): async def disable_old_discount(sor, resellerid, customerid, biz_date, new_discount):
sql = """select * from discount sql = """select * from discount