20 lines
482 B
Python
20 lines
482 B
Python
|
import pymongo
|
||
|
from bson import ObjectId
|
||
|
from gridfs import GridFS
|
||
|
|
||
|
client = pymongo.MongoClient('mongodb://{}:{}@{}:{}'.format('root', 'sromitdTW569kC#M', '116.63.130.34', 27018))
|
||
|
|
||
|
|
||
|
def find_rating_records(param):
|
||
|
"""
|
||
|
查询评价记录
|
||
|
Parameters:
|
||
|
param: 查询条件
|
||
|
Returns:
|
||
|
record: 查询结果
|
||
|
"""
|
||
|
collection = client['评价']['评价记录']
|
||
|
data = collection.find(param, {'_id': False})
|
||
|
record = list(data)
|
||
|
return record
|