This commit is contained in:
chfei committed 2026-09-18 18:57:24 +08:00
1 parent f2caec6083
commit 75d0e85218
16 files changed
+316 -320

No files matched your search

+8 -2
View File
@@ -7,8 +7,14 @@ namespace Store.Modules.CloudProduct.Dtos
/// </summary>
public class GoodsImportItem
{
public ProductEntity ProductEntity { get; set; } = null!;
/// <summary>
/// 解析后的商品模型
/// </summary>
public GoodsEntity Goods { get; set; } = null!;
/// <summary>
/// 原始数据(JSON 原文,压缩后落盘)
/// </summary>
public string RawData { get; set; } = string.Empty;
}
}
}
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Store.Modules.CloudProduct.Dtos
{
@@ -12,17 +10,17 @@ namespace Store.Modules.CloudProduct.Dtos
/// <summary>
/// 成功条数
/// </summary>
public int Success { get; set; }
public int SuccessCount { get; set; }
/// <summary>
/// 失败条数
/// </summary>
public int Failed { get; set; }
public int FailedCount { get; set; }
/// <summary>
/// 总条数
/// </summary>
public int Total => Success + Failed;
public int Total => SuccessCount + FailedCount;
/// <summary>
/// 错误明细
@@ -1,14 +1,11 @@
using OpenSearch.Client;
using System;
using System.Collections.Generic;
using System.Text;
using OpenSearch.Client;
namespace Store.Modules.CloudProduct.Dtos
{
/// <summary>
/// 商品搜索模型:Id 为主键,Title 用于分词搜索
/// 商品搜索文档:OpenSearch 索引中的商品模型,Id 为主键,Title 用于分词搜索
/// </summary>
public class ProductSearchInfo
public class GoodsSearchDocument
{
[Number(NumberType.Byte, Name = "platform")]
public byte Platform { get; set; }
@@ -18,6 +15,7 @@ namespace Store.Modules.CloudProduct.Dtos
[Text(Name = "title", Analyzer = "ik_max_word", SearchAnalyzer = "ik_smart")]
public string Title { get; set; } = string.Empty;
[Text(Name = "thumbUrl")]
public string? ThumbUrl { get; set; } = string.Empty;
@@ -47,14 +45,4 @@ namespace Store.Modules.CloudProduct.Dtos
public override string ToString() => $"[Id={Id}] Title={Title} Cat=({CatId1},{CatId2},{CatId3},{CatId4}) Price={MinPrice} Sold={SoldQuantity}";
}
/// <summary>
/// 搜索排序方式
/// </summary>
public enum GoodsSearchSortBy
{
Relevance = 0, // 相关性(默认)
PriceAsc = 1, // 价格从低到高
PriceDesc = 2, // 价格从高到低
SoldDesc = 3, // 销量从高到低
}
}
@@ -1,13 +1,9 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Store.Modules.CloudProduct.Dtos
{
/// <summary>
/// 商品搜索请求
/// </summary>
public class ProductSearchRequest
public class GoodsSearchRequest
{
/// <summary>
/// 标题(模糊搜索)
@@ -59,7 +55,6 @@ namespace Store.Modules.CloudProduct.Dtos
/// </summary>
public byte? Platform { get; set; }
/// <summary>
/// 页码(默认1)
/// </summary>