feat: 完成多模块功能迭代与优化
1. 新增宠物皮肤初始枚举值、下拉列表接口及相关DTO 2. 完善商品实体与DTO,新增虚拟商品标记和类型ID字段 3. 重构用户认证体系,支持多用户切换并重新生成JWT令牌 4. 新增签到配置管理全套功能,包括增删改查和状态管理 5. 优化模型验证过滤器和基础响应类的命名规范 6. 新增补签功能,完善签到服务逻辑 7. 拆分用户详情DTO,新增各子数据分页查询接口 8. 重构微信控制器的用户ID获取逻辑,统一使用激活用户ID 9. 修复背包服务中补签卡的扣减逻辑 10. 新增家长姓名修改接口和相关服务实现
This commit is contained in:
52
QYZH.InteractiveMagazine.IService/ICheckInConfigService.cs
Normal file
52
QYZH.InteractiveMagazine.IService/ICheckInConfigService.cs
Normal file
@ -0,0 +1,52 @@
|
||||
using QYZH.InteractiveMagazine.Models.Dto;
|
||||
using QYZH.InteractiveMagazine.Models.Dto.CheckIn;
|
||||
using QYZH.InteractiveMagazine.Models.Entity;
|
||||
|
||||
namespace QYZH.InteractiveMagazine.IService;
|
||||
|
||||
/// <summary>
|
||||
/// 签到配置服务接口
|
||||
/// </summary>
|
||||
public interface ICheckInConfigService : IBaseService<CheckInConfig>
|
||||
{
|
||||
/// <summary>
|
||||
/// 创建签到配置
|
||||
/// </summary>
|
||||
/// <param name="input">签到配置输入</param>
|
||||
/// <returns>创建的签到配置信息</returns>
|
||||
Task<CheckInConfigOutput> CreateAsync(CheckInConfigInput input);
|
||||
|
||||
/// <summary>
|
||||
/// 更新签到配置
|
||||
/// </summary>
|
||||
/// <param name="id">签到配置ID</param>
|
||||
/// <param name="input">签到配置输入</param>
|
||||
/// <returns>更新后的签到配置信息</returns>
|
||||
Task<CheckInConfigOutput> UpdateAsync(long id, CheckInConfigInput input);
|
||||
|
||||
/// <summary>
|
||||
/// 删除签到配置(软删除)
|
||||
/// </summary>
|
||||
/// <param name="id">签到配置ID</param>
|
||||
Task DeleteAsync(long id);
|
||||
|
||||
/// <summary>
|
||||
/// 根据ID获取签到配置
|
||||
/// </summary>
|
||||
/// <param name="id">签到配置ID</param>
|
||||
/// <returns>签到配置信息</returns>
|
||||
Task<CheckInConfigOutput> GetByIdAsync(long id);
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询签到配置列表
|
||||
/// </summary>
|
||||
/// <param name="input">查询条件</param>
|
||||
/// <returns>分页结果</returns>
|
||||
Task<PageListModel<CheckInConfigOutput>> GetListAsync(CheckInConfigQueryInput input);
|
||||
|
||||
/// <summary>
|
||||
/// 更新签到配置启用/禁用状态
|
||||
/// </summary>
|
||||
/// <param name="id">签到配置ID</param>
|
||||
Task<bool> UpdateStatusAsync(long id);
|
||||
}
|
||||
@ -169,4 +169,10 @@ public interface IPetService : IBaseService<UserPet>
|
||||
/// 根据皮肤Id获取各阶段图片列表(按进化阶段分组,含阶段基本信息)
|
||||
/// </summary>
|
||||
Task<List<SkinEvolutionStageOutput>> GetSkinImagesGroupedBySkinIdAsync(long skinId);
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有皮肤下拉列表(仅返回Id和Name,按SortOrder排序)
|
||||
/// </summary>
|
||||
/// <param name="types">皮肤类型列表(可选)</param>
|
||||
Task<List<SelectOptionDto>> GetAllSkinsForSelectAsync(List<string>? types = null);
|
||||
}
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
using QYZH.InteractiveMagazine.Models.Dto;
|
||||
using QYZH.InteractiveMagazine.Models.Dto.CheckIn;
|
||||
using QYZH.InteractiveMagazine.Models.Dto.Compensation;
|
||||
using QYZH.InteractiveMagazine.Models.Dto.Points;
|
||||
using QYZH.InteractiveMagazine.Models.Entity;
|
||||
|
||||
@ -12,7 +14,7 @@ public interface IUsersService : IBaseService<Users>
|
||||
Task<BaseResponse<PageListModel<UsersOutput>>> GetListAsync(UsersQueryInput input);
|
||||
|
||||
/// <summary>
|
||||
/// 获取用户详情(包含积分记录、签到记录、补偿任务、期刊列表)
|
||||
/// 获取用户详情(仅基本信息)
|
||||
/// </summary>
|
||||
Task<BaseResponse<UserDetailOutput>> GetDetailAsync(long id);
|
||||
|
||||
@ -30,4 +32,24 @@ public interface IUsersService : IBaseService<Users>
|
||||
/// 手动扣除用户积分
|
||||
/// </summary>
|
||||
Task<ManualPointsOutput> ManualDeductPointsAsync(long userId, ManualDeductPointsInput input, long operatorId, string operatorName, string? ipAddress = null);
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询用户积分记录
|
||||
/// </summary>
|
||||
Task<BaseResponse<PageListModel<PointsRecordOutput>>> GetUserPointsRecordsAsync(long userId, PointsRecordQueryInput input);
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询用户签到记录
|
||||
/// </summary>
|
||||
Task<BaseResponse<PageListModel<CheckInRecordOutput>>> GetUserCheckInRecordsAsync(long userId, PageQueryModel input);
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询用户补偿任务
|
||||
/// </summary>
|
||||
Task<BaseResponse<PageListModel<CompensationTaskOutput>>> GetUserCompensationTasksAsync(long userId, CompensationTaskQueryInput input);
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询用户期刊列表(含期刊详情)
|
||||
/// </summary>
|
||||
Task<BaseResponse<PageListModel<UserJournalItemOutput>>> GetUserJournalsAsync(long userId, UserJournalQueryInput input);
|
||||
}
|
||||
|
||||
@ -19,9 +19,12 @@ public interface IWeChatAuthService : IBaseService<WxUser>
|
||||
Task<WeChatLoginOutput> QuickLoginAsync(WeChatQuickLoginInput input);
|
||||
|
||||
/// <summary>
|
||||
/// 切换用户(同一 WxUser 下切换 User 身份,JWT 基于 WxUser 无需重新生成 Token)
|
||||
/// 切换用户(同一 WxUser 下切换 User 身份,重新生成 Token)
|
||||
/// </summary>
|
||||
Task<WeChatSwitchUserOutput> SwitchUserAsync(long wxUserId, WeChatSwitchUserInput input);
|
||||
/// <param name="wxUserId">当前 WxUser.Id(来自 JWT)</param>
|
||||
/// <param name="currentUserId">当前激活 Users.Id(来自 JWT,用于清除旧 Redis Token)</param>
|
||||
/// <param name="input">切换目标用户参数</param>
|
||||
Task<WeChatSwitchUserOutput> SwitchUserAsync(long wxUserId, long currentUserId, WeChatSwitchUserInput input);
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前 WxUser 下所有用户列表
|
||||
@ -37,4 +40,12 @@ public interface IWeChatAuthService : IBaseService<WxUser>
|
||||
/// <param name="input">新增用户参数</param>
|
||||
/// <returns>新创建的用户信息</returns>
|
||||
Task<WxUserOutput> CreateUserAsync(long wxUserId, CreateChildUserInput input);
|
||||
|
||||
/// <summary>
|
||||
/// 修改家长名字(WxUser.Name)
|
||||
/// </summary>
|
||||
/// <param name="wxUserId">当前登录的 WxUser.Id(来自 JWT)</param>
|
||||
/// <param name="input">修改名字参数</param>
|
||||
/// <returns>更新后的微信用户信息</returns>
|
||||
Task<WxUserInfoOutput> UpdateWxUserNameAsync(long wxUserId, UpdateWxUserNameInput input);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user