update ncmatch product to model
This commit is contained in:
parent
2381b75c47
commit
81e405c3b8
21
b/product/get_ncmatch_publish_product_to_model.dspy
Normal file
21
b/product/get_ncmatch_publish_product_to_model.dspy
Normal file
@ -0,0 +1,21 @@
|
||||
async def get_ncmatch_publish_product_to_model(ns={}):
|
||||
db = DBPools()
|
||||
async with db.sqlorContext('kboss') as sor:
|
||||
try:
|
||||
sql = """SELECT * FROM user_publish_product WHERE listing_status = 'listing' AND del_flg = '0';"""
|
||||
result = await sor.sqlExe(sql, {})
|
||||
|
||||
return {
|
||||
'status': True,
|
||||
'msg': 'successfully retrieved published products',
|
||||
'data': result
|
||||
}
|
||||
except Exception as e:
|
||||
return {
|
||||
'status': False,
|
||||
'msg': 'failed to retrieve published products',
|
||||
'data': e
|
||||
}
|
||||
|
||||
ret = await get_ncmatch_publish_product_to_model(params_kw)
|
||||
return ret
|
||||
Loading…
x
Reference in New Issue
Block a user