kboss/b/reseller/floorPriceSearch.dspy
2025-07-16 14:27:17 +08:00

41 lines
1.2 KiB
Plaintext

async def floorPriceSearch(ns={}):
"""
`id` VARCHAR(32) comment 'id',
`offer_orgid` VARCHAR(32) comment '售方机构id',
`bid_orgid` VARCHAR(32) comment '买方机构id',
`productid` double(18,2) comment '产品id',
`price` double(18,2) comment '价格',
`begin_date` date comment '起效日期',
`end_date` date comment '失效日期',
:param ns:
:return:
"""
if ns.get('orgid') and ns.get('productid'):
nss = {
'offer_orgid': ns.get('orgid'),
'bid_orgid': '',
'productid': ns.get('productid'),
'del_flg': '0',
'sort': 'begin_date asc'
}
ns = nss
db = DBPools()
async with db.sqlorContext('kboss') as sor:
try:
ns['del_flg'] = '0'
res = await sor.R('floorprice', ns)
return {
"status": True,
"msg": "floorprice search success",
"data": res
}
except Exception as e:
raise e
return {
"status": False,
"msg": "floorprice search failed"
}
ret = await floorPriceSearch(params_kw)
return ret