async def mycustomerdata(ns): """个人中心展示我的资料""" db = DBPools() async with db.sqlorContext('kboss') as sor: if ns: ns['del_flg'] = '0' reacs = await sor.R('users', ns) return {'status': True, 'data': reacs} #残留代码 这里需要判断用户是否为机构管理员,如果是,连机构的多有信息一起返回 # ns.pop('id') # ns['contactor_phone'] = reacs[0]['mobile'] # orreacs = await sor.R('organization', ns) # print(orreacs) # if len(orreacs) >= 1: # reacs[0]['organization'] = orreacs[0] # ns['customerid'] = orreacs[0]['id'] # cureacs = await sor.R('customer', ns) # reacs[0]['cureacs'] = cureacs[0] # return {'status': True, 'data': reacs} # return {'status': True, 'data': reacs} return {'status': False, 'msg': '参数错误'} ret = await mycustomerdata(params_kw) return ret