From 4ee86eb0f4984bf3ede3196ad8c5fe95e8c5a504 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期三, 15 六月 2022 19:05:02 +0800
Subject: [PATCH] 优化代码
---
service-api/src/main/java/com/java110/api/controller/app/PaymentController.java | 52 ++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 46 insertions(+), 6 deletions(-)
diff --git a/service-api/src/main/java/com/java110/api/controller/app/PaymentController.java b/service-api/src/main/java/com/java110/api/controller/app/PaymentController.java
index 90bb179..f3aa410 100644
--- a/service-api/src/main/java/com/java110/api/controller/app/PaymentController.java
+++ b/service-api/src/main/java/com/java110/api/controller/app/PaymentController.java
@@ -24,7 +24,7 @@
import com.java110.utils.util.StringUtil;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import com.java110.core.log.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody;
@@ -68,11 +68,17 @@
private IOweFeeToNotifySMO oweFeeToNotifySMOImpl;
@Autowired
+ private ITempCarFeeToNotifySMO tempCarFeeToNotifySMOImpl;
+
+ @Autowired
private IToQrPayOweFeeSMO toQrPayOweFeeSMOImpl;
@Autowired
private IToPayInGoOutSMO toPayInGoOutSMOImpl;
@Autowired
private IToPayBackCitySMO toPayBackCitySMOImpl;
+
+ @Autowired
+ private IToPayTempCarFeeSMO toPayTempCarFeeSMOImpl;
/**
* <p>缁熶竴涓嬪崟鍏ュ彛</p>
@@ -111,8 +117,29 @@
IPageData newPd = PageData.newInstance().builder(pd.getUserId(), pd.getUserName(), pd.getToken(), postInfo,
"", "", "", pd.getSessionId(),
- appId);
+ appId, pd.getHeaders());
return toPayOweFeeSMOImpl.toPay(newPd);
+ }
+
+ /**
+ * <p>缁熶竴涓嬪崟鍏ュ彛</p>
+ *
+ * @param request
+ * @throws Exception
+ */
+ @RequestMapping(path = "/toPayTempCarFee", method = RequestMethod.POST)
+ public ResponseEntity<String> toPayTempCarFee(@RequestBody String postInfo, HttpServletRequest request) {
+ IPageData pd = (IPageData) request.getAttribute(CommonConstant.CONTEXT_PAGE_DATA);
+ /*IPageData pd = (IPageData) request.getAttribute(CommonConstant.CONTEXT_PAGE_DATA);*/
+ String appId = request.getHeader("APP_ID");
+ if (StringUtil.isEmpty(appId)) {
+ appId = request.getHeader("APP-ID");
+ }
+
+ IPageData newPd = PageData.newInstance().builder(pd.getUserId(), pd.getUserName(), pd.getToken(), postInfo,
+ "", "", "", pd.getSessionId(),
+ appId, pd.getHeaders());
+ return toPayTempCarFeeSMOImpl.toPay(newPd);
}
/**
@@ -215,8 +242,8 @@
String preStr = buildSignString(params);
- paramIn.put("preSign",preStr);
- paramIn.put("sign",sign);
+ paramIn.put("preSign", preStr);
+ paramIn.put("sign", sign);
//鍒ゆ柇绛惧悕鏄惁鐩哥瓑
// 鏀跺埌閫氱煡鍚庤寰楄繑鍥濻UCCESS
@@ -267,8 +294,8 @@
String preStr = buildSignString(params);
- paramIn.put("preSign",preStr);
- paramIn.put("sign",sign);
+ paramIn.put("preSign", preStr);
+ paramIn.put("sign", sign);
return oweFeeToNotifySMOImpl.toNotify(paramIn.toJSONString(), request);
}
@@ -287,6 +314,19 @@
}
/**
+ * <p>鍑虹缁熶竴涓嬪崟鍏ュ彛</p>
+ *
+ * @param request
+ * @throws Exception
+ */
+ @RequestMapping(path = "/tempCarFeeNotifyUrl", method = RequestMethod.POST)
+ public ResponseEntity<String> tempCarFeeNotifyUrl(@RequestBody String postInfo, HttpServletRequest request) {
+ logger.debug("寰俊鏀粯鍥炶皟鎶ユ枃" + postInfo);
+
+ return tempCarFeeToNotifySMOImpl.toNotify(postInfo, request);
+ }
+
+ /**
* <p>鏀粯鍥炶皟Api</p>
*
* @param request
--
Gitblit v1.8.0