|
@@ -222,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())) {
|
|
@@ -240,6 +240,9 @@ public class YqPayController extends BaseController {
|
|
|
}
|
|
|
|
|
|
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://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";//支付跳转页
|