feat:支付宝支付
This commit is contained in:
1 parent
13d912f0cb
commit
d4f45cf37e
15 files changed
+195
-63
No files matched your search
+2
-2
@@ -11,7 +11,7 @@ import java.util.Arrays;
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum MiniPlatformLoginErrorEnum {
|
||||
public enum AppPlusPlatformLoginErrorEnum {
|
||||
|
||||
GET_PHONE_ERROR("10", "获取手机号错误"),
|
||||
USER_NOT_EXIST("20", "用户不存在"),
|
||||
@@ -21,7 +21,7 @@ public enum MiniPlatformLoginErrorEnum {
|
||||
private final String type;
|
||||
private final String description;
|
||||
|
||||
public static MiniPlatformLoginErrorEnum valueOfByType(String type) {
|
||||
public static AppPlusPlatformLoginErrorEnum valueOfByType(String type) {
|
||||
if (ObjectUtil.isEmpty(type)) return null;
|
||||
return Arrays.stream(values()).filter(v -> ObjectUtil.equals(type, v.getType())).findFirst().get();
|
||||
}
|
||||
+2
-3
@@ -1,7 +1,6 @@
|
||||
package com.bsd.pjcloud.thirdparty.constant.miniplatform;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.bsd.pjcloud.thirdparty.constant.ThirdKeyTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@@ -12,7 +11,7 @@ import java.util.Arrays;
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum MiniPlatformTypeEnum {
|
||||
public enum AppPlusPlatformTypeEnum {
|
||||
|
||||
WECHAT("10", "微信小程序"),
|
||||
ALI_PAY("20", "支付宝"),
|
||||
@@ -21,7 +20,7 @@ public enum MiniPlatformTypeEnum {
|
||||
private final String type;
|
||||
private final String description;
|
||||
|
||||
public static MiniPlatformTypeEnum valueOfByType(String type) {
|
||||
public static AppPlusPlatformTypeEnum valueOfByType(String type) {
|
||||
if (ObjectUtil.isEmpty(type)) return null;
|
||||
return Arrays.stream(values()).filter(v -> ObjectUtil.equals(type, v.getType())).findFirst().get();
|
||||
}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.bsd.pjcloud.thirdparty.dto.appplus;
|
||||
|
||||
import com.bsd.pjcloud.thirdparty.constant.miniplatform.MiniPlatformTypeEnum;
|
||||
import com.bsd.pjcloud.thirdparty.constant.miniplatform.AppPlusPlatformTypeEnum;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
@@ -12,7 +12,7 @@ public class ThirdMiniAppGetUniqueDto {
|
||||
* 小程序平台
|
||||
*/
|
||||
@NotNull(message = "小程序平台标识不能为空")
|
||||
private MiniPlatformTypeEnum miniPlatformType;
|
||||
private AppPlusPlatformTypeEnum miniPlatformType;
|
||||
|
||||
@NotEmpty(message = "code不能为空")
|
||||
private String code;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.bsd.pjcloud.thirdparty.dto.appplus;
|
||||
|
||||
import com.bsd.pjcloud.thirdparty.constant.miniplatform.MiniPlatformTypeEnum;
|
||||
import com.bsd.pjcloud.thirdparty.constant.miniplatform.AppPlusPlatformTypeEnum;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
@@ -12,7 +12,7 @@ public class ThirdMiniAppOAth2LoginDto {
|
||||
* 小程序平台
|
||||
*/
|
||||
@NotNull(message = "小程序平台标识不能为空")
|
||||
private MiniPlatformTypeEnum miniPlatformType;
|
||||
private AppPlusPlatformTypeEnum miniPlatformType;
|
||||
|
||||
@NotEmpty(message = "phoneCode不能为空")
|
||||
private String phoneCode;
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
package com.bsd.pjcloud.thirdparty.dto.appplus;
|
||||
|
||||
import com.bsd.pjcloud.thirdparty.constant.miniplatform.MiniPlatformTypeEnum;
|
||||
import com.bsd.pjcloud.thirdparty.constant.miniplatform.AppPlusPlatformTypeEnum;
|
||||
import com.bsd.pjcloud.thirdparty.constant.pay.ThirdPayOrderBizTypeEnum;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
@@ -26,7 +26,7 @@ public class ThirdMiniAppPayDto {
|
||||
* 小程序平台
|
||||
*/
|
||||
@NotNull(message = "小程序平台标识不能为空")
|
||||
private MiniPlatformTypeEnum miniPlatformType;
|
||||
private AppPlusPlatformTypeEnum miniPlatformType;
|
||||
|
||||
/**
|
||||
* 金额(分)
|
||||
@@ -36,7 +36,7 @@ public class ThirdMiniAppPayDto {
|
||||
/**
|
||||
* 用户标识
|
||||
*/
|
||||
@NotEmpty(message = "用户标识不能为空")
|
||||
// @NotEmpty(message = "用户标识不能为空")
|
||||
private String openId;
|
||||
|
||||
}
|
||||
+2
-2
@@ -4,10 +4,10 @@ import com.bsd.pjcloud.thirdparty.constant.pay.ThirdPayOrderBizTypeEnum;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* JSAPI/小程序下单
|
||||
* app支付参数
|
||||
*/
|
||||
@Data
|
||||
public class ThirdMiniJsapiPayDto {
|
||||
public class ThirdAppPlusPayDto {
|
||||
|
||||
/**
|
||||
* 充值业务类型
|
||||
+1
-1
@@ -7,6 +7,6 @@ import java.util.HashMap;
|
||||
@Data
|
||||
public class ThirdMiniAppPayVo {
|
||||
|
||||
private HashMap<String, Object> miniAppPayParams;
|
||||
private HashMap<String, Object> appPlusPayParams;
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user