|
|
@@ -6,7 +6,9 @@ import org.springblade.common.enums.AppConstant;
|
|
|
import org.springblade.common.enums.PaymentScene;
|
|
|
import org.springblade.common.enums.PaymentType;
|
|
|
import org.springblade.common.enums.ResCode;
|
|
|
+import org.springblade.core.log.annotation.ApiLog;
|
|
|
import org.springblade.core.log.exception.ServiceException;
|
|
|
+import org.springblade.core.log.logger.BladeLogger;
|
|
|
import org.springblade.core.tool.api.R;
|
|
|
import org.springblade.payment.callback.inivtation.InvitationCallback;
|
|
|
import org.springblade.payment.entity.PayParam;
|
|
|
@@ -35,6 +37,8 @@ public class PaymentController {
|
|
|
|
|
|
@Autowired
|
|
|
YeePayService yeePayService;
|
|
|
+ @Autowired
|
|
|
+ BladeLogger bladeLogger;
|
|
|
|
|
|
@ApiOperation("订单支付")
|
|
|
@GetMapping("/payOrder/{paymentType}/{paymentScene}")
|
|
|
@@ -68,30 +72,33 @@ public class PaymentController {
|
|
|
return R.data(PaymentType.values());
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ @ApiLog
|
|
|
@ApiOperation(value = "支付回调")
|
|
|
@RequestMapping(value = "/callback/{paymentType}", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
public String callback(HttpServletRequest request, @PathVariable String paymentType) {
|
|
|
- System.out.println("我是回调:");
|
|
|
+ bladeLogger.info(paymentType + "支付回调", request.getParameterMap().toString());
|
|
|
//获取支付插件
|
|
|
Payment payment = pluginBuild(paymentType);
|
|
|
payment.callback(request);
|
|
|
return "SUCCESS";
|
|
|
}
|
|
|
|
|
|
+ @ApiLog
|
|
|
@ApiOperation(value = "清算回调")
|
|
|
@RequestMapping(value = "/csurl/{paymentType}", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
public String csBack(HttpServletRequest request, @PathVariable String paymentType) {
|
|
|
- System.out.println("我是清算回调:");
|
|
|
+ bladeLogger.info(paymentType + "清算回调", request.getParameterMap().toString());
|
|
|
//获取支付插件
|
|
|
Payment payment = pluginBuild(paymentType);
|
|
|
payment.csUrl(request);
|
|
|
return "SUCCESS";
|
|
|
}
|
|
|
|
|
|
+ @ApiLog
|
|
|
@ApiOperation(value = "入驻回调")
|
|
|
@RequestMapping(value = "/invitation/callback/{invitationType}", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
public String invitationCallback(HttpServletRequest request, @PathVariable String invitationType) {
|
|
|
+ bladeLogger.info(invitationType + "入驻回调", request.getParameterMap().toString());
|
|
|
AppConstant.InvitationType type = AppConstant.InvitationType.valueOf(invitationType);
|
|
|
new InvitationCallback().handle(request, type);
|
|
|
return "SUCCESS";
|