Files
QYZH.InteractiveMagazine/QYZH.InteractiveMagazine.IService/IWeChatAuthService.cs
glz ae4cd627df feat: 完成多模块功能迭代与优化
1.  新增宠物皮肤初始枚举值、下拉列表接口及相关DTO
2.  完善商品实体与DTO,新增虚拟商品标记和类型ID字段
3.  重构用户认证体系,支持多用户切换并重新生成JWT令牌
4.  新增签到配置管理全套功能,包括增删改查和状态管理
5.  优化模型验证过滤器和基础响应类的命名规范
6.  新增补签功能,完善签到服务逻辑
7.  拆分用户详情DTO,新增各子数据分页查询接口
8.  重构微信控制器的用户ID获取逻辑,统一使用激活用户ID
9.  修复背包服务中补签卡的扣减逻辑
10. 新增家长姓名修改接口和相关服务实现
2026-06-10 17:53:38 +08:00

52 lines
2.1 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.Entity;
using QYZH.InteractiveMagazine.Models.WeChat;
namespace QYZH.InteractiveMagazine.IService;
/// <summary>
/// 微信小程序认证服务
/// </summary>
public interface IWeChatAuthService : IBaseService<WxUser>
{
/// <summary>
/// 微信小程序登录(首次仅创建 WxUser不自动创建 User
/// </summary>
Task<WeChatLoginOutput> LoginAsync(WeChatLoginInput input);
/// <summary>
/// 微信小程序快捷登录(通过 OpenId 直接登录)
/// </summary>
Task<WeChatLoginOutput> QuickLoginAsync(WeChatQuickLoginInput input);
/// <summary>
/// 切换用户(同一 WxUser 下切换 User 身份,重新生成 Token
/// </summary>
/// <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 下所有用户列表
/// </summary>
/// <param name="wxUserId">当前登录的 WxUser.Id来自 JWT</param>
/// <returns>用户列表</returns>
Task<List<WxUserOutput>> GetUsersAsync(long wxUserId);
/// <summary>
/// 在当前 WxUser 下新增用户(子用户/角色)
/// </summary>
/// <param name="wxUserId">当前登录的 WxUser.Id来自 JWT</param>
/// <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);
}