Files
QYZH.InteractiveMagazine/QYZH.InteractiveMagazine.IService/IPetService.cs
glz 903ccd3073 feat: 新增签到、宠物、期刊绑定、补偿任务等业务模块,优化微信登录流程
本次提交完成了多个核心业务模块的开发与优化:
1.  宠物模块:新增宠物实体、服务接口与实现,支持创建默认宠物、激活、喂养、进化以及喂养记录查询
2.  签到模块:新增签到实体、服务接口、控制器以及相关DTO,支持用户签到和签到信息查询,新增成长值奖励字段
3.  期刊绑定模块:新增用户期刊关联实体、服务接口与控制器,支持扫码绑定期刊、解绑和查询绑定列表
4.  补偿任务模块:新增补偿任务实体、服务接口与实现,用于处理业务失败后的异步重试补偿
5.  优化微信登录流程:拆分登录与快捷登录接口,支持手机号获取,新增首次登录自动创建默认宠物逻辑
6.  调整基础路由与实体状态:修改微信控制器路由前缀,更新宠物状态枚举与默认值
2026-06-04 15:54:30 +08:00

48 lines
1.6 KiB
C#
Raw 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.Common;
using QYZH.InteractiveMagazine.Models.Dto;
using QYZH.InteractiveMagazine.Models.Dto.Pet;
using QYZH.InteractiveMagazine.Models.Entity;
namespace QYZH.InteractiveMagazine.IService;
/// <summary>
/// 宠物服务接口
/// </summary>
public interface IPetService : IBaseService<Pet>
{
/// <summary>
/// 获取用户宠物信息
/// </summary>
/// <param name="userId">用户Id</param>
/// <returns>宠物信息</returns>
Task<PetOutput?> GetPetByUserIdAsync(long userId);
/// <summary>
/// 为用户创建默认宠物最低形态、成长值为0、未激活状态
/// </summary>
/// <param name="userId">用户Id</param>
Task CreateDefaultPetAsync(long userId);
/// <summary>
/// 激活宠物(将状态从 Inactive 改为 Active
/// </summary>
/// <param name="userId">用户Id</param>
Task ActivatePetAsync(long userId);
/// <summary>
/// 喂养宠物(增加成长值 + 记录喂养记录 + 触发进化检查)
/// </summary>
/// <param name="userId">用户Id</param>
/// <param name="input">喂养输入</param>
/// <returns>喂养结果</returns>
Task<FeedPetOutput> FeedPetAsync(long userId, FeedPetInput input);
/// <summary>
/// 获取宠物喂养记录列表
/// </summary>
/// <param name="userId">用户Id</param>
/// <param name="petId">宠物Id</param>
/// <returns>喂养记录列表</returns>
Task<PageListModel<FeedingRecordOutput>> GetFeedingRecordsAsync(long userId, long petId, PageQueryModel pageQuery);
}