25 lines
803 B
Plaintext
25 lines
803 B
Plaintext
async def sale_protocol_search(ns={}):
|
|
"""
|
|
:param ns:
|
|
:return:
|
|
"""
|
|
db = DBPools()
|
|
async with db.sqlorContext('kboss') as sor:
|
|
try:
|
|
res_sql = """select * from saleprotocol where offer_orgid = '%s' and bid_orgid = '%s' and del_flg = '0';""" % (ns.get('offer_orgid'), ns.get('bid_orgid'))
|
|
res_li = await sor.sqlExe(res_sql, {})
|
|
res_li.sort(key = lambda x : (x['salemode'], x['start_date']))
|
|
return {
|
|
"status": True,
|
|
"msg": "saleprotocol search success",
|
|
"data": res_li
|
|
}
|
|
except Exception as e:
|
|
raise e
|
|
return {
|
|
"status": False,
|
|
"msg": "saleprotocol search failed"
|
|
}
|
|
|
|
ret = await sale_protocol_search(params_kw)
|
|
return ret |