Commit b72b0a2b authored by 张会鑫's avatar 张会鑫

删除分组判断逻辑删除

parent f07cbbbf
......@@ -43,7 +43,10 @@ class MediaDal(DalBase):
await self.db.execute(sql)
async def get_count_by_groupIds(self, ids: list) -> int:
stmt = select(func.count(self.model.id)).where(self.model.group_id.in_(ids))
stmt = select(func.count(self.model.id)).where(and_(
self.model.group_id.in_(ids),
self.model.is_delete == 0
))
result = await self.db.execute(stmt)
count = result.scalar()
return count
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment