refactor: 重构用户与商品模块,统一业务模型与服务
1. 新增用户状态枚举UserStatusEnum,统一用户状态定义 2. 重构用户体系:合并WxUser与User实体为Users实体,统一用户管理 3. 新增微信小程序认证相关服务与控制器,实现一键登录功能 4. 新增商品管理完整服务与控制器,修复商品表字段映射问题 5. 删除冗余的WxUser相关服务与控制器代码 6. 新增Newtonsoft.Json依赖用于微信接口响应解析 7. 清理无用的文件夹引用配置
This commit is contained in:
@ -1,7 +1,19 @@
|
||||
using QYZH.InteractiveMagazine.Models.Dto;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace QYZH.InteractiveMagazine.IService.Dto;
|
||||
|
||||
/// <summary>
|
||||
/// 微信小程序登录输入
|
||||
/// </summary>
|
||||
public class WeChatLoginInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 微信登录凭证(wx.login 获取的 code)
|
||||
/// </summary>
|
||||
public string Code { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 微信登录输出
|
||||
/// </summary>
|
||||
@ -177,3 +189,39 @@ public class WxUserQueryInput : PageQueryModel
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 微信 code2session 接口响应
|
||||
/// </summary>
|
||||
public class WxCode2SessionResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户唯一标识
|
||||
/// </summary>
|
||||
[JsonProperty("openid")]
|
||||
public string? OpenId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 会话密钥
|
||||
/// </summary>
|
||||
[JsonProperty("session_key")]
|
||||
public string? SessionKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户统一标识(在开放平台绑定了多个应用时使用)
|
||||
/// </summary>
|
||||
[JsonProperty("unionid")]
|
||||
public string? UnionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 错误码
|
||||
/// </summary>
|
||||
[JsonProperty("errcode")]
|
||||
public int ErrCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 错误信息
|
||||
/// </summary>
|
||||
[JsonProperty("errmsg")]
|
||||
public string? ErrMsg { get; set; }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user