fix(project):add list project
This commit is contained in:
@@ -45,4 +45,12 @@ class ProjectRepository(BaseRepository[ProjectModel]):
|
||||
update.monitor.code = 'S' + code
|
||||
update.u_at()
|
||||
await use_collection(COLLECTION).update_one({"_id":_id},{"$set":update.mongo_dict()})
|
||||
return await self.get(_id)
|
||||
return await self.get(_id)
|
||||
|
||||
async def list_project_design(self):
|
||||
project = await use_collection(COLLECTION).find({'monitor':{"$exists":0}}).to_list(None)
|
||||
return project
|
||||
|
||||
async def list_project_monitor(self):
|
||||
project = await use_collection(COLLECTION).find({'monitor':{"$exists":1}}).to_list(None)
|
||||
return project
|
||||
Reference in New Issue
Block a user