- prodtypeid: product_types→product_category, supplychain→sage - productid: products→product, supplychain→sage
12 lines
490 B
Plaintext
12 lines
490 B
Plaintext
result = [{'productid': '', 'productid_text': '全部'}]
|
|
try:
|
|
async with DBPools().sqlorContext('sage') as sor:
|
|
rows = await sor.sqlExe(
|
|
"select id as productid, product_name as productid_text from product where status='1' order by sort_order, product_name",
|
|
{}
|
|
)
|
|
return json.dumps(result + list(rows), ensure_ascii=False)
|
|
except Exception as e:
|
|
debug(f'get_search_productid error: {e}')
|
|
return json.dumps(result, ensure_ascii=False)
|