488 lines
28 KiB
Plaintext
488 lines
28 KiB
Plaintext
async def find_children_by_id(data, target_id):
|
|
result_children = []
|
|
|
|
async def find_recursively(current_id):
|
|
for item in data:
|
|
if item['parentid'] == current_id:
|
|
result_children.append(item['id'])
|
|
await find_recursively(item['id'])
|
|
|
|
await find_recursively(target_id)
|
|
# 包含父节点和子节点
|
|
result_children.append(target_id)
|
|
return result_children
|
|
|
|
async def kaiyuan_get_price(sor=None, ns={}):
|
|
"""
|
|
获取开元云租赁设备价格
|
|
:param ns:
|
|
:return:
|
|
"""
|
|
sql_data = await sor.R("lease_server_data", ns)
|
|
if not sql_data:
|
|
return 0.00
|
|
else:
|
|
return sql_data[0]['price']
|
|
|
|
async def get_price_from_provider(ns={}):
|
|
"""
|
|
从供应商 动态获取产品价格
|
|
:param ns:
|
|
:return:
|
|
"""
|
|
providerid = ns['providerid']
|
|
productid = ns['productid']
|
|
providername = ns.get('providername')
|
|
db = DBPools()
|
|
async with db.sqlorContext('kboss') as sor:
|
|
# 查找供应商名称
|
|
if not providername:
|
|
providername = (await sor.R('organization', {'id': providerid}))[0]['orgname']
|
|
if providername == '开元云科技':
|
|
ns_kaiyuan = {'productid': productid, 'del_flg': '0'}
|
|
price_kaiyuan = await kaiyuan_get_price(sor=sor, ns=ns_kaiyuan)
|
|
return float(price_kaiyuan)
|
|
else:
|
|
# 后续对不同供应商做不同逻辑
|
|
return 300.22
|
|
|
|
async def self_product_search(ns={}):
|
|
"""
|
|
产品不落地
|
|
本机构所有产品查找 回佣>折扣>底价
|
|
本机构是业主机构
|
|
协议表所有bid是本机构 *就查找product表 provider所有产品 本质是往上找一层
|
|
本机构是某级分销商
|
|
协议表所有bid是本机构 *就查找 上级offer为bid *对应的provider 循环 直到不含有*/offer为provider类型为供应商为止 找N层
|
|
:param ns:
|
|
:return:
|
|
"""
|
|
# ns = {
|
|
# 'bid_orgid': '6woiJ-_5tDmZUHFnLLty_',
|
|
# }
|
|
bid_orgid = ns.get('bid_orgid')
|
|
db = DBPools()
|
|
async with db.sqlorContext('kboss') as sor:
|
|
try:
|
|
if ns.get('sor'):
|
|
sor = ns.get('sor')
|
|
all_product = []
|
|
ns['del_flg'] = '0'
|
|
# 查找所有bid是本机构的协议表
|
|
sql_find_bid = """select * from saleprotocol where bid_orgid = '%s' and del_flg = '0' and CURRENT_DATE
|
|
between start_date and end_date;""" % bid_orgid
|
|
sql_find_bid_li = await sor.sqlExe(sql_find_bid, {})
|
|
# 判断是业主机构还是分销商
|
|
yezhu_li = await sor.R('organization', {'id': bid_orgid})
|
|
yezhu_judge = yezhu_li[0]['org_type']
|
|
# 如果是供应商 就返回所有产品
|
|
if yezhu_judge == '4':
|
|
provider_product_sql = """select * from product WHERE providerid = '%s' and del_flg = '0' and CURRENT_DATE
|
|
between effect_date and expire_date;""" % bid_orgid
|
|
provider_product_li = await sor.sqlExe(provider_product_sql, {})
|
|
return provider_product_li
|
|
# 如果是业主机构
|
|
if yezhu_judge == '0':
|
|
for sett in sql_find_bid_li:
|
|
salemode = sett['salemode']
|
|
offer_orgid = sett['offer_orgid']
|
|
protocolid = sett['id']
|
|
# 如果salemode是1 就是供应商所有产品
|
|
if salemode == '1':
|
|
provider_product_sql = """select * from product WHERE providerid = '%s' and del_flg = '0' and CURRENT_DATE
|
|
between effect_date and expire_date;""" % offer_orgid
|
|
provider_product_li = await sor.sqlExe(provider_product_sql, {})
|
|
all_product.extend(provider_product_li)
|
|
# 如果salemode是折扣 如果有* 就是供应商所有产品 如果salemode是底价就获取所有productid
|
|
if salemode == '0' or salemode == '2':
|
|
# 查找子表
|
|
zi_table = await sor.R('product_salemode', {'protocolid': protocolid, 'del_flg': '0'})
|
|
# 如果有* 就获取providerid所有产品
|
|
star_flg = [item.get('productid') for item in zi_table]
|
|
if '*' in star_flg:
|
|
provider_product_sql = """select * from product WHERE providerid = '%s' and del_flg = '0' and CURRENT_DATE
|
|
between effect_date and expire_date;""" % offer_orgid
|
|
provider_product_li = await sor.sqlExe(provider_product_sql, {})
|
|
all_product.extend(provider_product_li)
|
|
else:
|
|
prd_single_ids = [item.get('productid') for item in zi_table]
|
|
for prd_single in prd_single_ids:
|
|
single_sql = """select * from product where id = '%s' and del_flg = '0' and CURRENT_DATE
|
|
between effect_date and expire_date;""" % prd_single
|
|
single_res_li = await sor.sqlExe(single_sql, {})
|
|
single_res = single_res_li[0] if single_res_li else {}
|
|
all_product.append(single_res)
|
|
return all_product
|
|
# 如果是分销商
|
|
if yezhu_judge == '1':
|
|
for sett in sql_find_bid_li:
|
|
salemode = sett['salemode']
|
|
offer_orgid = sett['offer_orgid']
|
|
protocolid = sett['id']
|
|
# 判断是业主机构还是分销商
|
|
yezhu_li = await sor.R('organization', {'id': offer_orgid})
|
|
yezhu_judge = yezhu_li[0]['org_type']
|
|
# 如果salemode是1 就是offer所有产品
|
|
if salemode == '1':
|
|
prodcut_one = await self_product_search({'bid_orgid': offer_orgid})
|
|
all_product.extend(prodcut_one)
|
|
# 如果salemode是折扣 如果有* 就是供应商所有产品 不是* 就获取所有productid
|
|
if salemode == '0':
|
|
# 如果上级机构是供应商就获取该供应商所有产品
|
|
if yezhu_judge == '4':
|
|
provider_product_sql_ = """select * from product WHERE providerid = '%s' and del_flg = '0' and CURRENT_DATE
|
|
between effect_date and expire_date;""" % offer_orgid
|
|
provider_product_li = await sor.sqlExe(provider_product_sql_, {})
|
|
all_product.extend(provider_product_li)
|
|
else:
|
|
# 如果不是供应商就查找子表
|
|
zi_table = await sor.R('product_salemode', {'protocolid': protocolid, 'del_flg': '0'})
|
|
# 如果有* 就获取providerid所有产品
|
|
for zic in zi_table:
|
|
providerid_ = zic['providerid']
|
|
productid_ = zic['productid']
|
|
if productid_ == '*':
|
|
# 查找上级机构该providerid持有的产品
|
|
product_res = await shangji_provider_product_search({'providerid': providerid_,
|
|
'offer_orgid': offer_orgid})
|
|
all_product.extend(product_res)
|
|
else:
|
|
single_sql = """select * from product where id = '%s' and del_flg = '0' and CURRENT_DATE
|
|
between effect_date and expire_date;""" % productid_
|
|
single_res_li = await sor.sqlExe(single_sql, {})
|
|
single_res = single_res_li[0] if single_res_li else {}
|
|
all_product.append(single_res)
|
|
|
|
# 如果salemode是底价 就获取所有productid
|
|
if salemode == '2':
|
|
zi_table = await sor.R('product_salemode', {'protocolid': protocolid, 'del_flg': '0'})
|
|
# 如果有* 就获取providerid所有产品
|
|
for zic in zi_table:
|
|
productid_ = zic['productid']
|
|
single_sql = """select * from product where id = '%s' and del_flg = '0' and CURRENT_DATE
|
|
between effect_date and expire_date;""" % productid_
|
|
single_res_li = await sor.sqlExe(single_sql, {})
|
|
single_res = single_res_li[0] if single_res_li else {}
|
|
all_product.append(single_res)
|
|
return all_product
|
|
# return {
|
|
# "status": True,
|
|
# "msg": "product_salemode search success",
|
|
# "data": all_product
|
|
# }
|
|
except Exception as e:
|
|
raise e
|
|
return {
|
|
"status": False,
|
|
"msg": "product_salemode search failed"
|
|
}
|
|
|
|
|
|
async def shangji_provider_product_search(ns={}):
|
|
"""
|
|
本机构针对某个provider持有的产品 递归
|
|
:param ns:
|
|
:return:
|
|
"""
|
|
providerid = ns.get('providerid')
|
|
offer_orgid = ns.get('offer_orgid')
|
|
product_list = []
|
|
db = DBPools()
|
|
async with db.sqlorContext('kboss') as sor:
|
|
sql_find_bid = """select * from saleprotocol where bid_orgid = '%s' and del_flg = '0' and CURRENT_DATE
|
|
between start_date and end_date;""" % offer_orgid
|
|
sql_find_bid_li = await sor.sqlExe(sql_find_bid, {})
|
|
sql_res = [item.get('offer_orgid') for item in sql_find_bid_li]
|
|
# 首先判断是不是当前分销商的直属供应商
|
|
if providerid in sql_res:
|
|
print('该供应商就是上级机构的供应商, 返回该供应商所有产品')
|
|
provider_product_sql = """select * from product WHERE providerid = '%s' and del_flg = '0' and CURRENT_DATE
|
|
between effect_date and expire_date;""" % providerid
|
|
provider_product_li = await sor.sqlExe(provider_product_sql, {})
|
|
product_list.extend(provider_product_li)
|
|
return product_list
|
|
else:
|
|
# 如果不是直属供应商 就是上级某级机构的供应商
|
|
for sett in sql_find_bid_li:
|
|
salemode = sett['salemode']
|
|
offer_orgid = sett['offer_orgid']
|
|
protocolid = sett['id']
|
|
# 首先在折扣表里找对应的provider
|
|
if salemode == '0':
|
|
# 查找子表
|
|
zi_table = await sor.R('product_salemode', {'protocolid': protocolid, 'del_flg': '0'})
|
|
exits_star = [(item.get('providerid'), item.get('productid')) for item in zi_table]
|
|
exist_st = (providerid, '*')
|
|
if exist_st in exits_star:
|
|
await shangji_provider_product_search({'providerid': providerid, 'offer_orgid': offer_orgid})
|
|
else:
|
|
for zic in zi_table:
|
|
zic_provider = zic['providerid']
|
|
zic_productid = zic['productid']
|
|
if zic_provider == providerid:
|
|
provider_product_sql = """select * from product WHERE id = '%s' and del_flg = '0' and CURRENT_DATE
|
|
between effect_date and expire_date;""" % zic_productid
|
|
provider_product_li = await sor.sqlExe(provider_product_sql, {})
|
|
product_list.extend(provider_product_li)
|
|
elif salemode == '2':
|
|
# 查找子表
|
|
zi_table = await sor.R('product_salemode', {'protocolid': protocolid, 'del_flg': '0'})
|
|
for zic in zi_table:
|
|
zic_provider = zic['providerid']
|
|
zic_productid = zic['productid']
|
|
if zic_provider == providerid:
|
|
provider_product_sql = """select * from product WHERE id = '%s' and del_flg = '0' and CURRENT_DATE
|
|
between effect_date and expire_date;""" % zic_productid
|
|
provider_product_li = await sor.sqlExe(provider_product_sql, {})
|
|
product_list.extend(provider_product_li)
|
|
return product_list
|
|
|
|
|
|
async def kehu_kan_xiaoshoujigou(ns={}):
|
|
"""
|
|
客户查看所在的机构
|
|
:return:
|
|
"""
|
|
userid = await get_user()
|
|
sor = ns.get('sor')
|
|
user_li = await sor.R('users', {'id': userid, 'del_flg': '0'})
|
|
user_org_id = user_li[0]['orgid']
|
|
org_li = await sor.R('organization', {'id': user_org_id, 'del_flg': '0'})
|
|
sale_orgid = org_li[0]['parentid']
|
|
return user_org_id, sale_orgid
|
|
|
|
|
|
async def kehu_kan_chanpin(ns={}):
|
|
"""
|
|
价格不落地
|
|
:return:
|
|
"""
|
|
db = DBPools()
|
|
async with db.sqlorContext('kboss') as sor:
|
|
try:
|
|
# 配置产品id列表[]
|
|
product_all_ids = []
|
|
product_all_infos = []
|
|
|
|
# 通过salemanid查看客户所在机构
|
|
user_org_id, orgid = await kehu_kan_xiaoshoujigou({'userid': await get_user(), 'sor': sor})
|
|
|
|
# 优先查看bid为该用户的配置
|
|
xieyi_yonghu_cha_sql = """select * from saleprotocol where offer_orgid = '%s' and bid_orgid = '%s' and del_flg = '0'
|
|
and CURRENT_DATE between start_date and end_date;""" % (orgid, user_org_id)
|
|
xieyi_yonghu_cha_li = await sor.sqlExe(xieyi_yonghu_cha_sql, {})
|
|
for xieyi_cha in xieyi_yonghu_cha_li:
|
|
salemode = xieyi_cha['salemode']
|
|
protocolid = xieyi_cha['id']
|
|
# 查看子表
|
|
xieyi_zibiao_cha_li = await sor.R('product_salemode', {'protocolid': protocolid, 'del_flg': '0'})
|
|
xieyi_zibiao_cha_li_ = sorted(xieyi_zibiao_cha_li, key=lambda x: (x['productid'] == '*', x['productid']))
|
|
if salemode == '0' or salemode == '2':
|
|
for xieyi_zibiao in xieyi_zibiao_cha_li_:
|
|
providerid = xieyi_zibiao['providerid']
|
|
productid = xieyi_zibiao['productid']
|
|
discount = xieyi_zibiao['discount']
|
|
price = xieyi_zibiao['price']
|
|
unit = xieyi_zibiao['unit']
|
|
if productid in product_all_ids:
|
|
# 产品id已经存在
|
|
continue
|
|
# 折扣表中 产品id不为* 就展示对应的产品信息和折扣信息和折扣后的价格 底价表中展示对应产品信息和售价信息
|
|
if salemode == '0':
|
|
if productid != '*':
|
|
# 筛选id
|
|
product_all_ids.append(productid)
|
|
product_info_sql = """select * from product where id = '%s' and del_flg = '0' and CURRENT_DATE between effect_date and expire_date;""" % productid
|
|
product_info_li = await sor.sqlExe(product_info_sql, {})
|
|
product_info = product_info_li[0] if product_info_li else {}
|
|
if product_info:
|
|
product_info['unit'] = unit
|
|
product_info['discount'] = discount
|
|
# TODO 从供应商那里获取对应的产品价格
|
|
product_info['price'] = await get_price_from_provider({'providerid': providerid, 'productid': productid})
|
|
product_info['discount_price'] = round(product_info['price'] * product_info['discount'], 2)
|
|
# 追加产品信息
|
|
product_all_infos.append(product_info)
|
|
# elif productid == '*':
|
|
# # 折扣表中 产品id为* 就向上级机构查找有对应providerid的多少产品 依次迭代
|
|
# shangji_chanpin_li = await shangji_provider_product_search({'providerid': providerid, 'offer_orgid': orgid})
|
|
# for shangji_chanpin in shangji_chanpin_li:
|
|
# shangji_chanpin_id = shangji_chanpin['id']
|
|
# # 筛选id
|
|
# if shangji_chanpin_id in product_all_ids:
|
|
# continue
|
|
# product_all_ids.append(shangji_chanpin_id)
|
|
# shangji_chanpin['discount'] = discount
|
|
# product_all_infos.append(shangji_chanpin)
|
|
elif salemode == '2':
|
|
# 筛选id
|
|
product_all_ids.append(productid)
|
|
product_info_sql = """select * from product where id = '%s' and del_flg = '0' and CURRENT_DATE between effect_date and expire_date;""" % productid
|
|
product_info_li = await sor.sqlExe(product_info_sql, {})
|
|
product_info = product_info_li[0] if product_info_li else {}
|
|
if product_info:
|
|
product_info['price'] = price
|
|
product_info['unit'] = unit
|
|
# 追加产品信息
|
|
product_all_infos.append(product_info)
|
|
|
|
# 查找offer对应的机构id bid为* 的所有配置 时间限制
|
|
xieyi_cha_sql = """select * from saleprotocol where offer_orgid = '%s' and bid_orgid = '*' and del_flg = '0'
|
|
and CURRENT_DATE between start_date and end_date;""" % orgid
|
|
xieyi_cha_res_li = await sor.sqlExe(xieyi_cha_sql, {})
|
|
for xieyi_cha in xieyi_cha_res_li:
|
|
salemode = xieyi_cha['salemode']
|
|
protocolid = xieyi_cha['id']
|
|
# 查看子表
|
|
xieyi_zibiao_cha_li = await sor.R('product_salemode', {'protocolid': protocolid, 'del_flg': '0'})
|
|
xieyi_zibiao_cha_li_ = sorted(xieyi_zibiao_cha_li, key=lambda x: (x['productid'] == '*', x['productid']))
|
|
|
|
# 找出子表所有供应商名称 一次性查出 避免价格循环查找
|
|
provider_name_dict = {}
|
|
providerids = list(set([i['providerid'] for i in xieyi_zibiao_cha_li_]))
|
|
for i_provider in providerids:
|
|
providername_get = (await sor.R('organization', {'id': i_provider}))[0]['orgname']
|
|
provider_name_dict[i_provider] = providername_get
|
|
if salemode == '0' or salemode == '2':
|
|
for xieyi_zibiao in xieyi_zibiao_cha_li_:
|
|
providerid = xieyi_zibiao['providerid']
|
|
providername = provider_name_dict.get(providerid)
|
|
productid = xieyi_zibiao['productid']
|
|
discount = xieyi_zibiao['discount']
|
|
price = xieyi_zibiao['price']
|
|
unit = xieyi_zibiao['unit']
|
|
if productid in product_all_ids:
|
|
# 产品id已经存在
|
|
continue
|
|
# 折扣表中 产品id不为* 就展示对应的产品信息和折扣信息和折扣后的价格 底价表中展示对应产品信息和售价信息
|
|
if salemode == '0':
|
|
if productid != '*':
|
|
# 筛选id
|
|
product_all_ids.append(productid)
|
|
product_info_sql = """select * from product where id = '%s' and del_flg = '0' and CURRENT_DATE between effect_date and expire_date;""" % productid
|
|
product_info_li = await sor.sqlExe(product_info_sql, {})
|
|
product_info = product_info_li[0] if product_info_li else {}
|
|
if product_info:
|
|
product_info['unit'] = unit
|
|
product_info['discount'] = discount
|
|
# TODO 从供应商那里获取对应的产品价格
|
|
# product_info['price'] = round(random.random() * 100, 2)
|
|
product_info['price'] = await get_price_from_provider({'providername': providername, 'providerid': providerid, 'productid': productid})
|
|
product_info['discount_price'] = round(product_info['price'] * product_info['discount'], 2)
|
|
# 追加产品信息
|
|
product_all_infos.append(product_info)
|
|
# elif productid == '*':
|
|
# # 折扣表中 产品id为* 就向上级机构查找有对应providerid的多少产品 依次迭代
|
|
# shangji_chanpin_li = await shangji_provider_product_search({'providerid': providerid, 'offer_orgid': orgid})
|
|
# for shangji_chanpin in shangji_chanpin_li:
|
|
# shangji_chanpin_id = shangji_chanpin['id']
|
|
# # 筛选id
|
|
# if shangji_chanpin_id in product_all_ids:
|
|
# continue
|
|
# product_all_ids.append(shangji_chanpin_id)
|
|
# shangji_chanpin['discount'] = discount
|
|
# product_all_infos.append(shangji_chanpin)
|
|
elif salemode == '2':
|
|
# 筛选id
|
|
product_all_ids.append(productid)
|
|
product_info_sql = """select * from product where id = '%s' and del_flg = '0' and CURRENT_DATE between effect_date and expire_date;""" % productid
|
|
product_info_li = await sor.sqlExe(product_info_sql, {})
|
|
product_info = product_info_li[0] if product_info_li else {}
|
|
if product_info:
|
|
product_info['price'] = price
|
|
product_info['unit'] = unit
|
|
# 追加产品信息
|
|
product_all_infos.append(product_info)
|
|
|
|
# 回佣产品客户可以看到 原价出售
|
|
xieyi_huiyong_sql = """select * from saleprotocol where bid_orgid = '%s' and del_flg = '0' and salemode = '1'
|
|
and CURRENT_DATE between start_date and end_date;""" % orgid
|
|
xieyi_huiyong_res_li = await sor.sqlExe(xieyi_huiyong_sql, {})
|
|
for xieyi_huiyong_cha in xieyi_huiyong_res_li:
|
|
xieyi_offer_id = xieyi_huiyong_cha['offer_orgid']
|
|
# 判断是否是供应商 如果是供应商就返回该供应商所有产品
|
|
# 判断是业主机构/分销商/供应商
|
|
yezhu_li = await sor.R('organization', {'id': xieyi_offer_id})
|
|
yezhu_judge = yezhu_li[0]['org_type']
|
|
if yezhu_judge == '4':
|
|
product_info_sql = """select * from product where providerid = '%s' and del_flg = '0' and CURRENT_DATE between effect_date and expire_date;""" % xieyi_offer_id
|
|
product_info_li = await sor.sqlExe(product_info_sql, {})
|
|
for product_info in product_info_li:
|
|
product_all_ids.append(product_info.get('id'))
|
|
# TODO 从供应商那里获取对应的产品价格
|
|
product_info['price'] = await get_price_from_provider({'providername': yezhu_li[0]['orgname'], 'providerid': xieyi_offer_id, 'productid': product_info['id']})
|
|
# 追加产品信息
|
|
product_all_infos.append(product_info)
|
|
|
|
# # 没有任何配置的产品 折扣为1
|
|
# provider_products = await self_product_search({'bid_orgid': orgid, 'sor': sor})
|
|
# for prd in provider_products:
|
|
# prdid = prd.get('id')
|
|
# if prdid not in product_all_ids:
|
|
# # TODO 从供应商那里获取对应的产品价格
|
|
# prd['price'] = round(random.random() * 100, 2)
|
|
# prd['discount_price'] = prd.get('price')
|
|
# prd['offer_orgid'] = orgid
|
|
# prd['bid_orgid'] = user_org_id
|
|
# prd['productid'] = prdid
|
|
# product_all_infos.append(prd)
|
|
|
|
# TODO 没有配置折扣和底价客户看不到 回佣产品客户可以看到
|
|
|
|
for prd_detail in product_all_infos:
|
|
# 过滤未来网络产品 固定价格
|
|
if '点对点专线' in prd_detail['name']:
|
|
prd_detail['price'] = 10000
|
|
prd_detail['discount_price'] = prd_detail['price'] * prd_detail['discount']
|
|
specific_pattern = prd_detail['specific_pattern']
|
|
moban_li = await sor.R('specification', {'id': specific_pattern, 'del_flg': '0'})
|
|
if moban_li:
|
|
prd_detail['moban'] = moban_li[0]['spec_pattern']
|
|
else:
|
|
prd_detail['moban'] = ''
|
|
# 筛选产品 product_area ptype
|
|
if ns.get('product_area'):
|
|
product_all_infos = [item_info for item_info in product_all_infos if
|
|
item_info['product_area'] == ns.get('product_area')]
|
|
if ns.get('ptype'):
|
|
product_types = await sor.R('product_type', {})
|
|
product_types_all = await find_children_by_id(product_types, ns['ptype'])
|
|
|
|
product_all_infos = [item_info for item_info in product_all_infos if
|
|
item_info['ptype'] in product_types_all]
|
|
|
|
# 过虑hotshow
|
|
if ns.get('classify') == 'E':
|
|
product_all_infos = [item_info for item_info in product_all_infos if
|
|
item_info['classify']=='E']
|
|
else:
|
|
# 公共页面
|
|
product_all_infos = [item_info for item_info in product_all_infos if
|
|
item_info['hotshow']=='1']
|
|
# 获取中金id
|
|
jncs_li = await sor.R('organization', {'orgname': '中金超算', 'del_flg': '0'})
|
|
jscs_id = jncs_li[0].get('id') if jncs_li else None
|
|
|
|
# 产品区域为空的=None 过滤中金统一映射产品
|
|
filter_product_area = []
|
|
for items in product_all_infos:
|
|
if items['product_area'] == '':
|
|
items['product_area'] = None
|
|
if items['providerid'] == jscs_id:
|
|
continue
|
|
filter_product_area.append(items)
|
|
product_all_infos = filter_product_area
|
|
return {
|
|
'status': True,
|
|
'msg': '客户获取商品信息成功',
|
|
'data': product_all_infos
|
|
}
|
|
except Exception as e:
|
|
raise e
|
|
return {
|
|
'status': False,
|
|
'msg': '客户获取商品信息出错'
|
|
}
|
|
|
|
ret = await kehu_kan_chanpin(params_kw)
|
|
return ret |