|
@@ -57,7 +57,7 @@ public class PaySaleController {
|
|
|
@RequestParam(required = false) String mobile,
|
|
|
@RequestParam(required = false) String tp,
|
|
|
HttpServletRequest request) {
|
|
|
- LOG.info("调用创建保证金微信支付订单(/pay/createOrder)接口, productId:{}, agentId:{}, openId:{}", productId, agentId, openId);
|
|
|
+ LOG.info("调用创建保证金微信支付订单(/paysale/createOrder)接口, productId:{}, agentId:{}, openId:{},name:{}, mobile:{}", productId, agentId, openId,name,mobile);
|
|
|
|
|
|
if (StringUtils.isBlank(productId)) {
|
|
|
LOG.info("productId为空");
|
|
@@ -110,7 +110,7 @@ public class PaySaleController {
|
|
|
ExecuteResult<CreateOrderResult> executeResult = payService.createOrder(createOrderBo);
|
|
|
if (executeResult.isExecuteResult()) {
|
|
|
ApiResult<CreateOrderResult> apiResult = ApiResult.createSuccess(executeResult.getData());
|
|
|
- LOG.info("调用创建保证金微信支付订单(/pay/createOrder)接口成功, apiResult:{}", apiResult);
|
|
|
+ LOG.info("调用创建保证金微信支付订单(/paysale/createOrder)接口成功, apiResult:{}", apiResult);
|
|
|
return apiResult;
|
|
|
} else {
|
|
|
Result result = executeResult.getResult();
|
|
@@ -121,7 +121,7 @@ public class PaySaleController {
|
|
|
}
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
- LOG.error("调用创建保证金微信支付订单(/pay/createOrder)接口异常", e);
|
|
|
+ LOG.error("调用创建保证金微信支付订单(/paysale/createOrder)接口异常", e);
|
|
|
return ApiResult.createFailure();
|
|
|
}
|
|
|
|
|
@@ -134,7 +134,7 @@ public class PaySaleController {
|
|
|
*/
|
|
|
@GetMapping("/getOrderStatus")
|
|
|
public ApiResult queryOrderStatus(@RequestParam(required = false) String orderNo) {
|
|
|
- LOG.info("调用获取订单支付状态(/pay/getOrderStatus)接口, orderNo:{}", orderNo);
|
|
|
+ LOG.info("调用获取订单支付状态(/paysale/getOrderStatus)接口, orderNo:{}", orderNo);
|
|
|
|
|
|
if (StringUtils.isBlank(orderNo)) {
|
|
|
LOG.info("orderNo为空");
|
|
@@ -151,10 +151,10 @@ public class PaySaleController {
|
|
|
Map<String, Integer> data = new HashMap<>();
|
|
|
data.put("success", WeiXinPay.ORDER_STATUS_SUCCESS == weiXinPay.getOrderStatus() ? 1 : 0);
|
|
|
ApiResult<Map<String, Integer>> apiResult = ApiResult.createSuccess(data);
|
|
|
- LOG.info("调用获取订单支付状态(/pay/getOrderStatus)接口成功, apiResult:{}", apiResult);
|
|
|
+ LOG.info("调用获取订单支付状态(/paysale/getOrderStatus)接口成功, apiResult:{}", apiResult);
|
|
|
return apiResult;
|
|
|
} catch (Exception e) {
|
|
|
- LOG.info("调用获取订单支付状态(/pay/getOrderStatus)接口异常", e);
|
|
|
+ LOG.info("调用获取订单支付状态(/paysale/getOrderStatus)接口异常", e);
|
|
|
return ApiResult.createFailure();
|
|
|
}
|
|
|
|
|
@@ -167,13 +167,13 @@ public class PaySaleController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/callback")
|
|
|
public String callback(HttpServletRequest request) {
|
|
|
- LOG.info("调用微信支付订单回调(/pay/callback)接口");
|
|
|
+ LOG.info("调用微信支付订单回调(/paysale/callback)接口");
|
|
|
ServletInputStream inputStream;
|
|
|
|
|
|
try {
|
|
|
inputStream = request.getInputStream();
|
|
|
} catch (IOException e) {
|
|
|
- LOG.info("调用微信支付订单回调(/pay/callback)接口, 获取请求流异常", e);
|
|
|
+ LOG.info("调用微信支付订单回调(/paysale/callback)接口, 获取请求流异常", e);
|
|
|
return "";
|
|
|
}
|
|
|
|
|
@@ -184,7 +184,7 @@ public class PaySaleController {
|
|
|
outputStream.write(b);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
- LOG.error("调用微信支付订单回调(/pay/callback)接口, 读取请求流内容异常", e);
|
|
|
+ LOG.error("调用微信支付订单回调(/paysale/callback)接口, 读取请求流内容异常", e);
|
|
|
return "";
|
|
|
} finally {
|
|
|
try {
|
|
@@ -196,17 +196,17 @@ public class PaySaleController {
|
|
|
|
|
|
try {
|
|
|
String result = payService.payCallback(new String(outputStream.toByteArray(), StandardCharsets.UTF_8).trim());
|
|
|
- LOG.info("调用微信支付订单回调(/pay/callback)接口成功, result => {}", result);
|
|
|
+ LOG.info("调用微信支付订单回调(/paysale/callback)接口成功, result => {}", result);
|
|
|
return result;
|
|
|
} catch (Exception e) {
|
|
|
- LOG.info("调用微信支付订单回调(/pay/callback)接口异常", e);
|
|
|
+ LOG.info("调用微信支付订单回调(/paysale/callback)接口异常", e);
|
|
|
return "";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@PostMapping("/applyRefund")
|
|
|
public ApiResult applyRefund(@RequestParam String id) {
|
|
|
- LOG.info("调用微信申请退款(/pay/applyRefund)接口, id:{}", id);
|
|
|
+ LOG.info("调用微信申请退款(/paysale/applyRefund)接口, id:{}", id);
|
|
|
if (StringUtils.isBlank(id)) {
|
|
|
LOG.info("id为空");
|
|
|
return ApiResult.createFailure();
|
|
@@ -221,17 +221,17 @@ public class PaySaleController {
|
|
|
apiResult = ApiResult.createFailure();
|
|
|
apiResult.setMessage(executeResult.getData());
|
|
|
}
|
|
|
- LOG.info("调用微信申请退款(/pay/applyRefund)接口成功, apiResult:{}", apiResult);
|
|
|
+ LOG.info("调用微信申请退款(/paysale/applyRefund)接口成功, apiResult:{}", apiResult);
|
|
|
return apiResult;
|
|
|
} catch (Exception e) {
|
|
|
- LOG.error("调用微信申请退款(/pay/applyRefund)接口异常", e);
|
|
|
+ LOG.error("调用微信申请退款(/paysale/applyRefund)接口异常", e);
|
|
|
return ApiResult.createFailure();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@RequestMapping("/refund/{depositId}/callback/integral")
|
|
|
public String refundCallbackIntegral(@PathVariable String depositId, @RequestBody String xml) {
|
|
|
- LOG.info("调用微信退款回调(/refund/{appId}/{depositId}/callback)接口, depositId:{}, xml:{}", depositId, xml);
|
|
|
+ LOG.info("调用微信退款回调(paysale/refund/{appId}/{depositId}/callback)接口, depositId:{}, xml:{}", depositId, xml);
|
|
|
|
|
|
final String responseXml = "<xml><return_code>${result}</return_code><return_msg></return_msg></xml>";
|
|
|
|
|
@@ -247,10 +247,10 @@ public class PaySaleController {
|
|
|
|
|
|
try {
|
|
|
final String result = responseXml.replace("${result}", payService.refundCallback(depositId, xml));
|
|
|
- LOG.info("调用微信退款回调(/refund/{appId}/{depositId}/callback)接口成功, result:{}", result);
|
|
|
+ LOG.info("调用微信退款回调(paysale/refund/{appId}/{depositId}/callback)接口成功, result:{}", result);
|
|
|
return result;
|
|
|
} catch (Exception e) {
|
|
|
- LOG.info("调用微信退款回调(/refund/{appId}/{depositId}/callback)接口异常", e);
|
|
|
+ LOG.info("调用微信退款回调(paysale/refund/{appId}/{depositId}/callback)接口异常", e);
|
|
|
return responseXml.replace("${result}", "FAIL");
|
|
|
}
|
|
|
}
|