fix: DTO 输入校验补全 + 编译修复 + AuthButton 类型修复

- erp-auth/config/workflow/message/plugin/health: 44 处 DTO 校验缺失修复
- erp-plugin/data_dto: utoipa derive 宏 import 修复
- erp-server/main: tracing 宏类型推断修复
- web AuthButton: AiAnalysisCard/VitalSignsTab Button 包裹在 children 内

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
iven
2026-05-20 06:58:54 +08:00
parent d74c7a61de
commit f3bf8b3b1d
17 changed files with 149 additions and 66 deletions

View File

@@ -37,8 +37,9 @@ pub struct CreateDictionaryReq {
pub description: Option<String>,
}
#[derive(Debug, Deserialize, ToSchema)]
#[derive(Debug, Deserialize, Validate, ToSchema)]
pub struct UpdateDictionaryReq {
#[validate(length(min = 1, max = 100, message = "字典名称不能为空且不超过100字符"))]
pub name: Option<String>,
pub description: Option<String>,
pub version: i32,
@@ -54,9 +55,11 @@ pub struct CreateDictionaryItemReq {
pub color: Option<String>,
}
#[derive(Debug, Deserialize, ToSchema)]
#[derive(Debug, Deserialize, Validate, ToSchema)]
pub struct UpdateDictionaryItemReq {
#[validate(length(min = 1, max = 100, message = "标签不能为空且不超过100字符"))]
pub label: Option<String>,
#[validate(length(min = 1, max = 100, message = "值不能为空且不超过100字符"))]
pub value: Option<String>,
pub sort_order: Option<i32>,
pub color: Option<String>,
@@ -99,8 +102,9 @@ pub struct CreateMenuReq {
pub role_ids: Option<Vec<Uuid>>,
}
#[derive(Debug, Deserialize, ToSchema)]
#[derive(Debug, Deserialize, Validate, ToSchema)]
pub struct UpdateMenuReq {
#[validate(length(min = 1, max = 100, message = "菜单标题不能为空且不超过100字符"))]
pub title: Option<String>,
pub path: Option<String>,
pub icon: Option<String>,
@@ -198,8 +202,9 @@ pub struct CreateNumberingRuleReq {
pub reset_cycle: Option<String>,
}
#[derive(Debug, Deserialize, ToSchema)]
#[derive(Debug, Deserialize, Validate, ToSchema)]
pub struct UpdateNumberingRuleReq {
#[validate(length(min = 1, max = 100, message = "规则名称不能为空且不超过100字符"))]
pub name: Option<String>,
pub prefix: Option<String>,
pub date_format: Option<String>,
@@ -252,9 +257,10 @@ pub struct LanguageResp {
pub is_active: bool,
}
#[derive(Debug, Deserialize, ToSchema)]
#[derive(Debug, Deserialize, Validate, ToSchema)]
pub struct UpdateLanguageReq {
pub is_active: bool,
#[validate(length(min = 1, max = 100, message = "语言名称不能为空且不超过100字符"))]
pub name: Option<String>,
}