fix: add_pricing_program_timing 补充 sor.C() 插入新记录
This commit is contained in:
parent
25457aff6d
commit
cea95f98ec
@ -4,6 +4,7 @@ from ahserver.serverenv import ServerEnv
|
||||
from ahserver.filestorage import FileStorage
|
||||
from sqlor.dbpools import DBPools, get_sor_context
|
||||
from appPublic.log import debug, exception, info, MyLogger
|
||||
from appPublic.uniqueID import getID
|
||||
from appPublic.timeUtils import curDateString
|
||||
from appPublic.dictObject import DictObject
|
||||
from appPublic.jsonConfig import getConfig
|
||||
@ -1063,6 +1064,9 @@ async def add_pricing_program_timing(env, sor, ns):
|
||||
prev = await sor.R('pricing_program_timing', {'ppid': ppid, 'expired_date': '9999-12-31'})
|
||||
if prev:
|
||||
await sor.U('pricing_program_timing', {'id': prev[0].id, 'expired_date': enabled_date})
|
||||
# 插入新记录
|
||||
ns['id'] = ns.get('id') or getID()
|
||||
await sor.C('pricing_program_timing', ns)
|
||||
|
||||
|
||||
def load_pricing():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user