fix: 微信支付,登录接口。
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package com.intc.weixin.domain.bo;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 创建支付订单请求
|
||||
*
|
||||
* @author intc
|
||||
*/
|
||||
@Data
|
||||
public class ReqCreatePayOrder {
|
||||
|
||||
/**
|
||||
* 支付选项ID
|
||||
*/
|
||||
@NotNull(message = "支付选项ID不能为空")
|
||||
private Integer payId;
|
||||
|
||||
/**
|
||||
* 设备ID列表
|
||||
*/
|
||||
@NotEmpty(message = "设备ID列表不能为空")
|
||||
private List<Long> listDeviceId;
|
||||
|
||||
/**
|
||||
* 微信小程序登录code
|
||||
*/
|
||||
@NotNull(message = "微信登录code不能为空")
|
||||
private String jsCode;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.intc.weixin.domain.bo;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 微信登录请求对象
|
||||
*
|
||||
* @author intc
|
||||
*/
|
||||
@Data
|
||||
public class ReqWxLogin implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 登录时获取的code(用于获取手机号)
|
||||
*/
|
||||
@NotBlank(message = "code不能为空")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 登录时获取的jsCode(用于获取openId)
|
||||
*/
|
||||
@NotBlank(message = "jsCode不能为空")
|
||||
private String jsCode;
|
||||
|
||||
/**
|
||||
* 客户端ID
|
||||
*/
|
||||
@NotBlank(message = "客户端ID不能为空")
|
||||
private String clientId;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.intc.weixin.domain.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 支付选项视图对象
|
||||
*
|
||||
* @author intc
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "支付选项")
|
||||
public class PayItemVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@Schema(description = "选项ID")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 金额,单位:分
|
||||
*/
|
||||
@Schema(description = "金额(分)")
|
||||
private Integer amount;
|
||||
|
||||
/**
|
||||
* 增加月份
|
||||
*/
|
||||
@Schema(description = "增加月份")
|
||||
private Integer addMonth;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@Schema(description = "标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@Schema(description = "描述")
|
||||
private String description;
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.intc.weixin.domain.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 微信支付订单响应
|
||||
*
|
||||
* @author intc
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "微信支付订单")
|
||||
public class WxPayOrderVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 预支付交易会话标识
|
||||
*/
|
||||
@Schema(description = "预支付ID")
|
||||
private String prepayId;
|
||||
|
||||
/**
|
||||
* 签名类型
|
||||
*/
|
||||
@Schema(description = "签名类型")
|
||||
private String signatureType;
|
||||
|
||||
/**
|
||||
* 签名
|
||||
*/
|
||||
@Schema(description = "签名")
|
||||
private String signature;
|
||||
|
||||
/**
|
||||
* 订单总金额(分)
|
||||
*/
|
||||
@Schema(description = "订单总金额(分)")
|
||||
private Integer totalAmount;
|
||||
|
||||
/**
|
||||
* 随机字符串
|
||||
*/
|
||||
@Schema(description = "随机字符串")
|
||||
private String nonceStr;
|
||||
|
||||
/**
|
||||
* 时间戳
|
||||
*/
|
||||
@Schema(description = "时间戳")
|
||||
private String timestamp;
|
||||
|
||||
/**
|
||||
* 微信AppId
|
||||
*/
|
||||
@Schema(description = "微信AppId")
|
||||
private String appId;
|
||||
|
||||
/**
|
||||
* 订单详情扩展字符串,格式: prepay_id=xxxxx
|
||||
*/
|
||||
@Schema(description = "订单详情扩展")
|
||||
private String packageValue;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.intc.weixin.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 微信手机号信息
|
||||
*
|
||||
* @author intc
|
||||
*/
|
||||
@Data
|
||||
public class WxPhoneInfoVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户绑定的手机号(国外手机号会有区号)
|
||||
*/
|
||||
private String phoneNumber;
|
||||
|
||||
/**
|
||||
* 没有区号的手机号
|
||||
*/
|
||||
private String purePhoneNumber;
|
||||
|
||||
/**
|
||||
* 区号
|
||||
*/
|
||||
private String countryCode;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.intc.weixin.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 微信会话信息
|
||||
*
|
||||
* @author intc
|
||||
*/
|
||||
@Data
|
||||
public class WxSessionInfoVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户唯一标识
|
||||
*/
|
||||
private String openid;
|
||||
|
||||
/**
|
||||
* 会话密钥
|
||||
*/
|
||||
private String sessionKey;
|
||||
|
||||
/**
|
||||
* 用户在开放平台的唯一标识符
|
||||
*/
|
||||
private String unionid;
|
||||
}
|
||||
Reference in New Issue
Block a user