From 10fd1324b580fb612d0f3359051147a4b9914506 Mon Sep 17 00:00:00 2001
From: 李曜臣
Date: Mon, 18 May 2026 00:49:17 +0800
Subject: [PATCH] 5-17接口优化
---
.codex/project/project-context.md | 12 ++++++++++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Mvc/YiConventionalRouteBuilder.cs | 7 +++++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/AuthSession/CurrentUserMenuPermissionsOutputDto.cs | 15 +++++++++++++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Label/LabelCreateInputVo.cs | 30 +++++++++++++++++++++++++++++-
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Label/LabelGetListInputVo.cs | 7 ++++++-
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Label/LabelGetOutputDto.cs | 11 +++++++++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Label/LabelUpdateInputVo.cs | 12 +++++++++++-
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/LabelCategory/LabelCategoryCreateInputVo.cs | 12 +++++++++++-
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/LabelCategory/LabelCategoryGetListInputVo.cs | 10 ++++++++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/LabelCategory/LabelCategoryGetListOutputDto.cs | 23 +++++++++++++++++++++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/LabelCategory/LabelCategoryGetOutputDto.cs | 6 ++++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Location/LocationCreateInputVo.cs | 5 +++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Location/LocationGetListOutputDto.cs | 5 +++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Location/LocationUpdateInputVo.cs | 5 +++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Partner/PartnerCreateInputVo.cs | 5 ++++-
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Partner/PartnerGetListOutputDto.cs | 5 ++++-
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Partner/PartnerGetOutputDto.cs | 14 +-------------
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Partner/PartnerUpdateInputVo.cs | 9 +--------
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Product/ProductCreateInputVo.cs | 14 ++++++++++++--
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Product/ProductGetListInputVo.cs | 15 +++++++++++++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Product/ProductGetOutputDto.cs | 11 ++++++++++-
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/ProductCategory/ProductCategoryCreateInputVo.cs | 12 +++++++++++-
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/ProductCategory/ProductCategoryGetListInputVo.cs | 10 ++++++++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/ProductCategory/ProductCategoryGetListOutputDto.cs | 16 ++++++++++++++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/ProductCategory/ProductCategoryGetOutputDto.cs | 7 +++++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/RbacRole/RbacRoleCreateInputVo.cs | 15 ++++++++++++++-
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/RbacRole/RbacRoleGetListOutputDto.cs | 5 +++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/TeamMember/TeamMemberCreateInputVo.cs | 24 ++++++++++++++++++++++--
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/TeamMember/TeamMemberGetListOutputDto.cs | 6 ++++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/TeamMember/TeamMemberGetOutputDto.cs | 9 +++++++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/TeamMember/TeamMemberUpdateInputVo.cs | 25 ++++++++++++++++++++++++-
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/FoodLabeling.Application.Contracts.csproj | 1 +
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IAuthSessionAppService.cs | 2 ++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IGroupAppService.cs | 16 ++++++++++++----
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IPartnerAppService.cs | 27 ++++++++++++++++++++-------
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IProductAppService.cs | 19 +++++++++++++------
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IProductCategoryAppService.cs | 9 +++++++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IUsAppAuthAppService.cs | 23 +++++++++++++++++++++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/FoodLabeling.Application.csproj | 1 +
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/AuthSessionAppService.cs | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/DbModels/FlPartnerDbEntity.cs | 15 +++++++++++++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/GroupAppService.cs | 75 ++++++++++++++++++++++++++++++++++++++++++---------------------------------
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/LabelAppService.cs | 139 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/LabelCategoryAppService.cs | 359 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------------
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/LocationAppService.cs | 6 +++++-
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/PartnerAppService.cs | 151 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/ProductAppService.cs | 198 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/ProductCategoryAppService.cs | 269 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/RbacRoleAppService.cs | 161 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/TeamMemberAppService.cs | 123 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/UsAppAuthAppService.cs | 25 ++++++++++++++++++++++---
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Domain/Entities/LocationAggregateRoot.cs | 6 ++++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/scripts/fl_partner_create.sql | 5 +++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/RoleGetListOutputDto.cs | 5 +++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Role/RoleGetOutputDto.cs | 5 +++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/AccountService.cs | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/System/RoleService.cs | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Yi.Framework.Rbac.Application.csproj | 1 +
美国版/Food Labeling Management Code/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/YiFrameworkRbacDomainSharedModule.cs | 2 ++
美国版/Food Labeling Management Code/Yi.Abp.Net8/src/Yi.Abp.Web/Yi.Abp.Web.csproj | 9 +++++++++
美国版/Food Labeling Management Code/Yi.Abp.Net8/src/Yi.Abp.Web/appsettings.json | 32 ++++++++++++++++++++++++++++++--
美国版/Food Labeling Management Platform/src/components/people/PeopleView.tsx | 14 +++++++-------
美国版/Food Labeling Management Platform/src/types/authSession.ts | 6 ++++++
美国版/Food Labeling Management Platform/src/types/labelCategory.ts | 11 +++++++++++
美国版/Food Labeling Management Platform/src/types/role.ts | 2 ++
项目相关文档/批量导入导出接口说明.md | 11 ++++++++---
66 files changed, 2023 insertions(+), 315 deletions(-)
diff --git a/.codex/project/project-context.md b/.codex/project/project-context.md
index 2f81d24..9e19973 100644
--- a/.codex/project/project-context.md
+++ b/.codex/project/project-context.md
@@ -66,3 +66,15 @@
- `打印机SDK/`、`nativeplugins/`、`scripts/`、`unpackage/` 等目录
后续修改时应避免误覆盖这些现有变更。
+
+## 7. 美国版业务字段命名(固定映射)
+
+开发与文档中统一使用下列对应关系,**不要**在 `location` 表再新增名为 `Region` 的列:
+
+| 界面 / 接口英文 | 中文 | 主数据表 | 门店表 `location` 字段 |
+|-----------------|------|----------|------------------------|
+| Company / Partner | 公司 | `fl_partner` | `Partner`(公司名称字符串) |
+| **Region / Group** | **区域 / 组织** | **`fl_group`**(`GroupName`) | **`GroupName`** |
+| Location | 门店 | `location` | `LocationCode` / `LocationName` |
+
+**硬性规则**:**Region 对应 `location.GroupName`**(与 `fl_group.GroupName` 通过 `Partner` + 名称匹配)。列表/API 出参字段名可用 `region`,落库与查询一律用 `GroupName`。
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Mvc/YiConventionalRouteBuilder.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Mvc/YiConventionalRouteBuilder.cs
index 8a808b3..b6678af 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Mvc/YiConventionalRouteBuilder.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/framework/Yi.Framework.AspNetCore/Mvc/YiConventionalRouteBuilder.cs
@@ -78,6 +78,13 @@ namespace Yi.Framework.AspNetCore.Mvc
return baseUrl;
}
+ // Guid 必须带路由约束,否则与 export-xxx、download-xxx 等字面路径冲突
+ var idClrType = Nullable.GetUnderlyingType(idParameter.ParameterType) ?? idParameter.ParameterType;
+ if (idClrType == typeof(Guid))
+ {
+ return $"{baseUrl}/{{id:guid}}";
+ }
+
// 处理原始类型ID
if (TypeHelper.IsPrimitiveExtended(idParameter.ParameterType, includeEnums: true))
{
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/AuthSession/CurrentUserMenuPermissionsOutputDto.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/AuthSession/CurrentUserMenuPermissionsOutputDto.cs
index 5ea17eb..a7804a6 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/AuthSession/CurrentUserMenuPermissionsOutputDto.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/AuthSession/CurrentUserMenuPermissionsOutputDto.cs
@@ -12,4 +12,19 @@ public class CurrentUserMenuPermissionsOutputDto
public List PermissionCodes { get; set; } = new();
public List Menus { get; set; } = new();
+
+ ///
+ /// 用户资料最后更新时间(User.LastModificationTime,无则前端可忽略或展示「无」)
+ ///
+ public DateTime? LastUpdated { get; set; }
+
+ ///
+ /// 角色展示名(多角色英文逗号拼接;与 对应的库中 RoleName)
+ ///
+ public string Role { get; set; } = string.Empty;
+
+ ///
+ /// 全名:优先姓名(User.Name),其次昵称(Nick),最后用户名
+ ///
+ public string FullName { get; set; } = string.Empty;
}
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Label/LabelCreateInputVo.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Label/LabelCreateInputVo.cs
index bd1107f..0d249b6 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Label/LabelCreateInputVo.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Label/LabelCreateInputVo.cs
@@ -8,7 +8,35 @@ public class LabelCreateInputVo
public string TemplateCode { get; set; } = string.Empty;
- public string LocationId { get; set; } = string.Empty;
+ ///
+ /// 适用 Company(fl_partner.Id);与 合并,用于解析所属门店
+ ///
+ public string? PartnerId { get; set; }
+
+ ///
+ /// 适用 Company 多选(fl_partner.Id)
+ ///
+ public List? PartnerIds { get; set; }
+
+ ///
+ /// 适用 Region 多选(fl_group.Id);与 合并
+ ///
+ public List? RegionIds { get; set; }
+
+ ///
+ /// 适用 Region 多选(与 相同)
+ ///
+ public List? GroupIds { get; set; }
+
+ ///
+ /// 所属门店(location.Id);可与 Company/Region 一并传入以校验范围;单独传则直接落库
+ ///
+ public string? LocationId { get; set; }
+
+ ///
+ /// 门店候选(多选);标签仅绑定单门店:未传 且合并结果唯一时自动取该项
+ ///
+ public List? LocationIds { get; set; }
public string LabelCategoryId { get; set; } = string.Empty;
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Label/LabelGetListInputVo.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Label/LabelGetListInputVo.cs
index 07dd5f8..5594c9a 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Label/LabelGetListInputVo.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Label/LabelGetListInputVo.cs
@@ -10,7 +10,12 @@ public class LabelGetListInputVo : PagedAndSortedResultRequestDto
public string? Keyword { get; set; }
///
- /// 门店Id(可选)
+ /// 组织/Region Id(fl_group.Id);筛选标签所属门店落在该 Region 下的记录
+ ///
+ public string? GroupId { get; set; }
+
+ ///
+ /// 门店 Id(location.Id,Guid 字符串);最精确筛选,传则忽略
///
public string? LocationId { get; set; }
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Label/LabelGetOutputDto.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Label/LabelGetOutputDto.cs
index 77cd258..4362731 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Label/LabelGetOutputDto.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Label/LabelGetOutputDto.cs
@@ -10,6 +10,17 @@ public class LabelGetOutputDto
public string LocationName { get; set; } = string.Empty;
+ /// 适用 Company Id(由所属门店反推)
+ public string? PartnerId { get; set; }
+
+ public List PartnerIds { get; set; } = new();
+
+ /// 适用 Region Id(fl_group.Id)
+ public List RegionIds { get; set; } = new();
+
+ /// 与 相同
+ public List GroupIds { get; set; } = new();
+
public string LabelCategoryId { get; set; } = string.Empty;
public string LabelCategoryName { get; set; } = string.Empty;
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Label/LabelUpdateInputVo.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Label/LabelUpdateInputVo.cs
index f656110..e676348 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Label/LabelUpdateInputVo.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Label/LabelUpdateInputVo.cs
@@ -6,7 +6,17 @@ public class LabelUpdateInputVo
public string TemplateCode { get; set; } = string.Empty;
- public string LocationId { get; set; } = string.Empty;
+ public string? PartnerId { get; set; }
+
+ public List? PartnerIds { get; set; }
+
+ public List? RegionIds { get; set; }
+
+ public List? GroupIds { get; set; }
+
+ public string? LocationId { get; set; }
+
+ public List? LocationIds { get; set; }
public string LabelCategoryId { get; set; } = string.Empty;
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/LabelCategory/LabelCategoryCreateInputVo.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/LabelCategory/LabelCategoryCreateInputVo.cs
index efdd7fd..349c5da 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/LabelCategory/LabelCategoryCreateInputVo.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/LabelCategory/LabelCategoryCreateInputVo.cs
@@ -29,7 +29,17 @@ public class LabelCategoryCreateInputVo
public string AvailabilityType { get; set; } = "ALL";
///
- /// 指定门店 Id 列表(当 AvailabilityType=SPECIFIED 时必填)
+ /// 适用 Region(多选),fl_group.Id;与 合并去重
+ ///
+ public List? RegionIds { get; set; }
+
+ ///
+ /// 适用 Region(多选),与 相同
+ ///
+ public List? GroupIds { get; set; }
+
+ ///
+ /// 适用门店(多选),location.Id;与 Region 合并后写入 fl_label_category_location
///
public List? LocationIds { get; set; }
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/LabelCategory/LabelCategoryGetListInputVo.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/LabelCategory/LabelCategoryGetListInputVo.cs
index 5f93662..b70e95d 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/LabelCategory/LabelCategoryGetListInputVo.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/LabelCategory/LabelCategoryGetListInputVo.cs
@@ -7,5 +7,15 @@ public class LabelCategoryGetListInputVo : PagedAndSortedResultRequestDto
public string? Keyword { get; set; }
public bool? State { get; set; }
+
+ ///
+ /// Region 筛选(fl_group.Id);含 availabilityType=ALL 的分类
+ ///
+ public string? GroupId { get; set; }
+
+ ///
+ /// 门店筛选(location.Id);优先于
+ ///
+ public string? LocationId { get; set; }
}
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/LabelCategory/LabelCategoryGetListOutputDto.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/LabelCategory/LabelCategoryGetListOutputDto.cs
index c8effdf..694232c 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/LabelCategory/LabelCategoryGetListOutputDto.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/LabelCategory/LabelCategoryGetListOutputDto.cs
@@ -18,10 +18,33 @@ public class LabelCategoryGetListOutputDto
public string AvailabilityType { get; set; } = "ALL";
+ /// 适用 Region 展示(ALL 时为 All Regions)
+ public string Region { get; set; } = string.Empty;
+
+ /// 适用门店展示(ALL 时为 All Locations)
+ public string Location { get; set; } = string.Empty;
+
+ /// 适用 Region Id 列表(多选)
+ public List RegionIds { get; set; } = new();
+
+ /// 适用门店 Id 列表(多选)
+ public List LocationIds { get; set; } = new();
+
public int OrderNum { get; set; }
+ ///
+ /// 该分类下已创建标签数量(fl_label 未删除且 LabelCategoryId 匹配)
+ ///
public long NoOfLabels { get; set; }
+ ///
+ /// 分类创建时间(兼容旧前端字段 creationTime)
+ ///
+ public DateTime CreationTime { get; set; }
+
+ ///
+ /// 最后编辑时间:分类自身与下属标签的 LastModificationTime/CreationTime 取最大值
+ ///
public DateTime LastEdited { get; set; }
}
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/LabelCategory/LabelCategoryGetOutputDto.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/LabelCategory/LabelCategoryGetOutputDto.cs
index c4a740b..5ccdc73 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/LabelCategory/LabelCategoryGetOutputDto.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/LabelCategory/LabelCategoryGetOutputDto.cs
@@ -18,6 +18,12 @@ public class LabelCategoryGetOutputDto
public string AvailabilityType { get; set; } = "ALL";
+ /// 适用 Region Id 列表(多选;ALL 时为空)
+ public List RegionIds { get; set; } = new();
+
+ /// 与 相同
+ public List GroupIds { get; set; } = new();
+
public List LocationIds { get; set; } = new();
public int OrderNum { get; set; }
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Location/LocationCreateInputVo.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Location/LocationCreateInputVo.cs
index bf453f5..00b1d34 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Location/LocationCreateInputVo.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Location/LocationCreateInputVo.cs
@@ -34,6 +34,11 @@ public class LocationCreateInputVo
public decimal? Longitude { get; set; }
+ ///
+ /// 经营时间(自由文本)
+ ///
+ public string? OperatingHours { get; set; }
+
public bool State { get; set; } = true;
}
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Location/LocationGetListOutputDto.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Location/LocationGetListOutputDto.cs
index 067aec1..7bcc7e1 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Location/LocationGetListOutputDto.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Location/LocationGetListOutputDto.cs
@@ -33,6 +33,11 @@ public class LocationGetListOutputDto
public decimal? Longitude { get; set; }
+ ///
+ /// 经营时间
+ ///
+ public string? OperatingHours { get; set; }
+
public bool State { get; set; }
}
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Location/LocationUpdateInputVo.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Location/LocationUpdateInputVo.cs
index 45f7731..7dc859f 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Location/LocationUpdateInputVo.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Location/LocationUpdateInputVo.cs
@@ -33,6 +33,11 @@ public class LocationUpdateInputVo
public decimal? Longitude { get; set; }
///
+ /// 经营时间(自由文本)
+ ///
+ public string? OperatingHours { get; set; }
+
+ ///
/// 启用状态
///
public bool State { get; set; } = true;
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Partner/PartnerCreateInputVo.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Partner/PartnerCreateInputVo.cs
index 18d024c..2f49729 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Partner/PartnerCreateInputVo.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Partner/PartnerCreateInputVo.cs
@@ -3,7 +3,7 @@ namespace FoodLabeling.Application.Contracts.Dtos.Partner;
///
/// 新建合作伙伴入参
///
-public class PartnerCreateInputVo
+public class PartnerCreateInputVo : PartnerAddressFieldsDto
{
public string PartnerName { get; set; } = string.Empty;
@@ -11,5 +11,8 @@ public class PartnerCreateInputVo
public string? PhoneNumber { get; set; }
+ ///
+ /// 是否启用(Active / Inactive)
+ ///
public bool State { get; set; } = true;
}
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Partner/PartnerGetListOutputDto.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Partner/PartnerGetListOutputDto.cs
index 42bef41..c3a5112 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Partner/PartnerGetListOutputDto.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Partner/PartnerGetListOutputDto.cs
@@ -3,7 +3,7 @@ namespace FoodLabeling.Application.Contracts.Dtos.Partner;
///
/// 合作伙伴列表项
///
-public class PartnerGetListOutputDto
+public class PartnerGetListOutputDto : PartnerAddressFieldsDto
{
public string Id { get; set; } = string.Empty;
@@ -13,6 +13,9 @@ public class PartnerGetListOutputDto
public string? PhoneNumber { get; set; }
+ ///
+ /// 是否启用
+ ///
public bool State { get; set; }
public DateTime CreationTime { get; set; }
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Partner/PartnerGetOutputDto.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Partner/PartnerGetOutputDto.cs
index f4bf1ac..4bd4677 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Partner/PartnerGetOutputDto.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Partner/PartnerGetOutputDto.cs
@@ -3,19 +3,7 @@ namespace FoodLabeling.Application.Contracts.Dtos.Partner;
///
/// 合作伙伴详情
///
-public class PartnerGetOutputDto
+public class PartnerGetOutputDto : PartnerGetListOutputDto
{
- public string Id { get; set; } = string.Empty;
-
- public string PartnerName { get; set; } = string.Empty;
-
- public string? ContactEmail { get; set; }
-
- public string? PhoneNumber { get; set; }
-
- public bool State { get; set; }
-
- public DateTime CreationTime { get; set; }
-
public DateTime? LastModificationTime { get; set; }
}
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Partner/PartnerUpdateInputVo.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Partner/PartnerUpdateInputVo.cs
index a24c330..9f450b0 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Partner/PartnerUpdateInputVo.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Partner/PartnerUpdateInputVo.cs
@@ -3,13 +3,6 @@ namespace FoodLabeling.Application.Contracts.Dtos.Partner;
///
/// 编辑合作伙伴入参
///
-public class PartnerUpdateInputVo
+public class PartnerUpdateInputVo : PartnerCreateInputVo
{
- public string PartnerName { get; set; } = string.Empty;
-
- public string? ContactEmail { get; set; }
-
- public string? PhoneNumber { get; set; }
-
- public bool State { get; set; } = true;
}
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Product/ProductCreateInputVo.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Product/ProductCreateInputVo.cs
index fb33b83..c45dab4 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Product/ProductCreateInputVo.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Product/ProductCreateInputVo.cs
@@ -18,8 +18,18 @@ public class ProductCreateInputVo
public bool State { get; set; } = true;
///
- /// 可选。门店 Id 列表;每个 Id 在 fl_location_product 落一行(同一 fl_product 可对应多门店)。
- /// 不传或空列表则不在本接口写入门店关联(仍可用 product-location 接口维护)。
+ /// 适用 Company(fl_partner.Id,UI 称 Company);展开该公司下全部门店后与 Region/门店合并写入 fl_location_product
+ ///
+ public string? PartnerId { get; set; }
+
+ ///
+ /// 适用 Region(fl_group.Id,UI 称 Region;库字段为 location.GroupName)
+ ///
+ public List? GroupIds { get; set; }
+
+ ///
+ /// 适用门店 Id 列表;与 合并后写入 fl_location_product。
+ /// 不传则不在本接口写入门店关联。
///
public List? LocationIds { get; set; }
}
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Product/ProductGetListInputVo.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Product/ProductGetListInputVo.cs
index b6e26fb..028e675 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Product/ProductGetListInputVo.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Product/ProductGetListInputVo.cs
@@ -17,5 +17,20 @@ public class ProductGetListInputVo : PagedAndSortedResultRequestDto
/// 启用状态
///
public bool? State { get; set; }
+
+ ///
+ /// 公司(合作伙伴)Id,对应 fl_partner.Id;筛选绑定在该公司下门店的产品
+ ///
+ public string? PartnerId { get; set; }
+
+ ///
+ /// 组织/Region Id,对应 fl_group.Id;筛选绑定在该 Region 对应门店下的产品(优先于 )
+ ///
+ public string? GroupId { get; set; }
+
+ ///
+ /// 门店 Id(location.Id,Guid 字符串);最精确筛选,传则忽略 /
+ ///
+ public string? LocationId { get; set; }
}
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Product/ProductGetOutputDto.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Product/ProductGetOutputDto.cs
index 4308143..90d6071 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Product/ProductGetOutputDto.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/Product/ProductGetOutputDto.cs
@@ -18,8 +18,17 @@ public class ProductGetOutputDto
public bool State { get; set; }
+ /// 适用 Company Id(fl_partner.Id,由关联门店反推;多公司时取第一个)
+ public string? PartnerId { get; set; }
+
+ /// 适用 Company Id 列表(去重)
+ public List PartnerIds { get; set; } = new();
+
+ /// 适用 Region Id(fl_group.Id,由关联门店反推)
+ public List GroupIds { get; set; } = new();
+
///
- /// 该产品关联的门店Id列表(来自 fl_location_product)
+ /// 适用门店 Id 列表(来自 fl_location_product)
///
public List LocationIds { get; set; } = new();
}
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/ProductCategory/ProductCategoryCreateInputVo.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/ProductCategory/ProductCategoryCreateInputVo.cs
index 9f45ada..f3e4a06 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/ProductCategory/ProductCategoryCreateInputVo.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/ProductCategory/ProductCategoryCreateInputVo.cs
@@ -32,7 +32,17 @@ public class ProductCategoryCreateInputVo
public string AvailabilityType { get; set; } = "ALL";
///
- /// 指定门店 Id 列表(当 AvailabilityType=SPECIFIED 时必填)
+ /// 适用 Region(**多选**),fl_group.Id 数组;与 等价,推荐本字段。
+ ///
+ public List? RegionIds { get; set; }
+
+ ///
+ /// 适用 Region(多选),与 相同;传任一会合并去重。
+ ///
+ public List? GroupIds { get; set; }
+
+ ///
+ /// 适用门店(**多选**),location.Id 数组;与 Region 合并后写入 fl_product_category_location。
///
public List? LocationIds { get; set; }
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/ProductCategory/ProductCategoryGetListInputVo.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/ProductCategory/ProductCategoryGetListInputVo.cs
index 4828537..7350080 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/ProductCategory/ProductCategoryGetListInputVo.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/ProductCategory/ProductCategoryGetListInputVo.cs
@@ -16,5 +16,15 @@ public class ProductCategoryGetListInputVo : PagedAndSortedResultRequestDto
/// 启用状态过滤
///
public bool? State { get; set; }
+
+ ///
+ /// 按 Region 筛选(fl_group.Id):返回适用于该 Region 下任一门门店的分类,以及 availabilityType=ALL 的分类
+ ///
+ public string? GroupId { get; set; }
+
+ ///
+ /// 按门店筛选(location.Id,Guid 字符串);优先于
+ ///
+ public string? LocationId { get; set; }
}
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/ProductCategory/ProductCategoryGetListOutputDto.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/ProductCategory/ProductCategoryGetListOutputDto.cs
index 51048ce..ebfc336 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/ProductCategory/ProductCategoryGetListOutputDto.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/ProductCategory/ProductCategoryGetListOutputDto.cs
@@ -24,5 +24,21 @@ public class ProductCategoryGetListOutputDto
public int OrderNum { get; set; }
public DateTime LastEdited { get; set; }
+
+ ///
+ /// 适用 Region 展示(availabilityType=ALL 时为 All Regions;SPECIFIED 时为绑定门店去重后的 location.GroupName,英文逗号拼接)
+ ///
+ public string Region { get; set; } = string.Empty;
+
+ ///
+ /// 适用门店展示(availabilityType=ALL 时为 All Locations;SPECIFIED 时为绑定门店名称,英文逗号拼接)
+ ///
+ public string Location { get; set; } = string.Empty;
+
+ /// 适用 Region Id 列表(多选;ALL 时为空数组)
+ public List RegionIds { get; set; } = new();
+
+ /// 适用门店 Id 列表(多选;ALL 时为空数组)
+ public List LocationIds { get; set; } = new();
}
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/ProductCategory/ProductCategoryGetOutputDto.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/ProductCategory/ProductCategoryGetOutputDto.cs
index 2018bc2..09e0891 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/ProductCategory/ProductCategoryGetOutputDto.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/ProductCategory/ProductCategoryGetOutputDto.cs
@@ -22,6 +22,13 @@ public class ProductCategoryGetOutputDto
public string AvailabilityType { get; set; } = "ALL";
+ /// 适用 Region Id 列表(多选,fl_group.Id;由绑定门店反推)
+ public List RegionIds { get; set; } = new();
+
+ /// 与 相同(兼容字段)
+ public List GroupIds { get; set; } = new();
+
+ /// 适用门店 Id 列表(多选,location.Id)
public List LocationIds { get; set; } = new();
public int OrderNum { get; set; }
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/RbacRole/RbacRoleCreateInputVo.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/RbacRole/RbacRoleCreateInputVo.cs
index 53b2e73..af86fc8 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/RbacRole/RbacRoleCreateInputVo.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/RbacRole/RbacRoleCreateInputVo.cs
@@ -18,6 +18,19 @@ public class RbacRoleCreateInputVo
public bool State { get; set; } = true;
- public int OrderNum { get; set; } = 0;
+ ///
+ /// 排序号;不传或传 null 时新增默认为 0,编辑时保留原值
+ ///
+ public int? OrderNum { get; set; }
+
+ ///
+ /// 绑定菜单 Id;与 accessPermissions 同时传时以本字段为准
+ ///
+ public List? MenuIds { get; set; }
+
+ ///
+ /// 按 PermissionCode 绑定菜单(英文逗号分隔);传空字符串表示清空绑定;不传则不修改已有绑定(仅编辑时)
+ ///
+ public string? AccessPermissions { get; set; }
}
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/RbacRole/RbacRoleGetListOutputDto.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/RbacRole/RbacRoleGetListOutputDto.cs
index 3940df9..d981d13 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/RbacRole/RbacRoleGetListOutputDto.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/RbacRole/RbacRoleGetListOutputDto.cs
@@ -18,5 +18,10 @@ public class RbacRoleGetListOutputDto
public bool State { get; set; }
public int OrderNum { get; set; }
+
+ ///
+ /// 已绑定菜单的 PermissionCode 汇总(英文逗号+空格拼接,与 /api/app/role 一致)
+ ///
+ public string AccessPermissions { get; set; } = string.Empty;
}
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/TeamMember/TeamMemberCreateInputVo.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/TeamMember/TeamMemberCreateInputVo.cs
index aedc9e6..b443b71 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/TeamMember/TeamMemberCreateInputVo.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/TeamMember/TeamMemberCreateInputVo.cs
@@ -18,9 +18,29 @@ public class TeamMemberCreateInputVo
public Guid? RoleId { get; set; }
///
- /// 关联门店(至少1个)
+ /// 适用 Company(fl_partner.Id,UI 称 Company);与 合并
///
- public List LocationIds { get; set; } = new();
+ public string? PartnerId { get; set; }
+
+ ///
+ /// 适用 Company 多选(fl_partner.Id)
+ ///
+ public List? PartnerIds { get; set; }
+
+ ///
+ /// 适用 Region 多选(fl_group.Id);与 合并
+ ///
+ public List? RegionIds { get; set; }
+
+ ///
+ /// 适用 Region 多选(与 相同)
+ ///
+ public List? GroupIds { get; set; }
+
+ ///
+ /// 适用门店多选(location.Id);与 Company/Region 合并后写入 userlocation
+ ///
+ public List? LocationIds { get; set; }
public bool State { get; set; } = true;
}
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/TeamMember/TeamMemberGetListOutputDto.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/TeamMember/TeamMemberGetListOutputDto.cs
index 90a383c..e28a30a 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/TeamMember/TeamMemberGetListOutputDto.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/TeamMember/TeamMemberGetListOutputDto.cs
@@ -21,6 +21,12 @@ public class TeamMemberGetListOutputDto
public string? RoleName { get; set; }
+ /// 适用 Company Id 列表(多选)
+ public List PartnerIds { get; set; } = new();
+
+ /// 适用 Region Id 列表(多选)
+ public List RegionIds { get; set; } = new();
+
public List AssignedLocations { get; set; } = new();
}
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/TeamMember/TeamMemberGetOutputDto.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/TeamMember/TeamMemberGetOutputDto.cs
index 9daa71a..bf245f9 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/TeamMember/TeamMemberGetOutputDto.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/TeamMember/TeamMemberGetOutputDto.cs
@@ -16,6 +16,15 @@ public class TeamMemberGetOutputDto
public Guid? RoleId { get; set; }
+ /// 适用 Company Id(多选,由绑定门店反推)
+ public List PartnerIds { get; set; } = new();
+
+ /// 适用 Region Id(多选,fl_group.Id)
+ public List RegionIds { get; set; } = new();
+
+ /// 与 相同
+ public List GroupIds { get; set; } = new();
+
public List LocationIds { get; set; } = new();
public List AssignedLocations { get; set; } = new();
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/TeamMember/TeamMemberUpdateInputVo.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/TeamMember/TeamMemberUpdateInputVo.cs
index f0e1e7d..98299e9 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/TeamMember/TeamMemberUpdateInputVo.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/Dtos/TeamMember/TeamMemberUpdateInputVo.cs
@@ -17,7 +17,30 @@ public class TeamMemberUpdateInputVo
public Guid? RoleId { get; set; }
- public List LocationIds { get; set; } = new();
+ ///
+ /// 适用 Company(fl_partner.Id);与 合并
+ ///
+ public string? PartnerId { get; set; }
+
+ ///
+ /// 适用 Company 多选(fl_partner.Id)
+ ///
+ public List? PartnerIds { get; set; }
+
+ ///
+ /// 适用 Region 多选(fl_group.Id);与 合并
+ ///
+ public List? RegionIds { get; set; }
+
+ ///
+ /// 适用 Region 多选(与 相同)
+ ///
+ public List? GroupIds { get; set; }
+
+ ///
+ /// 适用门店多选(location.Id);与 Company/Region 合并后写入 userlocation
+ ///
+ public List? LocationIds { get; set; }
public bool State { get; set; } = true;
}
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/FoodLabeling.Application.Contracts.csproj b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/FoodLabeling.Application.Contracts.csproj
index 6a5eb2d..fbb5ead 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/FoodLabeling.Application.Contracts.csproj
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/FoodLabeling.Application.Contracts.csproj
@@ -3,6 +3,7 @@
+
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IAuthSessionAppService.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IAuthSessionAppService.cs
index a033cd9..e858484 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IAuthSessionAppService.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IAuthSessionAppService.cs
@@ -13,6 +13,8 @@ public interface IAuthSessionAppService : IApplicationService
///
///
/// 与框架 UserManager.GetInfoAsync 一致;用户名为 admin 时返回全部未删除菜单(与 AccountService.GetVue3Router 行为对齐)。
+ /// 返回体额外包含:lastUpdated(用户 LastModificationTime)、role(角色展示名,多角色英文逗号拼接)、fullName(姓名优先,其次昵称、用户名)。
+ /// 角色名通过 Role 表直查(RoleDbEntity),避免走仓储 IDataPermission。
///
/// 用户简要信息、权限码与菜单树
/// 成功
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IGroupAppService.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IGroupAppService.cs
index 8fbb65f..d216d6c 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IGroupAppService.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IGroupAppService.cs
@@ -14,13 +14,18 @@ public interface IGroupAppService : IApplicationService
///
/// 组织分页列表(与导出使用相同筛选条件)
///
+ ///
+ /// 数据范围(按登录 Token):
+ /// 管理员可见全部 Region;其它角色仅可见其 userlocation 绑定门店对应的组织(location.Partner + location.GroupName 与 fl_group 匹配)。
+ ///
/// 分页与筛选;SkipCount 为页码(从 1 起)
Task> GetListAsync(GroupGetListInputVo input);
///
/// 组织详情
///
- Task GetAsync(string id);
+ /// 主键(Guid,与 fl_group.Id 一致;约定路由 {id:guid},避免与 export-pdf 等路径冲突)
+ Task GetAsync(Guid id);
///
/// 新增组织
@@ -30,16 +35,19 @@ public interface IGroupAppService : IApplicationService
///
/// 编辑组织
///
- Task UpdateAsync(string id, GroupUpdateInputVo input);
+ Task UpdateAsync(Guid id, GroupUpdateInputVo input);
///
/// 删除组织(逻辑删除)
///
- Task DeleteAsync(string id);
+ Task DeleteAsync(Guid id);
///
- /// 按列表相同筛选条件全量导出组织(Region)为 PDF(不分页;与 相同筛选;单次最多 5000 条)
+ /// 按列表相同筛选条件全量导出组织(Region)为 PDF(不分页;与 相同筛选与 Token 数据范围;单次最多 5000 条)
///
+ ///
+ /// 与 使用同一套 BuildGroupJoinedQueryAsync(含 ResolveGroupScopeAsync),导出行集与列表一致。
+ ///
/// Keyword、PartnerId、State、Sorting;分页字段忽略
/// application/pdf
Task ExportPdfAsync(GroupGetListInputVo input);
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IPartnerAppService.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IPartnerAppService.cs
index 096be2c..1797cce 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IPartnerAppService.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IPartnerAppService.cs
@@ -14,6 +14,13 @@ public interface IPartnerAppService : IApplicationService
///
/// 合作伙伴分页列表(与导出使用相同筛选条件)
///
+ ///
+ /// 数据范围(按登录 Token):
+ ///
+ /// - 管理员(角色码 admin、用户名为 admin 或权限 *:*:*):可查看全部公司;
+ /// - 其它角色:仅可查看当前用户在 userlocation 中绑定门店所属的合作伙伴(location.Partner 与 fl_partner 按名称或 Id 匹配)。
+ ///
+ ///
/// 分页与筛选;SkipCount 为页码(从 1 起)
/// 分页数据
/// 成功
@@ -24,17 +31,17 @@ public interface IPartnerAppService : IApplicationService
///
/// 合作伙伴详情
///
- /// 主键 Id
+ /// 主键(Guid,与 fl_partner.Id 一致;约定路由 {id:guid},避免与 export-pdf 等路径冲突)
/// 详情
/// 成功
/// Id 无效
/// 服务器错误
- Task GetAsync(string id);
+ Task GetAsync(Guid id);
///
/// 新增合作伙伴
///
- /// 名称、邮箱、电话、启用状态
+ /// 名称、联系信息、地址、启用状态
/// 新建后的详情
///
/// 示例请求:
@@ -43,9 +50,15 @@ public interface IPartnerAppService : IApplicationService
/// "partnerName": "Global Foods Inc.",
/// "contactEmail": "admin@globalfoods.com",
/// "phoneNumber": "+1 (555) 100-2000",
+ /// "street": "123 Main St",
+ /// "city": "New York",
+ /// "stateCode": "NY",
+ /// "country": "USA",
+ /// "zipCode": "10001",
/// "state": true
/// }
/// ```
+ /// 地址中的州/省请传 stateCode(如 NY);state(boolean)表示是否启用。
///
/// 成功
/// 校验失败
@@ -56,12 +69,12 @@ public interface IPartnerAppService : IApplicationService
/// 编辑合作伙伴
///
/// 主键 Id
- /// 名称、邮箱、电话、启用状态
+ /// 名称、联系信息、地址、启用状态(字段同新增)
/// 更新后的详情
/// 成功
/// 校验失败或记录不存在
/// 服务器错误
- Task UpdateAsync(string id, PartnerUpdateInputVo input);
+ Task UpdateAsync(Guid id, PartnerUpdateInputVo input);
///
/// 删除合作伙伴(逻辑删除)
@@ -70,7 +83,7 @@ public interface IPartnerAppService : IApplicationService
/// 成功
/// Id 无效或记录不存在
/// 服务器错误
- Task DeleteAsync(string id);
+ Task DeleteAsync(Guid id);
///
/// 按当前列表筛选条件批量导出合作伙伴为 PDF(Account Management「Company」页签;不分页,上限 5000 条)
@@ -78,7 +91,7 @@ public interface IPartnerAppService : IApplicationService
/// 与列表相同的 Keyword、State;分页字段忽略
/// PDF 文件流
///
- /// 筛选条件需与 一致,便于统计与导出数据对齐。
+ /// 筛选条件与数据范围需与 完全一致(含 Token 权限:管理员全部公司,其它角色仅绑定门店所属公司;见 PartnerScopeHelper)。
///
/// 成功返回 application/pdf
/// 参数错误
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IProductAppService.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IProductAppService.cs
index 1ad120a..6b45621 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IProductAppService.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IProductAppService.cs
@@ -14,19 +14,26 @@ public interface IProductAppService : IApplicationService
///
/// 产品分页列表
///
+ ///
+ /// 支持按公司 partnerId、组织 groupId、门店 locationId 筛选:
+ /// 仅返回在 fl_location_product 中关联到匹配门店的产品;三者均未传时不按门店收窄。
+ /// locationId 最优先;传 groupId 时按 Region 对应门店的 Partner+GroupName 匹配。
+ ///
Task> GetListAsync(ProductGetListInputVo input);
///
/// 产品详情
///
- Task GetAsync(string id);
+ /// 产品主键(Guid,与 fl_product.Id 一致;使用 Guid 路由约束,避免与 export-* 等字面路径冲突)
+ Task GetAsync(Guid id);
///
/// 新增产品
///
///
/// 可选;为空时后端生成唯一编码(如 PRD_ + Guid)。
- /// 若 有值,将在同一事务内批量写入 fl_location_product(一门店一条)。
+ /// 若传 (Company)、(Region)
+ /// 和/或 ,合并后写入 fl_location_product。
///
Task CreateAsync(ProductCreateInputVo input);
@@ -34,15 +41,15 @@ public interface IProductAppService : IApplicationService
/// 编辑产品
///
///
- /// 当请求体包含 属性时,按该列表整表替换本产品在各门店的关联;
- /// 不传该属性则不改门店关联(兼容仅改名称/分类等调用)。
+ /// 当请求体包含 、
+ /// 和/或 时,合并后整表替换门店关联;均不传则不改。
///
- Task UpdateAsync(string id, ProductUpdateInputVo input);
+ Task UpdateAsync(Guid id, ProductUpdateInputVo input);
///
/// 删除产品(逻辑删除)
///
- Task DeleteAsync(string id);
+ Task DeleteAsync(Guid id);
///
/// 下载 Product 批量导入模板(服务器 TemplateDirectory 下 xlsx)
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IProductCategoryAppService.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IProductCategoryAppService.cs
index 74f8bee..51b5b6e 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IProductCategoryAppService.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IProductCategoryAppService.cs
@@ -9,12 +9,21 @@ namespace FoodLabeling.Application.Contracts.IServices;
///
public interface IProductCategoryAppService : IApplicationService
{
+ ///
+ /// 类别分页列表;支持 groupId/locationId 筛选;出参含 region、location 展示字段。
+ ///
Task> GetListAsync(ProductCategoryGetListInputVo input);
Task GetAsync(string id);
+ ///
+ /// 新增类别;body 传 regionIds(Region 多选)与 locationIds(门店多选)绑定适用范围。
+ ///
Task CreateAsync(ProductCategoryCreateInputVo input);
+ ///
+ /// 编辑类别;regionIds/locationIds 多选数组规则同新增;传空数组 [] 可清空对应范围。
+ ///
Task UpdateAsync(string id, ProductCategoryUpdateInputVo input);
Task DeleteAsync(string id);
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IUsAppAuthAppService.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IUsAppAuthAppService.cs
index acfdbf1..8a764c2 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IUsAppAuthAppService.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application.Contracts/IServices/IUsAppAuthAppService.cs
@@ -1,5 +1,6 @@
using FoodLabeling.Application.Contracts.Dtos.UsAppAuth;
using Volo.Abp.Application.Services;
+using Yi.Framework.Rbac.Application.Contracts.Dtos.Account;
namespace FoodLabeling.Application.Contracts.IServices;
@@ -48,4 +49,26 @@ public interface IUsAppAuthAppService : IApplicationService
/// 参数非法、未绑定或无权限
/// 服务器错误
Task GetLocationDetailAsync(string locationId);
+
+ ///
+ /// App forgot password: send email verification code (same user store and rules as platform).
+ ///
+ ///
+ /// When RbacOptions.EnableCaptcha is true, pass Uuid and Code from platform captcha API.
+ ///
+ /// Email and optional image captcha.
+ /// Accepted.
+ /// Validation or rate limit.
+ /// Server error
+ Task PostSendForgotPasswordCodeByEmailAsync(EmailCaptchaImageDto input);
+
+ ///
+ /// App forgot password: reset password with email OTP.
+ ///
+ /// Email, OTP, new password.
+ /// Account user name.
+ /// Password updated.
+ /// Invalid code or password policy.
+ /// Server error
+ Task PostResetPasswordByEmailAsync(RetrievePasswordByEmailDto input);
}
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/FoodLabeling.Application.csproj b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/FoodLabeling.Application.csproj
index 713f6ec..dd58d12 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/FoodLabeling.Application.csproj
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/FoodLabeling.Application.csproj
@@ -9,6 +9,7 @@
+
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/AuthSessionAppService.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/AuthSessionAppService.cs
index 7507726..a6e8fc7 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/AuthSessionAppService.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/AuthSessionAppService.cs
@@ -50,6 +50,12 @@ public class AuthSessionAppService : ApplicationService, IAuthSessionAppService
throw new UserFriendlyException("用户不存在");
}
+ var userRoleIds = await _dbContext.SqlSugarClient.Queryable()
+ .Where(x => x.UserId == userId)
+ .Select(x => x.RoleId)
+ .ToListAsync();
+ var distinctUserRoleIds = userRoleIds.Distinct().ToList();
+
List menus;
if (UserConst.Admin.Equals(user.UserName))
{
@@ -60,12 +66,7 @@ public class AuthSessionAppService : ApplicationService, IAuthSessionAppService
}
else
{
- var roleIds = await _dbContext.SqlSugarClient.Queryable()
- .Where(x => x.UserId == userId)
- .Select(x => x.RoleId)
- .ToListAsync();
-
- var roleIdStrs = roleIds.Select(x => x.ToString()).Distinct().ToList();
+ var roleIdStrs = distinctUserRoleIds.Select(x => x.ToString()).Distinct().ToList();
if (roleIdStrs.Count == 0)
{
menus = new List();
@@ -92,10 +93,11 @@ public class AuthSessionAppService : ApplicationService, IAuthSessionAppService
.ThenBy(x => x.MenuName)
.ToList();
- // 注意:查询 RoleAggregateRoot 会触发 YiRbacDbContext 的 IDataPermission 过滤,
+ // 注意:经仓储查询 RoleAggregateRoot 会触发 YiRbacDbContext 的 IDataPermission 过滤,
// 其表达式包含 roleInfo.Select(...).Contains(...),在当前 SqlSugar 版本下会报“不支持 Select”。
- // 这里直接使用 JWT 中的角色码(CurrentUser.Roles)返回,避免触发过滤器。
+ // 角色展示名使用 RoleDbEntity 直查 Role 表;角色编码列表仍用 JWT(CurrentUser.Roles),与原先 RoleCodes 行为一致。
var roleCodes = CurrentUser.Roles?.ToList() ?? new List();
+ var roleDisplay = await BuildRoleDisplayAsync(distinctUserRoleIds, roleCodes);
var permissionCodes = menuNodes
.Where(x => !string.IsNullOrWhiteSpace(x.PermissionCode))
@@ -116,7 +118,10 @@ public class AuthSessionAppService : ApplicationService, IAuthSessionAppService
},
RoleCodes = roleCodes.Where(x => !string.IsNullOrWhiteSpace(x)).Select(x => x.Trim()).Distinct().OrderBy(x => x).ToList(),
PermissionCodes = permissionCodes,
- Menus = BuildMenuTree(menuNodes)
+ Menus = BuildMenuTree(menuNodes),
+ LastUpdated = user.LastModificationTime,
+ Role = roleDisplay,
+ FullName = BuildFullName(user)
};
}
@@ -133,6 +138,67 @@ public class AuthSessionAppService : ApplicationService, IAuthSessionAppService
return true;
}
+ private static string BuildFullName(UserAggregateRoot user)
+ {
+ if (!string.IsNullOrWhiteSpace(user.Name))
+ {
+ return user.Name.Trim();
+ }
+
+ if (!string.IsNullOrWhiteSpace(user.Nick))
+ {
+ return user.Nick.Trim();
+ }
+
+ return user.UserName ?? string.Empty;
+ }
+
+ private async Task BuildRoleDisplayAsync(
+ IReadOnlyList userRoleIds,
+ IReadOnlyList jwtRoleCodes)
+ {
+ var names = new List();
+ if (userRoleIds.Count > 0)
+ {
+ names = await _dbContext.SqlSugarClient.Queryable()
+ .Where(r => !r.IsDeleted && userRoleIds.Contains(r.Id))
+ .OrderBy(r => r.RoleName)
+ .Select(r => r.RoleName)
+ .ToListAsync();
+ }
+
+ if (names.Count == 0 && jwtRoleCodes.Count > 0)
+ {
+ var codes = jwtRoleCodes
+ .Where(x => !string.IsNullOrWhiteSpace(x))
+ .Select(x => x.Trim())
+ .Distinct()
+ .ToList();
+ names = await _dbContext.SqlSugarClient.Queryable()
+ .Where(r => !r.IsDeleted && codes.Contains(r.RoleCode))
+ .OrderBy(r => r.RoleName)
+ .Select(r => r.RoleName)
+ .ToListAsync();
+ }
+
+ var distinctNames = names
+ .Where(n => !string.IsNullOrWhiteSpace(n))
+ .Select(n => n.Trim())
+ .Distinct()
+ .ToList();
+ if (distinctNames.Count > 0)
+ {
+ return string.Join(", ", distinctNames);
+ }
+
+ var fallbackCodes = jwtRoleCodes
+ .Where(x => !string.IsNullOrWhiteSpace(x))
+ .Select(x => x.Trim())
+ .Distinct()
+ .ToList();
+ return fallbackCodes.Count > 0 ? string.Join(", ", fallbackCodes) : string.Empty;
+ }
+
private static List BuildMenuTree(List flat)
{
var nodes = flat
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/DbModels/FlPartnerDbEntity.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/DbModels/FlPartnerDbEntity.cs
index 606d2c6..11e0b00 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/DbModels/FlPartnerDbEntity.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/DbModels/FlPartnerDbEntity.cs
@@ -36,6 +36,21 @@ public class FlPartnerDbEntity
///
public string? PhoneNumber { get; set; }
+ public string? Street { get; set; }
+
+ public string? City { get; set; }
+
+ ///
+ /// 州/省代码(如 NY);勿与启用状态字段 混淆
+ ///
+ [SugarColumn(ColumnName = "StateCode")]
+ public string? StateCode { get; set; }
+
+ public string? Country { get; set; }
+
+ [SugarColumn(ColumnName = "ZipCode")]
+ public string? ZipCode { get; set; }
+
///
/// 是否启用(对应 UI Active)
///
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/GroupAppService.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/GroupAppService.cs
index ed77a1f..b740889 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/GroupAppService.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/GroupAppService.cs
@@ -36,13 +36,13 @@ public class GroupAppService : ApplicationService, IGroupAppService
public async Task> GetListAsync(GroupGetListInputVo input)
{
RefAsync total = 0;
- var query = BuildGroupJoinedQuery(input);
+ var query = await BuildGroupJoinedQueryAsync(input);
var projected = query.Select((g, p) => new GroupGetListOutputDto
{
Id = g.Id,
GroupName = g.GroupName,
PartnerId = g.PartnerId,
- PartnerName = string.IsNullOrWhiteSpace(p.PartnerName) ? "无" : p.PartnerName.Trim(),
+ PartnerName = string.IsNullOrWhiteSpace(p.PartnerName) ? "None" : p.PartnerName.Trim(),
State = g.State,
CreationTime = g.CreationTime
});
@@ -52,19 +52,19 @@ public class GroupAppService : ApplicationService, IGroupAppService
}
///
- public async Task GetAsync(string id)
+ public async Task GetAsync(Guid id)
{
- var groupId = id?.Trim();
- if (string.IsNullOrWhiteSpace(groupId))
+ if (id == Guid.Empty)
{
- throw new UserFriendlyException("组织Id不能为空");
+ throw new UserFriendlyException("Group id is required.");
}
+ var groupId = id.ToString();
var entity = await _dbContext.SqlSugarClient.Queryable()
.FirstAsync(x => !x.IsDeleted && x.Id == groupId);
if (entity is null)
{
- throw new UserFriendlyException("组织不存在");
+ throw new UserFriendlyException("Group not found.");
}
var partnerName = await ResolvePartnerNameAsync(entity.PartnerId);
@@ -78,13 +78,13 @@ public class GroupAppService : ApplicationService, IGroupAppService
var name = input.GroupName?.Trim();
if (string.IsNullOrWhiteSpace(name))
{
- throw new UserFriendlyException("组织名称不能为空");
+ throw new UserFriendlyException("Region name is required.");
}
var partnerId = input.PartnerId?.Trim();
if (string.IsNullOrWhiteSpace(partnerId))
{
- throw new UserFriendlyException("请选择所属合作伙伴");
+ throw new UserFriendlyException("Parent company is required.");
}
await EnsurePartnerExistsAsync(partnerId);
@@ -104,36 +104,36 @@ public class GroupAppService : ApplicationService, IGroupAppService
};
await _dbContext.SqlSugarClient.Insertable(entity).ExecuteCommandAsync();
- return await GetAsync(entity.Id);
+ return await GetAsync(Guid.Parse(entity.Id));
}
///
[UnitOfWork]
- public async Task UpdateAsync(string id, GroupUpdateInputVo input)
+ public async Task UpdateAsync(Guid id, GroupUpdateInputVo input)
{
- var groupId = id?.Trim();
- if (string.IsNullOrWhiteSpace(groupId))
+ if (id == Guid.Empty)
{
- throw new UserFriendlyException("组织Id不能为空");
+ throw new UserFriendlyException("Group id is required.");
}
+ var groupId = id.ToString();
var entity = await _dbContext.SqlSugarClient.Queryable()
.FirstAsync(x => !x.IsDeleted && x.Id == groupId);
if (entity is null)
{
- throw new UserFriendlyException("组织不存在");
+ throw new UserFriendlyException("Group not found.");
}
var name = input.GroupName?.Trim();
if (string.IsNullOrWhiteSpace(name))
{
- throw new UserFriendlyException("组织名称不能为空");
+ throw new UserFriendlyException("Region name is required.");
}
var partnerId = input.PartnerId?.Trim();
if (string.IsNullOrWhiteSpace(partnerId))
{
- throw new UserFriendlyException("请选择所属合作伙伴");
+ throw new UserFriendlyException("Parent company is required.");
}
await EnsurePartnerExistsAsync(partnerId);
@@ -145,24 +145,24 @@ public class GroupAppService : ApplicationService, IGroupAppService
entity.LastModifierId = CurrentUser?.Id?.ToString();
await _dbContext.SqlSugarClient.Updateable(entity).ExecuteCommandAsync();
- return await GetAsync(groupId);
+ return await GetAsync(id);
}
///
[UnitOfWork]
- public async Task DeleteAsync(string id)
+ public async Task DeleteAsync(Guid id)
{
- var groupId = id?.Trim();
- if (string.IsNullOrWhiteSpace(groupId))
+ if (id == Guid.Empty)
{
- throw new UserFriendlyException("组织Id不能为空");
+ throw new UserFriendlyException("Group id is required.");
}
+ var groupId = id.ToString();
var entity = await _dbContext.SqlSugarClient.Queryable()
.FirstAsync(x => !x.IsDeleted && x.Id == groupId);
if (entity is null)
{
- throw new UserFriendlyException("组织不存在");
+ throw new UserFriendlyException("Group not found.");
}
entity.IsDeleted = true;
@@ -172,24 +172,26 @@ public class GroupAppService : ApplicationService, IGroupAppService
}
///
- public async Task ExportPdfAsync(GroupGetListInputVo input)
+ [HttpGet]
+ public async Task ExportPdfAsync([FromQuery] GroupGetListInputVo input)
{
QuestPDF.Settings.License = LicenseType.Community;
- var exportBase = BuildGroupJoinedQuery(input);
+ var exportBase = await BuildGroupJoinedQueryAsync(input);
var count = await exportBase.CountAsync();
if (count > ExportPdfMaxRows)
{
- throw new UserFriendlyException($"导出数据超过上限 {ExportPdfMaxRows} 条,请缩小筛选范围");
+ throw new UserFriendlyException(
+ $"Export exceeds the maximum of {ExportPdfMaxRows} rows. Narrow your filters and try again.");
}
- var rows = await BuildGroupJoinedQuery(input)
+ var rows = await (await BuildGroupJoinedQueryAsync(input))
.Select((g, p) => new GroupGetListOutputDto
{
Id = g.Id,
GroupName = g.GroupName,
PartnerId = g.PartnerId,
- PartnerName = string.IsNullOrWhiteSpace(p.PartnerName) ? "无" : p.PartnerName.Trim(),
+ PartnerName = string.IsNullOrWhiteSpace(p.PartnerName) ? "None" : p.PartnerName.Trim(),
State = g.State,
CreationTime = g.CreationTime
})
@@ -228,7 +230,7 @@ public class GroupAppService : ApplicationService, IGroupAppService
table.Cell().BorderBottom(0.5f).BorderColor(Colors.Grey.Lighten2).Padding(5)
.Text(e.GroupName ?? string.Empty);
table.Cell().BorderBottom(0.5f).BorderColor(Colors.Grey.Lighten2).Padding(5)
- .Text(string.IsNullOrWhiteSpace(e.PartnerName) ? "无" : e.PartnerName);
+ .Text(string.IsNullOrWhiteSpace(e.PartnerName) ? "None" : e.PartnerName);
table.Cell().BorderBottom(0.5f).BorderColor(Colors.Grey.Lighten2).Padding(5).Text(status);
table.Cell().BorderBottom(0.5f).BorderColor(Colors.Grey.Lighten2).Padding(5)
.Text(e.CreationTime.ToString("yyyy-MM-dd HH:mm"));
@@ -243,14 +245,21 @@ public class GroupAppService : ApplicationService, IGroupAppService
return new FileStreamResult(stream, "application/pdf") { FileDownloadName = fileName };
}
- private ISugarQueryable BuildGroupJoinedQuery(GroupGetListInputVo input)
+ private async Task> BuildGroupJoinedQueryAsync(
+ GroupGetListInputVo input)
{
+ var scope = await PartnerScopeHelper.ResolveGroupScopeAsync(CurrentUser, _dbContext);
+
var keyword = input.Keyword?.Trim();
var partnerId = input.PartnerId?.Trim();
var query = _dbContext.SqlSugarClient.Queryable()
.LeftJoin((g, p) => g.PartnerId == p.Id && !p.IsDeleted)
- .Where((g, p) => !g.IsDeleted)
+ .Where((g, p) => !g.IsDeleted);
+
+ query = PartnerScopeHelper.ApplyGroupScope(query, scope);
+
+ query = query
.WhereIF(input.State != null, (g, p) => g.State == input.State)
.WhereIF(!string.IsNullOrWhiteSpace(partnerId), (g, p) => g.PartnerId == partnerId)
.WhereIF(!string.IsNullOrWhiteSpace(keyword),
@@ -311,7 +320,7 @@ public class GroupAppService : ApplicationService, IGroupAppService
.AnyAsync(x => !x.IsDeleted && x.Id == partnerId);
if (!ok)
{
- throw new UserFriendlyException("所选合作伙伴不存在或已删除");
+ throw new UserFriendlyException("The selected company does not exist or has been removed.");
}
}
@@ -321,7 +330,7 @@ public class GroupAppService : ApplicationService, IGroupAppService
.FirstAsync(x => !x.IsDeleted && x.Id == partnerId);
if (p is null || string.IsNullOrWhiteSpace(p.PartnerName))
{
- return "无";
+ return "None";
}
return p.PartnerName.Trim();
diff --git a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/LabelAppService.cs b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/LabelAppService.cs
index 64fbea7..f62a369 100644
--- a/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/LabelAppService.cs
+++ b/美国版/Food Labeling Management Code/Yi.Abp.Net8/module/food-labeling-us/FoodLabeling.Application/Services/LabelAppService.cs
@@ -34,6 +34,7 @@ public class LabelAppService : ApplicationService, ILabelAppService
RefAsync total = 0;
var productId = input.ProductId?.Trim();
+ var groupId = input.GroupId?.Trim();
var locationId = input.LocationId?.Trim();
var keyword = input.Keyword?.Trim();
var labelCategoryId = input.LabelCategoryId?.Trim();
@@ -45,7 +46,6 @@ public class LabelAppService : ApplicationService, ILabelAppService
var labelIdsQuery = _dbContext.SqlSugarClient.Queryable()
.Where(l => !l.IsDeleted)
- .WhereIF(!string.IsNullOrWhiteSpace(locationId), l => l.LocationId == locationId)
.WhereIF(!string.IsNullOrWhiteSpace(labelCategoryId), l => l.LabelCategoryId == labelCategoryId)
.WhereIF(!string.IsNullOrWhiteSpace(labelTypeId), l => l.LabelTypeId == labelTypeId)
.WhereIF(input.State != null, l => l.State == input.State);
@@ -58,6 +58,15 @@ public class LabelAppService : ApplicationService, ILabelAppService
.Select((l, tpl) => l);
}
+ var scopedLocationIds = await LocationScopeBindingHelper.ResolveScopedLocationIdsAsync(
+ _dbContext.SqlSugarClient, groupId, locationId);
+ if (scopedLocationIds is not null)
+ {
+ labelIdsQuery = scopedLocationIds.Count == 0
+ ? labelIdsQuery.Where(_ => false)
+ : labelIdsQuery.Where(l => scopedLocationIds.Contains(l.LocationId));
+ }
+
// 按产品筛选:存在 label-product 关联即可
if (!string.IsNullOrWhiteSpace(productId))
{
@@ -259,12 +268,25 @@ public class LabelAppService : ApplicationService, ILabelAppService
labelInfo = JsonSerializer.Deserialize