From d3ca17d681d7afd87c3b0a3bb73fc42119364268 Mon Sep 17 00:00:00 2001
From: DB <2502523450@qq.com>
Date: Thu, 21 Dec 2023 18:31:02 +0800
Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E4=BB=98=E6=A8=A1=E5=9D=97=E5=89=A5?=
=?UTF-8?q?=E7=A6=BB;=E6=8A=A5=E9=94=80=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/cpop/core/base/enums/OrderSource.java | 8 +-
Cpop-Jambox/pom.xml | 11 +-
.../jambox/business/bo/OncePlaceOrderBo.java | 68 +++++++++
.../CardTemplateController.java | 2 +-
.../{ => backstage}/EasyLearnController.java | 27 ++--
.../callback/EasyLearnCallBackController.java | 50 +++++++
.../business/entity/EasyLearnOrder.java | 12 +-
.../service/EasyLearnOrderService.java | 27 +++-
.../impl/EasyLearnOrderServiceImpl.java | 141 +++++++++++++++++-
.../constant/JamboxRedisConstant.java | 14 ++
.../com/cpop/mall/web/CpopWxPayTests.java | 8 +-
.../service/impl/OrderRefundServiceImpl.java | 9 +-
.../service/impl/OrderServiceImpl.java | 17 +--
.../config/wxPay/WxPayConfiguration.java | 48 ------
.../config/wxPay/WxPayProperties.java | 78 ----------
.../mall/framework/handler/WxPayHandler.java | 72 ---------
.../bo/FinanceReimburseAuditPageBo.java | 4 +-
.../business/bo/FinanceReimbursePageBo.java | 4 +-
.../controller/backstage/WxPayController.java | 7 +-
.../impl/FinanceReimburseServiceImpl.java | 14 +-
.../vo/FinanceReimburseAuditPageVo.java | 4 +-
.../business/vo/FinanceReimbursePageVo.java | 4 +-
.../config/wxPay/WxPayConfiguration.java | 51 -------
.../config/wxPay/WxPayProperties.java | 78 ----------
.../framework/handler/wxPay/WxPayHandler.java | 72 ---------
Cpop-Pay/pom.xml | 4 +-
.../config/wxPay/WxPayConfiguration.java | 1 +
.../core}/dto/WxPayGoodsDetailDto.java | 2 +-
.../framewok/handler/wxPay/WxPayHandler.java | 21 +++
.../pay/framewok}/task/WxPayAsyncTask.java | 68 +++++----
30 files changed, 422 insertions(+), 504 deletions(-)
create mode 100644 Cpop-Jambox/src/main/java/com/cpop/jambox/business/bo/OncePlaceOrderBo.java
rename Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/{ => backstage}/CardTemplateController.java (93%)
rename Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/{ => backstage}/EasyLearnController.java (83%)
create mode 100644 Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/callback/EasyLearnCallBackController.java
create mode 100644 Cpop-Jambox/src/main/java/com/cpop/jambox/framework/constant/JamboxRedisConstant.java
delete mode 100644 Cpop-Mall/src/main/java/com/cpop/mall/framework/config/wxPay/WxPayConfiguration.java
delete mode 100644 Cpop-Mall/src/main/java/com/cpop/mall/framework/config/wxPay/WxPayProperties.java
delete mode 100644 Cpop-Mall/src/main/java/com/cpop/mall/framework/handler/WxPayHandler.java
delete mode 100644 Cpop-Oam/src/main/java/com/cpop/oam/framework/config/wxPay/WxPayConfiguration.java
delete mode 100644 Cpop-Oam/src/main/java/com/cpop/oam/framework/config/wxPay/WxPayProperties.java
delete mode 100644 Cpop-Oam/src/main/java/com/cpop/oam/framework/handler/wxPay/WxPayHandler.java
rename {Cpop-Mall/src/main/java/com/cpop/mall/business => Cpop-Pay/src/main/java/com/cpop/pay/framewok/core}/dto/WxPayGoodsDetailDto.java (93%)
rename {Cpop-Mall/src/main/java/com/cpop/mall/framework => Cpop-Pay/src/main/java/com/cpop/pay/framewok}/task/WxPayAsyncTask.java (67%)
diff --git a/Cpop-Core/src/main/java/com/cpop/core/base/enums/OrderSource.java b/Cpop-Core/src/main/java/com/cpop/core/base/enums/OrderSource.java
index 59a78dd..2d842ef 100644
--- a/Cpop-Core/src/main/java/com/cpop/core/base/enums/OrderSource.java
+++ b/Cpop-Core/src/main/java/com/cpop/core/base/enums/OrderSource.java
@@ -1,7 +1,6 @@
package com.cpop.core.base.enums;
import lombok.Getter;
-import lombok.Setter;
/**
* 订单来源
@@ -12,7 +11,12 @@ public enum OrderSource {
/**
* 商城
*/
- MALL("Mall",0.002);
+ MALL("Mall",0.002),
+
+ /**
+ * 微信支付
+ */
+ EASY_LEARN("easyLearn",0.002);
OrderSource(String name, Double rate) {
this.rate = rate;
diff --git a/Cpop-Jambox/pom.xml b/Cpop-Jambox/pom.xml
index 20628bc..213b6e1 100644
--- a/Cpop-Jambox/pom.xml
+++ b/Cpop-Jambox/pom.xml
@@ -18,10 +18,15 @@
com.cpop
Cpop-Core
-
+
- com.github.binarywang
- weixin-java-pay
+ com.cpop
+ Cpop-System
+
+
+
+ com.cpop
+ Cpop-Pay
diff --git a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/bo/OncePlaceOrderBo.java b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/bo/OncePlaceOrderBo.java
new file mode 100644
index 0000000..1a334c9
--- /dev/null
+++ b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/bo/OncePlaceOrderBo.java
@@ -0,0 +1,68 @@
+package com.cpop.jambox.business.bo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+/**
+ * @author DB
+ * @version 1.0.0
+ * @since 2023-12-21 17:15
+ */
+@Data
+@Accessors(chain = true)
+@ApiModel(value = "OncePlaceOrderBo对象", description = "一次性支付参数")
+public class OncePlaceOrderBo {
+
+ /**
+ * 品牌id
+ */
+ @ApiModelProperty("品牌id")
+ private String brandCloudId;
+
+ /**
+ * 校区id
+ */
+ @ApiModelProperty("校区id")
+ private String storeCloudId;
+
+ /**
+ * 客户名
+ */
+ @ApiModelProperty("客户名")
+ private String customerName;
+
+ /**
+ * 客户电话
+ */
+ @ApiModelProperty("客户电话")
+ private String customerPhone;
+
+ /**
+ * 产品/课卡id
+ */
+ @ApiModelProperty("产品/课卡id")
+ private String productId;
+
+ /**
+ * 总金额
+ */
+ @ApiModelProperty("总金额")
+ private BigDecimal totalAmount;
+
+ /**
+ * 总支付金额
+ */
+ @ApiModelProperty("总支付金额")
+ private BigDecimal totalPayAmount;
+
+ /**
+ * 员工id
+ */
+ @ApiModelProperty("员工id")
+ private String staffId;
+
+}
diff --git a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/CardTemplateController.java b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/backstage/CardTemplateController.java
similarity index 93%
rename from Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/CardTemplateController.java
rename to Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/backstage/CardTemplateController.java
index 0ec2687..c1a9e34 100644
--- a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/CardTemplateController.java
+++ b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/backstage/CardTemplateController.java
@@ -1,4 +1,4 @@
-package com.cpop.jambox.business.controller;
+package com.cpop.jambox.business.controller.backstage;
import com.mybatisflex.core.paginate.Page;
import com.cpop.core.base.R;
diff --git a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/EasyLearnController.java b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/backstage/EasyLearnController.java
similarity index 83%
rename from Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/EasyLearnController.java
rename to Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/backstage/EasyLearnController.java
index 3921032..d8c527c 100644
--- a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/EasyLearnController.java
+++ b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/backstage/EasyLearnController.java
@@ -1,27 +1,23 @@
-package com.cpop.jambox.business.controller;
+package com.cpop.jambox.business.controller.backstage;
import com.alibaba.excel.EasyExcel;
import com.cpop.core.base.R;
import com.cpop.jambox.business.bo.EasyLearnPageBo;
+import com.cpop.jambox.business.bo.OncePlaceOrderBo;
import com.cpop.jambox.business.dto.EasyLearnPageDto;
import com.cpop.jambox.business.service.EasyLearnOrderService;
import com.cpop.jambox.business.vo.EasyLearnPageVo;
import com.mybatisflex.core.paginate.Page;
+import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-import io.swagger.annotations.Api;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
-import java.time.LocalDate;
-import java.util.List;
/**
* 果酱-放心学订单表 控制层。
@@ -89,4 +85,17 @@ public class EasyLearnController {
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
EasyExcel.write(response.getOutputStream(), EasyLearnPageDto.class).sheet("记录").doWrite(easyLearnOrderService.getEasyLearnXml(bo));
}
+
+ /**
+ * 一次性支付下单
+ * @author DB
+ * @since 2023/10/23 12:15
+ * @param bo 下单请求对象
+ * @return com.cpop.core.base.R
+ */
+ @PostMapping("/oncePlaceOrderBo")
+ @ApiOperation("一次性支付下单")
+ public R