|
@@ -204,7 +204,7 @@ public class YqPayController extends BaseController {
|
|
|
renewals.setBranchId(mecUser.getBranchId());
|
|
|
|
|
|
//课程组价格
|
|
|
- ArrayList<MecCourse> courses = (ArrayList<MecCourse>) applyInfoService.queryUserCourse(renewals.getUserId());//获取续费课程
|
|
|
+ List<MecCourse> courses = applyInfoService.queryUserCourse(renewals.getUserId());//获取续费课程
|
|
|
MecCourse mecCourse4json = JSON.parseObject(renewals.getCourses(), MecCourse.class);
|
|
|
if (mecCourse4json == null) {
|
|
|
return failed("请选择续费课程");
|
|
@@ -216,12 +216,10 @@ public class YqPayController extends BaseController {
|
|
|
String remark = "";
|
|
|
for (int i = 0; i < courses.size(); i++) {
|
|
|
MecCourse course = courses.get(i);
|
|
|
- if (mecCourse4json.getCourseId().equals(course.getCourseId())) {
|
|
|
- BigDecimal price = course.getClassType() == 1 ? course.getPrice().multiply(BigDecimal.valueOf(buyCount)) : course.getPrice().multiply(BigDecimal.valueOf(course.getBuyCount()));
|
|
|
+ if (mecCourse4json.getCourseId().equals(course.getCourseId().intValue())) {
|
|
|
+ BigDecimal price = course.getClassType().equals(1)? course.getPrice().multiply(BigDecimal.valueOf(buyCount)) : course.getPrice().multiply(BigDecimal.valueOf(course.getBuyCount()));
|
|
|
amount = amount.add(price);
|
|
|
remark += course.getClassName();
|
|
|
- } else {
|
|
|
- courses.remove(i);
|
|
|
}
|
|
|
}
|
|
|
if (courses.size() == 0) {
|
|
@@ -494,7 +492,7 @@ public class YqPayController extends BaseController {
|
|
|
order.setPay(order.getAmount());
|
|
|
order.setPayTime(new Date());
|
|
|
//推送mec
|
|
|
- if(order.getTuiFee() != null){
|
|
|
+ if (order.getTuiFee() != null) {
|
|
|
ApplyInfo applyInfo = applyInfoService.get(order.getUserId());
|
|
|
applyInfoService.userRegister(applyInfo.getPatriarchPhone()); //推送mec
|
|
|
}
|