From 6b7bbf4c2a9470bb9c674dd5a866004e4f061031 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期二, 25 七月 2023 17:45:48 +0800
Subject: [PATCH] 删除管理后台无用代码
---
cloud-server-account/src/main/java/com/dsh/account/controller/PaymentCallbackController.java | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 60 insertions(+), 0 deletions(-)
diff --git a/cloud-server-account/src/main/java/com/dsh/account/controller/PaymentCallbackController.java b/cloud-server-account/src/main/java/com/dsh/account/controller/PaymentCallbackController.java
index 84d79ba..b853f8e 100644
--- a/cloud-server-account/src/main/java/com/dsh/account/controller/PaymentCallbackController.java
+++ b/cloud-server-account/src/main/java/com/dsh/account/controller/PaymentCallbackController.java
@@ -2,12 +2,14 @@
import com.dsh.account.service.RechargeRecordsService;
+import com.dsh.account.service.TAppUserService;
import com.dsh.account.service.TStudentService;
import com.dsh.account.util.PayMoneyUtil;
import com.dsh.account.util.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
@@ -32,6 +34,9 @@
private TStudentService tstuService;
@Autowired
private RechargeRecordsService recordsService;
+
+ @Autowired
+ private TAppUserService tappService;
/**
* 课包续课支付宝支付回调接口
@@ -129,4 +134,59 @@
}
}
+
+ /**
+ * 兑换商品支付的微信回调
+ * @param request
+ * @param response
+ */
+ @ResponseBody
+ @PostMapping("/base/pointMer/exchangeGoodPaymentWeChatCallback")
+ public void addVipPaymentWeChatCallback(HttpServletRequest request, HttpServletResponse response){
+ try {
+ Map<String, String> map = payMoneyUtil.weixinpayCallback(request);
+ if(null != map){
+ String out_trade_no = map.get("out_trade_no");
+ String transaction_id = map.get("transaction_id");
+ String result = map.get("result");
+ ResultUtil resultUtil = tappService.exchangeAddPaymentCallback(out_trade_no, transaction_id,1);
+ if(resultUtil.getCode() == 200){
+ PrintWriter out = response.getWriter();
+ out.write(result);
+ out.flush();
+ out.close();
+ }
+ }
+ }catch (Exception e){
+ e.printStackTrace();
+ }
+ }
+
+
+ /**
+ * 兑换商品支付的支付宝回调
+ * @param request
+ * @param response
+ */
+ @ResponseBody
+ @PostMapping("/base/pointMer/exchangeGoodPaymentAliCallback")
+ public void addVipPaymentAliCallback(HttpServletRequest request, HttpServletResponse response){
+ try {
+ Map<String, String> map = payMoneyUtil.alipayCallback(request);
+ if(null != map){
+ String out_trade_no = map.get("out_trade_no");
+ String trade_no = map.get("trade_no");
+ ResultUtil resultUtil = tappService.exchangeAddPaymentCallback(out_trade_no, trade_no,2);
+ if(resultUtil.getCode() == 200){
+ PrintWriter out = response.getWriter();
+ out.write("success");
+ out.flush();
+ out.close();
+ }
+ }
+ }catch (Exception e){
+ e.printStackTrace();
+ }
+ }
+
}
--
Gitblit v1.7.1