diff --git a/db.sql b/db.sql
index c158ea8..f0eaa9b 100644
--- a/db.sql
+++ b/db.sql
@@ -413,6 +413,7 @@ CREATE TABLE `t_sales_product` (
`WeightRoundingId` INT NULL COMMENT '计重进位ID',
`ProductDescription` TEXT COMMENT '产品描述',
`PreStorageScript` TEXT COMMENT '入库前脚本',
+ `CustomerGuideMarkdown` MEDIUMTEXT COMMENT '对客说明 Markdown',
`IsActive` TINYINT NOT NULL DEFAULT 1 COMMENT '是否启用',
`Scheme` VARCHAR(32) NOT NULL COMMENT '排货方案:costLowest/timeFastest/overallBest',
`IsDeleted` TINYINT NOT NULL DEFAULT 0 COMMENT '软删除:0-否,1-是',
@@ -871,7 +872,7 @@ CREATE TABLE `t_customer` (
`UpdateUserId` INT NULL COMMENT '更新人',
`UpdateTime` DATETIME NULL COMMENT '更新时间',
`Salesman` VARCHAR(32) NULL COMMENT '所属销售员账号',
- `CustomerService` VARCHAR(32) NULL COMMENT '所属客服账号',
+ `CustomerService` VARCHAR(32) NULL COMMENT '所属顾问',
`CustomerGroup` TINYINT NULL COMMENT '客户分组:0-普通客户,1-VIP1,2-VIP2,3-VIP3,4-VIP4,5-VIP5',
`LastLoginIp` VARCHAR(64) NULL COMMENT '最后在线IP',
`LastLoginTime` DATETIME NULL COMMENT '最后在线时间',
diff --git a/sql/migrate_t_sales_product_customer_guide.sql b/sql/migrate_t_sales_product_customer_guide.sql
new file mode 100644
index 0000000..ef13cb9
--- /dev/null
+++ b/sql/migrate_t_sales_product_customer_guide.sql
@@ -0,0 +1,4 @@
+-- 销售产品表增加对客说明 Markdown 字段
+
+ALTER TABLE `t_sales_product`
+ ADD COLUMN `CustomerGuideMarkdown` MEDIUMTEXT NULL COMMENT '对客说明 Markdown' AFTER `PreStorageScript`;
diff --git a/src/Oms.Application/Dtos/Channels/SalesProductCustomerGuideSaveInput.cs b/src/Oms.Application/Dtos/Channels/SalesProductCustomerGuideSaveInput.cs
new file mode 100644
index 0000000..ff6b5c2
--- /dev/null
+++ b/src/Oms.Application/Dtos/Channels/SalesProductCustomerGuideSaveInput.cs
@@ -0,0 +1,17 @@
+namespace Oms.Application.Dtos.Channels;
+
+///
+/// 销售产品对客说明保存入参。
+///
+public class SalesProductCustomerGuideSaveInput
+{
+ ///
+ /// 销售产品主键。
+ ///
+ public int SalesProductId { get; set; }
+
+ ///
+ /// 对客说明 Markdown 正文。
+ ///
+ public string? CustomerGuideMarkdown { get; set; }
+}
diff --git a/src/Oms.Application/Dtos/Channels/SalesProductDetailOutput.cs b/src/Oms.Application/Dtos/Channels/SalesProductDetailOutput.cs
index 405ef07..3bbedf3 100644
--- a/src/Oms.Application/Dtos/Channels/SalesProductDetailOutput.cs
+++ b/src/Oms.Application/Dtos/Channels/SalesProductDetailOutput.cs
@@ -75,6 +75,11 @@ public class SalesProductDetailOutput
///
public string? PreStorageScript { get; set; }
+ ///
+ /// 对客说明 Markdown。
+ ///
+ public string? CustomerGuideMarkdown { get; set; }
+
///
/// 是否启用。
///
diff --git a/src/Oms.Application/Dtos/Channels/SalesProductSaveInput.cs b/src/Oms.Application/Dtos/Channels/SalesProductSaveInput.cs
index 6e7379a..9ce59ed 100644
--- a/src/Oms.Application/Dtos/Channels/SalesProductSaveInput.cs
+++ b/src/Oms.Application/Dtos/Channels/SalesProductSaveInput.cs
@@ -77,6 +77,11 @@ public class SalesProductSaveInput
///
public string? PreStorageScript { get; set; }
+ ///
+ /// 对客说明 Markdown。
+ ///
+ public string? CustomerGuideMarkdown { get; set; }
+
///
/// 是否启用。
///
diff --git a/src/Oms.Application/Dtos/Customers/CreateCustomerInput.cs b/src/Oms.Application/Dtos/Customers/CreateCustomerInput.cs
index e1a76b4..3edfcf0 100644
--- a/src/Oms.Application/Dtos/Customers/CreateCustomerInput.cs
+++ b/src/Oms.Application/Dtos/Customers/CreateCustomerInput.cs
@@ -91,7 +91,7 @@ public class CreateCustomerInput
public string? Salesman { get; set; }
///
- /// 客服人员。
+ /// 所属顾问。
///
[StringLength(32)]
public string? CustomerService { get; set; }
diff --git a/src/Oms.Application/Dtos/Customers/CustomerOutput.cs b/src/Oms.Application/Dtos/Customers/CustomerOutput.cs
index 00f3e81..d5aeb14 100644
--- a/src/Oms.Application/Dtos/Customers/CustomerOutput.cs
+++ b/src/Oms.Application/Dtos/Customers/CustomerOutput.cs
@@ -83,7 +83,7 @@ public class CustomerOutput
public string? Salesman { get; set; }
///
- /// 客服人员。
+ /// 所属顾问。
///
public string? CustomerService { get; set; }
diff --git a/src/Oms.Application/Dtos/Customers/CustomerPaginatedInput.cs b/src/Oms.Application/Dtos/Customers/CustomerPaginatedInput.cs
index 938c1b8..c361d92 100644
--- a/src/Oms.Application/Dtos/Customers/CustomerPaginatedInput.cs
+++ b/src/Oms.Application/Dtos/Customers/CustomerPaginatedInput.cs
@@ -38,7 +38,7 @@ public class CustomerPaginatedInput
public string? Salesman { get; set; }
///
- /// 客服人员。
+ /// 所属顾问筛选。
///
public string? CustomerService { get; set; }
}
diff --git a/src/Oms.Application/Dtos/Customers/CustomerPaginatedOutput.cs b/src/Oms.Application/Dtos/Customers/CustomerPaginatedOutput.cs
index cdcceb3..99ca38c 100644
--- a/src/Oms.Application/Dtos/Customers/CustomerPaginatedOutput.cs
+++ b/src/Oms.Application/Dtos/Customers/CustomerPaginatedOutput.cs
@@ -83,7 +83,7 @@ public class CustomerPaginatedOutput
public string? Salesman { get; set; }
///
- /// 客服人员。
+ /// 所属顾问。
///
public string? CustomerService { get; set; }
diff --git a/src/Oms.Application/Dtos/Customers/CustomerServiceAdvisorOutput.cs b/src/Oms.Application/Dtos/Customers/CustomerServiceAdvisorOutput.cs
index e3a95fc..d73be89 100644
--- a/src/Oms.Application/Dtos/Customers/CustomerServiceAdvisorOutput.cs
+++ b/src/Oms.Application/Dtos/Customers/CustomerServiceAdvisorOutput.cs
@@ -1,7 +1,7 @@
namespace Oms.Application.Dtos.Customers;
///
-/// 当前客户所属客服(专属顾问)展示信息。
+/// 当前客户所属顾问展示信息。
///
public class CustomerServiceAdvisorOutput
{
diff --git a/src/Oms.Application/Dtos/Customers/UpdateCustomerInput.cs b/src/Oms.Application/Dtos/Customers/UpdateCustomerInput.cs
index 272f1f3..eeb57c8 100644
--- a/src/Oms.Application/Dtos/Customers/UpdateCustomerInput.cs
+++ b/src/Oms.Application/Dtos/Customers/UpdateCustomerInput.cs
@@ -90,7 +90,7 @@ public class UpdateCustomerInput
public string? Salesman { get; set; }
///
- /// 客服人员。
+ /// 所属顾问。
///
[StringLength(32)]
public string? CustomerService { get; set; }
diff --git a/src/Oms.Application/Services/Channels/SalesProductService.Helpers.cs b/src/Oms.Application/Services/Channels/SalesProductService.Helpers.cs
index 272c38f..9d1a61e 100644
--- a/src/Oms.Application/Services/Channels/SalesProductService.Helpers.cs
+++ b/src/Oms.Application/Services/Channels/SalesProductService.Helpers.cs
@@ -214,6 +214,7 @@ public partial class SalesProductService
WeightRoundingId = product.WeightRoundingId,
ProductDescription = product.ProductDescription,
PreStorageScript = product.PreStorageScript,
+ CustomerGuideMarkdown = product.CustomerGuideMarkdown,
IsActive = product.IsActive,
Scheme = product.Scheme
};
@@ -317,6 +318,7 @@ public partial class SalesProductService
entity.WeightRoundingId = input.WeightRoundingId;
entity.ProductDescription = input.ProductDescription;
entity.PreStorageScript = input.PreStorageScript;
+ entity.CustomerGuideMarkdown = input.CustomerGuideMarkdown;
entity.IsActive = input.IsActive;
entity.Scheme = string.IsNullOrWhiteSpace(input.Scheme) ? AllocationSchemeCodes.CostLowest : input.Scheme;
}
@@ -365,6 +367,7 @@ public partial class SalesProductService
WeightRoundingId = entity.WeightRoundingId,
ProductDescription = entity.ProductDescription,
PreStorageScript = entity.PreStorageScript,
+ CustomerGuideMarkdown = entity.CustomerGuideMarkdown,
IsActive = (byte)entity.IsActive,
Scheme = entity.Scheme,
CreateTime = entity.CreateTime,
diff --git a/src/Oms.Application/Services/Channels/SalesProductService.cs b/src/Oms.Application/Services/Channels/SalesProductService.cs
index ec96d94..e9e06bd 100644
--- a/src/Oms.Application/Services/Channels/SalesProductService.cs
+++ b/src/Oms.Application/Services/Channels/SalesProductService.cs
@@ -121,6 +121,19 @@ public partial class SalesProductService : ApplicationService
await SalesProductRepository.UpdateAsync(entity);
}
+ ///
+ /// 保存销售产品对客说明。
+ ///
+ /// 入参:对客说明 Markdown。
+ /// 无返回体,仅完成保存对客说明。
+ [HttpPost("/channel/sales-product/customer-guide/save")]
+ public async Task SaveCustomerGuideAsync(SalesProductCustomerGuideSaveInput input)
+ {
+ var entity = await GetProductOrThrowAsync(input.SalesProductId);
+ entity.CustomerGuideMarkdown = input.CustomerGuideMarkdown;
+ await SalesProductRepository.UpdateAsync(entity);
+ }
+
///
/// 查询销售产品价格项列表。
///
diff --git a/src/Oms.Application/Services/Customers/CustomerService.cs b/src/Oms.Application/Services/Customers/CustomerService.cs
index c723477..a4c8cb3 100644
--- a/src/Oms.Application/Services/Customers/CustomerService.cs
+++ b/src/Oms.Application/Services/Customers/CustomerService.cs
@@ -95,7 +95,7 @@ public class CustomerService : ApplicationService
}
///
- /// 查询当前登录客户所属客服(专属顾问)信息。
+ /// 查询当前登录客户所属顾问信息。
///
/// 专属顾问姓名、微信号、微信二维码。
[HttpGet("/customer/service-advisor")]
diff --git a/src/Oms.Domain/ChannelsAggregate/Entities/SalesProduct.cs b/src/Oms.Domain/ChannelsAggregate/Entities/SalesProduct.cs
index 51f627c..62d034b 100644
--- a/src/Oms.Domain/ChannelsAggregate/Entities/SalesProduct.cs
+++ b/src/Oms.Domain/ChannelsAggregate/Entities/SalesProduct.cs
@@ -33,6 +33,8 @@ public class SalesProduct : OmsAuditedAggregateRoot
public string? PreStorageScript { get; set; }
+ public string? CustomerGuideMarkdown { get; set; }
+
public EnableStatus IsActive { get; set; }
public string Scheme { get; set; } = string.Empty;