feat:商城支付
This commit is contained in:
1 parent
0f7c3c496b
commit
5e17576074
32 files changed
+774
-156
No files matched your search
+8
@@ -4,7 +4,9 @@ import com.bsd.pjcloud.common.core.constant.ServiceNameConstants;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.feign.annotation.NoToken;
|
||||
import com.bsd.pjcloud.thirdparty.dto.appplus.ThirdMicropayDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.appplus.ThirdMiniRemotePayDto;
|
||||
import com.bsd.pjcloud.thirdparty.dto.appplus.ThirdRemoterRefundDto;
|
||||
import com.bsd.pjcloud.thirdparty.vo.appplus.pay.ThirdMiniAppPayVo;
|
||||
import com.bsd.pjcloud.wallet.api.vo.MchManageVo;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -28,6 +30,12 @@ public interface RemoterThirdAppPlusPayService {
|
||||
@PostMapping("/pay-remoter/micropay")
|
||||
R<String> remoterMicropay(@RequestBody ThirdMicropayDto dto);
|
||||
|
||||
/**
|
||||
* app支付
|
||||
*/
|
||||
@PostMapping("/pay-remoter/app-pay")
|
||||
R<ThirdMiniAppPayVo> remoterAppPay(@RequestBody ThirdMiniRemotePayDto dto);
|
||||
|
||||
/**
|
||||
* 支付退款
|
||||
*/
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ public enum AppPlusPlatformTypeEnum {
|
||||
|
||||
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();
|
||||
return Arrays.stream(values()).filter(v -> ObjectUtil.equals(type, v.getType())).findFirst().orElse(null);
|
||||
}
|
||||
|
||||
}
|
||||
+1
@@ -15,6 +15,7 @@ public enum ThirdPayOrderBizTypeEnum {
|
||||
|
||||
MINI_APP_WALLET_RECHARGE("10", "小程序用户钱包充值"),
|
||||
YXFJ_PAY("20", "云消费机付款码支付"),
|
||||
APP_SHOP_PAY("30", "APP支付-购买商品(有订单)"),
|
||||
;
|
||||
|
||||
private final String type;
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.bsd.pjcloud.thirdparty.dto.appplus;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ThirdMiniRemotePayDto extends ThirdMiniAppPayDto {
|
||||
|
||||
/**
|
||||
* 用户id不能为空
|
||||
*/
|
||||
@NotNull(message = "用户id不能为空")
|
||||
private Long userId;
|
||||
|
||||
}
|
||||
+7
@@ -1,5 +1,6 @@
|
||||
package com.bsd.pjcloud.thirdparty.dto.appplus;
|
||||
|
||||
import com.bsd.pjcloud.thirdparty.constant.pay.ThirdPayOrderBizTypeEnum;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -12,6 +13,12 @@ public class ThirdRemoterRefundDto {
|
||||
@NotNull(message = "订单id不能为空")
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 第三方支付业务类型
|
||||
*/
|
||||
@NotNull(message = "第三方支付业务类型不能为空")
|
||||
private ThirdPayOrderBizTypeEnum bizType;
|
||||
|
||||
/**
|
||||
* 退款金额
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user