31 lines
797 B
Plaintext
31 lines
797 B
Plaintext
async def specific_data_update(ns={}):
|
|
"""
|
|
规格数据更新
|
|
:param ns:
|
|
:return:
|
|
"""
|
|
spec_cnf = {
|
|
'id': ns.get('id')
|
|
}
|
|
db = DBPools()
|
|
async with db.sqlorContext('kboss') as sor:
|
|
try:
|
|
if ns.get('productid'):
|
|
spec_cnf['productid'] = ns.get('productid')
|
|
if ns.get('spec_data'):
|
|
spec_cnf['spec_data'] = ns.get('spec_data')
|
|
|
|
await sor.U('specificdata',ns)
|
|
return {
|
|
"status": True,
|
|
"msg": "update specific data success"
|
|
}
|
|
except Exception as e:
|
|
raise e
|
|
return {
|
|
"status": False,
|
|
"msg": "update specific data failed"
|
|
}
|
|
|
|
ret = await specific_data_update(params_kw)
|
|
return ret |