From f68b1d8a16f0d592d6a8a8eaf7c1bd3d003a21c6 Mon Sep 17 00:00:00 2001
From: ZzIsGod1019 <1498852723@qq.com>
Date: Mon, 26 Aug 2024 19:13:31 +0800
Subject: [PATCH] iam: find accounts support filter app_ids (#834)
* iam: find accounts support filter app_ids
* iam:fix bug (move rbum set cate )
---------
Co-authored-by: ZzIsGod1019 <1498852723@11.com>
---
backend/basic/src/rbum/serv/rbum_set_serv.rs | 41 ++++++-------------
.../api/iam_ci_account_api.rs | 12 ++++++
2 files changed, 25 insertions(+), 28 deletions(-)
diff --git a/backend/basic/src/rbum/serv/rbum_set_serv.rs b/backend/basic/src/rbum/serv/rbum_set_serv.rs
index a81f38e6..25e1fca5 100644
--- a/backend/basic/src/rbum/serv/rbum_set_serv.rs
+++ b/backend/basic/src/rbum/serv/rbum_set_serv.rs
@@ -851,7 +851,18 @@ impl RbumSetCateServ {
ctx,
)
.await?;
-
+ let set_item_ids = RbumSetItemServ::find_id_rbums(
+ &RbumSetItemFilterReq {
+ sys_code_query_kind: Some(RbumSetCateLevelQueryKind::Current),
+ rel_rbum_set_cate_sys_codes: Some(vec![set_cate_detail.sys_code.clone()]),
+ ..Default::default()
+ },
+ None,
+ None,
+ funs,
+ ctx,
+ )
+ .await?;
let result = Self::modify_rbum(
set_cate_id,
&mut RbumSetCateModifyReq {
@@ -867,37 +878,11 @@ impl RbumSetCateServ {
ctx,
)
.await;
- let new_sys_code = Self::get_rbum(
- set_cate_id,
- &RbumSetCateFilterReq {
- basic: RbumBasicFilterReq {
- with_sub_own_paths: true,
- ..Default::default()
- },
- ..Default::default()
- },
- funs,
- ctx,
- )
- .await?
- .sys_code;
- let set_item_ids = RbumSetItemServ::find_id_rbums(
- &RbumSetItemFilterReq {
- sys_code_query_kind: Some(RbumSetCateLevelQueryKind::Current),
- rel_rbum_set_cate_sys_codes: Some(vec![]),
- ..Default::default()
- },
- None,
- None,
- funs,
- ctx,
- )
- .await?;
for set_item_id in set_item_ids {
RbumSetItemServ::modify_rbum(
&set_item_id,
&mut RbumSetItemModifyReq {
- rel_rbum_set_cate_id: Some(new_sys_code.clone()),
+ rel_rbum_set_cate_id: Some(set_cate_id.to_string()),
sort: None,
},
funs,
diff --git a/backend/supports/iam/src/console_interface/api/iam_ci_account_api.rs b/backend/supports/iam/src/console_interface/api/iam_ci_account_api.rs
index 337a3769..2fbfa2fe 100644
--- a/backend/supports/iam/src/console_interface/api/iam_ci_account_api.rs
+++ b/backend/supports/iam/src/console_interface/api/iam_ci_account_api.rs
@@ -42,6 +42,7 @@ impl IamCiAccountApi {
ids: Query