Skip to content

Commit 7d58c9c

Browse files
author
ljl
committed
Merge branch 'main' of https://github.com/ideal-world/bios
2 parents eaec40a + ab55b15 commit 7d58c9c

34 files changed

+1257
-874
lines changed

backend/basic/src/process/task_processor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,9 @@ impl TaskProcessor {
312312
Ok(())
313313
}
314314

315-
/// Fetch the asynchronous task IDs in the context
315+
/// Fetch the asynchronous task id set in the context
316316
///
317-
/// 获取异步任务IDs
317+
/// 获取异步任务id集合
318318
///
319319
/// Use ``,`` to separate multiple tasks
320320
///

backend/basic/src/rbum/domain/rbum_rel.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@ use tardis::db::sea_orm::prelude::*;
44
use tardis::db::sea_orm::*;
55
use tardis::{TardisCreateEntity, TardisEmptyBehavior, TardisEmptyRelation};
66
/// Resource relationship model
7-
///
7+
///
88
/// 资源关联模型
9-
///
9+
///
1010
/// Used to describe the relationship between different resources.
11-
///
11+
///
1212
/// 用于描述不同资源间的关联关系。
1313
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, TardisCreateEntity, TardisEmptyBehavior, TardisEmptyRelation)]
1414
#[sea_orm(table_name = "rbum_rel")]
1515
pub struct Model {
1616
/// Relationship id
17-
///
17+
///
1818
/// 关联id
1919
#[sea_orm(primary_key, auto_increment = false)]
2020
pub id: String,
2121
/// Relationship tag
22-
///
22+
///
2323
/// 关联标签
24-
///
24+
///
2525
/// Used to distinguish different relationships.
26-
///
26+
///
2727
/// 用于区分不同的关联关系。
2828
#[index(index_id = "from_index", repeat(index_id = "to_index"))]
2929
pub tag: String,
@@ -32,31 +32,31 @@ pub struct Model {
3232
/// 关联备注
3333
pub note: String,
3434
/// Relationship source type ([`crate::rbum::rbum_enumeration::RbumRelFromKind`])
35-
///
35+
///
3636
/// 关联来源方的类型([`crate::rbum::rbum_enumeration::RbumRelFromKind`])
3737
#[index(index_id = "from_index")]
3838
pub from_rbum_kind: i16,
3939
/// Relationship source id
40-
///
40+
///
4141
/// 关联来源方的id
4242
#[index(index_id = "from_index")]
4343
pub from_rbum_id: String,
4444
/// Relationship target id
45-
///
45+
///
4646
/// 关联目标方的id
4747
#[index(index_id = "to_index")]
4848
pub to_rbum_item_id: String,
4949
/// Relationship target ownership path
50-
///
50+
///
5151
/// 关联目标方的所有权路径
5252
pub to_own_paths: String,
5353
/// Relationship extension information
5454
///
5555
/// 关联扩展信息
56-
///
56+
///
5757
/// E.g. the record from or to is in another service, to avoid remote calls,
5858
/// you can redundantly add the required information to this field.
59-
///
59+
///
6060
/// 例如:记录来源或目标在另一个服务中,为避免远程调用,可以将所需信息冗余添加到此字段。
6161
pub ext: String,
6262

backend/basic/src/rbum/dto/rbum_filer_dto.rs

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub struct RbumBasicFilterReq {
4343
///
4444
/// 所有权路径
4545
pub own_paths: Option<String>,
46-
/// Object ids
46+
/// Object id set
4747
///
4848
/// 对象id集合
4949
pub ids: Option<Vec<String>>,
@@ -157,11 +157,11 @@ pub struct RbumCertFilterReq {
157157
///
158158
/// 关联的对象id
159159
pub rel_rbum_id: Option<String>,
160-
/// Associated object ids
160+
/// Associated object id set
161161
///
162162
/// 关联的对象id集合
163163
pub rel_rbum_ids: Option<Vec<String>>,
164-
/// Associated resource certificate configuration ids
164+
/// Associated resource certificate configuration id set
165165
///
166166
/// 关联的凭证配置id集合
167167
pub rel_rbum_cert_conf_ids: Option<Vec<String>>,
@@ -390,7 +390,7 @@ pub struct RbumSetItemFilterReq {
390390
///
391391
/// 资源分类(节点)sys_code 列表
392392
pub rel_rbum_set_cate_sys_codes: Option<Vec<String>>,
393-
/// Resource category (node) ids
393+
/// Resource category (node) id set
394394
///
395395
/// 资源分类(节点)id 列表
396396
pub rel_rbum_set_cate_ids: Option<Vec<String>>,
@@ -406,19 +406,18 @@ pub struct RbumSetItemFilterReq {
406406
///
407407
/// 默认为 ``true``
408408
pub rel_rbum_item_can_not_exist: Option<bool>,
409-
/// Associated resource item ids
410-
///
409+
/// Associated resource item id set
411410
/// 关联的资源项id列表
412411
pub rel_rbum_item_ids: Option<Vec<String>>,
413412
/// Associated resource item scope level
414413
///
415414
/// 关联的资源项作用域级别
416415
pub rel_rbum_item_scope_level: Option<RbumScopeLevelKind>,
417-
/// Associated resource item kind ids
416+
/// Associated resource item kind id set
418417
///
419418
/// 关联的资源项类型id列表
420419
pub rel_rbum_item_kind_ids: Option<Vec<String>>,
421-
/// Associated resource item domain ids
420+
/// Associated resource item domain id set
422421
///
423422
/// 关联的资源项域id列表
424423
pub rel_rbum_item_domain_ids: Option<Vec<String>>,
@@ -478,23 +477,23 @@ pub struct RbumSetTreeFilterReq {
478477
///
479478
/// 仅当 ``fetch_cate_item = true`` 时有效。
480479
pub hide_cate_with_empty_item: bool,
481-
/// Associated resource item ids
480+
/// Associated resource item id set
482481
///
483482
/// 关联的资源项id列表
484483
///
485484
/// Only valid when ``fetch_cate_item = true``.
486485
///
487486
/// 仅当 ``fetch_cate_item = true`` 时有效。
488487
pub rel_rbum_item_ids: Option<Vec<String>>,
489-
/// Associated resource item kind ids
488+
/// Associated resource item kind id set
490489
///
491490
/// 关联的资源项类型id列表
492491
///
493492
/// Only valid when ``fetch_cate_item = true``.
494493
///
495494
/// 仅当 ``fetch_cate_item = true`` 时有效。
496495
pub rel_rbum_item_kind_ids: Option<Vec<String>>,
497-
/// Associated resource item domain ids
496+
/// Associated resource item domain id set
498497
///
499498
/// 关联的资源项域id列表
500499
///
@@ -510,12 +509,19 @@ pub struct RbumSetTreeFilterReq {
510509
#[derive(poem_openapi::Object, Serialize, Deserialize, Debug, Clone, Default)]
511510
#[serde(default)]
512511
pub struct RbumSetItemRelFilterReq {
513-
/// 同时根据set_id cate_code 二元组限制
514-
/// TODO
512+
/// Resource set id and resource category (node) id set
513+
///
514+
/// 资源集Id与资源分类(节点)Id集合
515+
///
516+
/// There is an ``or`` relationship between different resource sets, and the Id set of each resource category (node) in the same resource set is an ``or`` relationship.
517+
///
518+
/// 不同资源集之间为 ``or`` 关系,同一资源集的每个资源分类(节点)Id集合为 ``or`` 关系。
515519
pub set_ids_and_cate_codes: Option<HashMap<String, Vec<String>>>,
516-
/// TODO
520+
/// Whether the resource category (node) is associated with descendants
521+
///
522+
/// 资源分类(节点)是否包含子孙级
517523
pub with_sub_set_cate_codes: bool,
518-
/// Associated object ids
524+
/// Associated object id set
519525
///
520526
/// 关联的对象id集合
521527
pub rel_item_ids: Option<Vec<String>>,
@@ -578,7 +584,7 @@ pub struct RbumItemRelFilterReq {
578584
///
579585
/// 关联的对象id
580586
pub rel_item_id: Option<String>,
581-
/// Associated object ids
587+
/// Associated object id set
582588
///
583589
/// 关联的对象id集合
584590
pub rel_item_ids: Option<Vec<String>>,

backend/basic/src/rbum/dto/rbum_item_attr_dto.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ pub struct RbumItemAttrsAddOrModifyReq {
5353
///
5454
/// 添加或修改的值集合
5555
///
56-
/// Format: ``{ "field name": "field value" }``
56+
/// Format: ``{ "attribute name": "attribute value" }``
5757
///
58-
/// ``field name``: [`crate::rbum::dto::rbum_kind_attr_dto::RbumKindAttrDetailResp::name`]
58+
/// ``attribute name``: [`crate::rbum::dto::rbum_kind_attr_dto::RbumKindAttrDetailResp::name`]
5959
pub values: HashMap<String, String>,
6060
/// Associated [resource item](crate::rbum::dto::rbum_item_dto::RbumItemDetailResp) id
6161
///

backend/basic/src/rbum/serv/rbum_crud_serv.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ use crate::rbum::helper::{rbum_event_helper, rbum_scope_helper};
2222
#[cfg(feature = "with-mq")]
2323
use crate::rbum::rbum_config::RbumConfigApi;
2424

25+
pub const ID_FIELD_NAME: &str = "id";
26+
2527
lazy_static! {
2628
pub static ref OWNER_TABLE: Alias = Alias::new("t_owner");
27-
pub static ref ID_FIELD: Alias = Alias::new("id");
29+
pub static ref ID_FIELD: Alias = Alias::new(ID_FIELD_NAME);
2830
pub static ref OWNER_FIELD: Alias = Alias::new("owner");
2931
pub static ref OWN_PATHS_FIELD: Alias = Alias::new("own_paths");
3032
pub static ref CREATE_TIME_FIELD: Alias = Alias::new("create_time");

0 commit comments

Comments
 (0)