You've already forked FrameTour-BE
微信支付、回调、订单查询;
微信用户登录、用户信息查询、修改用户信息、同意用户协议; 文件OSS上传、删除接口;
This commit is contained in:
@ -39,6 +39,7 @@ public class JwtInfo implements Serializable {
|
||||
* 用户账号
|
||||
*/
|
||||
private String account;
|
||||
|
||||
private String phone;
|
||||
|
||||
|
||||
|
@ -0,0 +1,42 @@
|
||||
package com.ycwl.basic.model.mobile.DTO;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: songmingsong
|
||||
* @CreateTime: 2024-12-05
|
||||
* @Description: 微信用户信息
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class WeChatUserInfoDTO {
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
private String avatarUrl;
|
||||
/**
|
||||
* 微信昵称
|
||||
*/
|
||||
private String nickname;
|
||||
/**
|
||||
* 是否同意用户协议,1同意0未同意
|
||||
*/
|
||||
private Integer agreement;
|
||||
/**
|
||||
* 电话号码
|
||||
*/
|
||||
private String phone;
|
||||
/**
|
||||
* 国家
|
||||
*/
|
||||
private String country;
|
||||
/**
|
||||
* 省份
|
||||
*/
|
||||
private String province;
|
||||
/**
|
||||
* 城市
|
||||
*/
|
||||
private String city;
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.ycwl.basic.model.mobile.DTO;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: songmingsong
|
||||
* @CreateTime: 2024-12-05
|
||||
* @Description: 修改微信用户信息
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class WeChatUserInfoUpdateDTO {
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
private String avatarUrl;
|
||||
/**
|
||||
* 微信昵称
|
||||
*/
|
||||
private String nickname;
|
||||
/**
|
||||
* 是否同意用户协议,1同意0未同意
|
||||
*/
|
||||
private Long id;
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.ycwl.basic.model.mobile;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: songmingsong
|
||||
* @CreateTime: 2024-12-05
|
||||
* @Description: 微信用户信息
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class WeChatUserInfoModel {
|
||||
/**
|
||||
* 微信openid
|
||||
*/
|
||||
private String openId;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
private String avatarUrl;
|
||||
/**
|
||||
* 微信昵称
|
||||
*/
|
||||
private String nickname;
|
||||
/**
|
||||
* 真实名称
|
||||
*/
|
||||
private String realName;
|
||||
}
|
@ -23,6 +23,10 @@ public class MemberEntity {
|
||||
* 微信昵称
|
||||
*/
|
||||
private String nickname;
|
||||
/**
|
||||
* 微信头像
|
||||
*/
|
||||
private String avatarUrl;
|
||||
/**
|
||||
* 真实姓名
|
||||
*/
|
||||
|
@ -0,0 +1,29 @@
|
||||
package com.ycwl.basic.model.wxPay;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Author: songmingsong
|
||||
* @CreateTime: 2024-12-05
|
||||
* @Description: 预支付请求类
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class WXPayOrderReqVO {
|
||||
|
||||
@ApiModelProperty(value = "总金额(单位:分)",required = true)
|
||||
private Integer totalPrice;
|
||||
|
||||
@ApiModelProperty(value = "商品名称",required = true)
|
||||
private String goodsName;
|
||||
|
||||
@ApiModelProperty(value = "openid",required = true)
|
||||
private String openId;
|
||||
|
||||
@ApiModelProperty(value = "商品订单号",required = true)
|
||||
private Long orderSn;
|
||||
}
|
41
src/main/java/com/ycwl/basic/model/wxPay/WxPayRespVO.java
Normal file
41
src/main/java/com/ycwl/basic/model/wxPay/WxPayRespVO.java
Normal file
@ -0,0 +1,41 @@
|
||||
package com.ycwl.basic.model.wxPay;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Author: songmingsong
|
||||
* @CreateTime: 2024-12-05
|
||||
* @Description: 支付返回类
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class WxPayRespVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 预支付交易会话标识小程序下单接口返回的prepay_id参数值
|
||||
*/
|
||||
@ApiModelProperty("预支付交易会话标识小程序下单接口返回的prepay_id参数值")
|
||||
private String prepayId;
|
||||
/**
|
||||
* 随机字符串
|
||||
*/
|
||||
@ApiModelProperty("随机字符串")
|
||||
private String nonceStr;
|
||||
/**
|
||||
* 时间戳
|
||||
*/
|
||||
@ApiModelProperty("时间戳")
|
||||
private Long timeStamp;
|
||||
/**
|
||||
* 签名
|
||||
*/
|
||||
@ApiModelProperty("签名")
|
||||
private String paySign;
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.ycwl.basic.model.wxPay;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author: songmingsong
|
||||
* @CreateTime: 2024-12-05
|
||||
* @Description: 微信订单查询结果
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@Slf4j
|
||||
public class WxchatCallbackSuccessData {
|
||||
|
||||
/**
|
||||
* 商户订单号
|
||||
*/
|
||||
private String orderId;
|
||||
|
||||
|
||||
/**
|
||||
* 交易状态
|
||||
* SUCCESS:支付成功
|
||||
* REFUND:转入退款
|
||||
* NOTPAY:未支付
|
||||
* CLOSED:已关闭
|
||||
* REVOKED:已撤销(付款码支付)
|
||||
* USERPAYING:用户支付中(付款码支付)
|
||||
* PAYERROR:支付失败(其他原因,如银行返回失败)
|
||||
*/
|
||||
private String tradestate;
|
||||
|
||||
/**
|
||||
* 支付完成时间
|
||||
*/
|
||||
private Date successTime;
|
||||
|
||||
/**
|
||||
* 交易类型
|
||||
* JSAPI:公众号支付
|
||||
* NATIVE:扫码支付
|
||||
* APP:APP支付
|
||||
* MICROPAY:付款码支付
|
||||
* MWEB:H5支付
|
||||
* FACEPAY:刷脸支付
|
||||
*/
|
||||
private String tradetype;
|
||||
|
||||
/**
|
||||
* 订单总金额
|
||||
*/
|
||||
private BigDecimal totalMoney;
|
||||
|
||||
|
||||
public Date getSuccessTime() {
|
||||
return successTime;
|
||||
}
|
||||
|
||||
public void setSuccessTime(String successTime) {
|
||||
// Hutool工具包的方法,自动识别一些常用格式的日期字符串
|
||||
this.successTime = DateUtil.parse(successTime);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user