Files
glz badf68a8f8 feat: 新增宠物封面图支持,优化补偿任务查询与宠物模板创建流程
1.  新增PetSkinImageTypeEnum.Cover枚举,添加封面图类型支持
2.  为PetSkin、PetTemplate实体添加封面图片地址字段
3.  新增补偿任务按用户ID筛选功能,优化UsersService查询逻辑
4.  重构宠物模板创建流程,支持批量创建进化链与图片
5.  移除PetEvolution实体的基础属性字段,简化进化形态结构
6.  新增OSS域名辅助工具与SDK注册扩展类
7.  优化宠物皮肤、进化阶段的DTO与服务层逻辑
2026-06-09 16:15:22 +08:00

129 lines
3.5 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using QYZH.InteractiveMagazine.Models.Enum;
namespace QYZH.InteractiveMagazine.Models.Dto.Compensation;
/// <summary>
/// 创建补偿任务输入
/// </summary>
public class CreateCompensationTaskInput
{
/// <summary>
/// 任务类型(使用 CompensationTaskTypeEnum 枚举)
/// </summary>
public CompensationTaskTypeEnum TaskType { get; set; }
/// <summary>
/// 业务来源(如 CheckIn、Purchase
/// </summary>
public string BusinessSource { get; set; } = string.Empty;
/// <summary>
/// 关联业务记录Id
/// </summary>
public string? BusinessId { get; set; }
/// <summary>
/// 关联用户Id
/// </summary>
public long UserId { get; set; }
/// <summary>
/// 处理参数匿名对象或字典会自动序列化为JSON
/// </summary>
public object Payload { get; set; } = new { };
/// <summary>
/// 异常消息
/// </summary>
public string ErrorMessage { get; set; } = string.Empty;
/// <summary>
/// 异常来源(类名.方法名,如 CheckInService.CheckInAsync
/// </summary>
public string ErrorSource { get; set; } = string.Empty;
/// <summary>
/// 最大重试次数默认3次
/// </summary>
public int MaxRetries { get; set; } = 3;
}
/// <summary>
/// 补偿任务输出
/// </summary>
public class CompensationTaskOutput
{
public long Id { get; set; }
public CompensationTaskTypeEnum TaskType { get; set; }
public string BusinessSource { get; set; } = string.Empty;
public string? BusinessId { get; set; }
public long UserId { get; set; }
public string Payload { get; set; } = string.Empty;
public string ErrorMessage { get; set; } = string.Empty;
public string ErrorSource { get; set; } = string.Empty;
public int RetryCount { get; set; }
public int MaxRetries { get; set; }
public CompensationTaskStatusEnum Status { get; set; }
public DateTime? ProcessedAt { get; set; }
public DateTime? ScheduledAt { get; set; }
public string? ResultMessage { get; set; }
public DateTime CreatedAt { get; set; }
}
/// <summary>
/// 查询补偿任务输入(供外部项目按条件拉取)
/// </summary>
public class GetCompensationTasksInput
{
/// <summary>
/// 按用户Id筛选
/// </summary>
public long? UserId { get; set; }
/// <summary>
/// 按状态筛选
/// </summary>
public CompensationTaskStatusEnum? Status { get; set; }
/// <summary>
/// 按任务类型筛选
/// </summary>
public CompensationTaskTypeEnum? TaskType { get; set; }
/// <summary>
/// 按业务来源筛选
/// </summary>
public string? BusinessSource { get; set; }
/// <summary>
/// 获取数量上限默认50
/// </summary>
public int Limit { get; set; } = 50;
}
/// <summary>
/// 更新补偿任务状态输入(供外部处理项目回调)
/// </summary>
public class UpdateCompensationStatusInput
{
/// <summary>
/// 目标状态(使用 CompensationTaskStatusEnum 枚举)
/// </summary>
public CompensationTaskStatusEnum Status { get; set; }
/// <summary>
/// 处理结果描述
/// </summary>
public string? ResultMessage { get; set; }
/// <summary>
/// 更新重试次数(可选)
/// </summary>
public int? RetryCount { get; set; }
/// <summary>
/// 下次计划执行时间(用于退避重试,可选)
/// </summary>
public DateTime? ScheduledAt { get; set; }
}