15 lines
550 B
Plaintext
15 lines
550 B
Plaintext
async def getruserxiaoshou(ns):
|
|
""" 查销售下所有客户
|
|
"""
|
|
db = DBPools()
|
|
async with db.sqlorContext('kboss') as sor:
|
|
userlist = []
|
|
customer = await sor.R('customer', {'salemanid': ns['salemanid'],'del_flg':'0'})
|
|
for i in customer:
|
|
customer = await sor.R('organization', {'id': i['customerid'],'del_flg':'0'})
|
|
if len(customer) >= 1:
|
|
userlist.append(customer[0])
|
|
return {'status': True, 'data': userlist}
|
|
|
|
ret = await getruserxiaoshou(params_kw)
|
|
return ret |