|
@@ -51,6 +51,8 @@ public class YqPayController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private RenewalsService renewalsService;
|
|
|
+ @Autowired
|
|
|
+ private SchoolService schoolService;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -118,8 +120,9 @@ public class YqPayController extends BaseController {
|
|
|
order.setSdFee(adjunctPrice);
|
|
|
|
|
|
|
|
|
+ School school = schoolService.get(order.getClassId());
|
|
|
String notifyUrl = "http://47.99.212.176:9000/yqpay/notify"; //异步通知地址
|
|
|
- String returnUrl = "http://dev.dayaedu.com";//支付后返回页面
|
|
|
+ String returnUrl = "http://pay.dayaedu.com/login?schoolId=" + school.getId() + "&classId=" + order.getClassId() + "&cityId=" + school.getCityId();//支付后返回页面
|
|
|
String payUrl = "https://qyfapi.95epay.com/api/api/hPay/toPayHtml";//支付跳转页
|
|
|
String payChannels = "{\"weChatPay\":true,\"weChatPayMobile\":false,\"aliPay\":true,\"fastpayXy\":true,\"aliPayMobile\":false,\"balancePay\":false}";//支付方式配置
|
|
|
|
|
@@ -151,6 +154,7 @@ public class YqPayController extends BaseController {
|
|
|
List<Map> tempRoutingList = new ArrayList();
|
|
|
tempRoutingList.add(routingList);
|
|
|
|
|
|
+ order.setUAccount(account.getId().toString());
|
|
|
order.setAccount(routingMerNo);
|
|
|
|
|
|
//1、插入订单
|
|
@@ -218,7 +222,7 @@ public class YqPayController extends BaseController {
|
|
|
Integer buyCount = mecCourse4json.getBuyCount();
|
|
|
BigDecimal amount = new BigDecimal("0"); //课程总价
|
|
|
String remark = "";
|
|
|
- List<MecCourse> pickCourses = null;
|
|
|
+ List<MecCourse> pickCourses = new ArrayList<>();
|
|
|
for (int i = 0; i < courses.size(); i++) {
|
|
|
MecCourse course = courses.get(i);
|
|
|
if (mecCourse4json.getCourseId().equals(course.getCourseId().intValue())) {
|
|
@@ -235,8 +239,12 @@ public class YqPayController extends BaseController {
|
|
|
return failed("请选择续费课程");
|
|
|
}
|
|
|
|
|
|
+ School school = schoolService.get(pickCourses.get(0).getClassId());
|
|
|
+ if (school ==null){
|
|
|
+ return failed("报名学校不存在");
|
|
|
+ }
|
|
|
String notifyUrl = "http://47.99.212.176:9000/yqpay/notify"; //异步通知地址
|
|
|
- String returnUrl = "http://dev.dayaedu.com";//支付后返回页面
|
|
|
+ String returnUrl = "http://pay.dayaedu.com/login?schoolId=" + school.getId() + "&classId=" + pickCourses.get(0).getClassId() + "&cityId=" + school.getCityId();//支付后返回页面
|
|
|
String payUrl = "https://qyfapi.95epay.com/api/api/hPay/toPayHtml";//支付跳转页
|
|
|
String payChannels = "{\"weChatPay\":true,\"weChatPayMobile\":false,\"aliPay\":true,\"fastpayXy\":true,\"aliPayMobile\":false,\"balancePay\":false}";//支付方式配置
|
|
|
|
|
@@ -265,7 +273,7 @@ public class YqPayController extends BaseController {
|
|
|
List<Map> tempRoutingList = new ArrayList();
|
|
|
tempRoutingList.add(routingList);
|
|
|
|
|
|
- renewalsService.addRenewalsOrder(renewals, amount, orderNo, pickCourses, routingMerNo, remark);
|
|
|
+ renewalsService.addRenewalsOrder(renewals, amount, orderNo, pickCourses, routingMerNo,account.getId(), remark);
|
|
|
|
|
|
/*订单信息*/
|
|
|
String orderBody = "大雅乐盟培训课程";
|