云端数据 增加违规检测日志
This commit is contained in:
1 parent
1fa91a9cfb
commit
207696d417
7 files changed
+173
-10
No files matched your search
@@ -2,6 +2,7 @@ namespace Store.Modules.CloudProduct.Dtos;
|
||||
|
||||
public class ViolationReasonDto
|
||||
{
|
||||
public uint Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public bool IsViolation { get; set; }
|
||||
}
|
||||
@@ -24,6 +25,8 @@ public class GoodsViolationStatus
|
||||
{
|
||||
public long GoodsId { get; set; }
|
||||
public bool IsViolation { get; set; }
|
||||
/// <summary>当前商品命中的违规原因,供客户端记录实际处理动作。</summary>
|
||||
public int[] ReasonIds { get; set; } = [];
|
||||
}
|
||||
|
||||
public class RemoveGoodsViolationsResult
|
||||
@@ -34,3 +37,30 @@ public class RemoveGoodsViolationsResult
|
||||
/// <summary>商品不存在、已删除或恢复期间再次被上报违规的编号。</summary>
|
||||
public long[] SkippedGoodsIds { get; set; } = [];
|
||||
}
|
||||
|
||||
/// <summary>日志记录的实际业务动作,与商品违规原因分别保存。</summary>
|
||||
public enum ViolationLogAction
|
||||
{
|
||||
Report = 1,
|
||||
AutoListingExcluded = 2,
|
||||
AutoOffShelf = 3
|
||||
}
|
||||
|
||||
/// <summary>客户端在店铺动作完成后提交一条日志。</summary>
|
||||
public sealed class RecordViolationLogRequest
|
||||
{
|
||||
public string ShopId { get; set; } = string.Empty;
|
||||
public long GoodsId { get; set; }
|
||||
/// <summary>违规类型在 violation_reason 中的编号。</summary>
|
||||
public int ReasonId { get; set; }
|
||||
public ViolationLogAction Action { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>按商铺编号查询违规日志;翻页时传入上一页最后一条日志的编号。</summary>
|
||||
public sealed class GetViolationLogsRequest
|
||||
{
|
||||
public string[] ShopIds { get; set; } = [];
|
||||
public long? GoodsId { get; set; }
|
||||
public long BeforeId { get; set; }
|
||||
public int Size { get; set; } = 50;
|
||||
}
|
||||
Reference in new issue
Block a user