From e12f621011d608d6cf3314d38910355981f22e0f Mon Sep 17 00:00:00 2001 From: GuoQing Zhang Date: Tue, 2 Jul 2024 14:52:37 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E5=88=A0=E9=99=A4=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=BB=84=E7=9A=84=E9=98=9F=E5=88=97=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=BF=87=E6=9C=9F=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/bisheng/api/services/role_group_service.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backend/bisheng/api/services/role_group_service.py b/src/backend/bisheng/api/services/role_group_service.py index 6e8ef57fd..66c349edf 100644 --- a/src/backend/bisheng/api/services/role_group_service.py +++ b/src/backend/bisheng/api/services/role_group_service.py @@ -132,6 +132,7 @@ def delete_group_hook(self, request: Request, login_user: UserPayload, group_inf # 将删除事件发到redis队列中 delete_message = json.dumps({"id": group_info.id}) redis_client.rpush('delete_group', delete_message) + redis_client.expire_key('delete_group', 86400) redis_client.publish('delete_group', delete_message) def get_group_user_list(self, group_id: int, page_size: int, page_num: int) -> List[User]: From 4c088fb4e30cf91843c2ec4e8441e6c409b9e0d0 Mon Sep 17 00:00:00 2001 From: GuoQing Zhang Date: Tue, 2 Jul 2024 18:05:33 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=8B=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E8=B5=84=E6=BA=90=E7=9A=84=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/bisheng/database/models/group_resource.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/bisheng/database/models/group_resource.py b/src/backend/bisheng/database/models/group_resource.py index 314378eff..d0f179432 100644 --- a/src/backend/bisheng/database/models/group_resource.py +++ b/src/backend/bisheng/database/models/group_resource.py @@ -112,7 +112,7 @@ def get_group_all_resource(cls, group_id: int) -> List[GroupResource]: """ with session_getter() as session: return session.exec( - select(GroupResource).where(GroupResource.group_id == group_id)) + select(GroupResource).where(GroupResource.group_id == group_id)).all() @classmethod def update_group_resource(cls, group_resources: List[GroupResource]) -> List[GroupResource]: