tfse-admin-api-v0.2/user/db.py

18 lines
419 B
Python
Raw Normal View History

2022-01-06 17:56:30 +08:00
import pymongo
client = pymongo.MongoClient('mongodb://{}:{}@{}:{}'.format('root', 'RYIHrqml#LSW6#!*', '116.63.130.34', 27020))
def find_user_info(param):
"""
查询用户信息
Parameters:
param: 查询条件
Returns:
record: 记录
"""
collection = client['用户']['用户信息']
data = collection.find(param, {'_id': False})
record = list(data)
return record