|
@@ -2,6 +2,7 @@ package com.ym.mec.student.controller;
|
|
|
|
|
|
import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
+import com.ym.mec.biz.dal.dao.MusicGroupPaymentCalenderDao;
|
|
|
import com.ym.mec.biz.dal.dao.MusicGroupPaymentCalenderDetailDao;
|
|
|
import com.ym.mec.biz.dal.dao.MusicGroupStudentFeeDao;
|
|
|
import com.ym.mec.biz.dal.dto.RegisterPayDto;
|
|
@@ -53,6 +54,8 @@ public class MusicGroupController extends BaseController {
|
|
|
private StudentPaymentOrderDetailService studentPaymentOrderDetailService;
|
|
|
@Autowired
|
|
|
private MusicGroupPaymentCalenderDetailDao musicGroupPaymentCalenderDetailDao;
|
|
|
+ @Autowired
|
|
|
+ private MusicGroupPaymentCalenderDao musicGroupPaymentCalenderDao;
|
|
|
|
|
|
@ApiOperation("获取学生所在乐团列表")
|
|
|
@GetMapping(value = "/queryUserMusicGroups")
|
|
@@ -158,7 +161,9 @@ public class MusicGroupController extends BaseController {
|
|
|
}
|
|
|
MusicGroupPaymentCalenderDetail userLastCalenderDetail = musicGroupPaymentCalenderDetailDao.getUserLastCalenderDetail(musicGroupId, userId);
|
|
|
if(userLastCalenderDetail == null){
|
|
|
- throw new BizException("当前续费时间已截止,请联系指导老师");
|
|
|
+ MusicGroupPaymentCalender lastCalender = musicGroupPaymentCalenderDao.getLastStartOne(musicGroupId);
|
|
|
+ String tips = (lastCalender != null && lastCalender.getPaymentStatus().equals(PaymentStatusEnum.YES))?"当前续费时间已截止,如有问题请联系指导老师":"当前续费未开始,如有问题请联系指导老师";
|
|
|
+ throw new BizException(tips);
|
|
|
}
|
|
|
|
|
|
BigDecimal amount = userLastCalenderDetail.getExpectAmount();
|
|
@@ -200,7 +205,9 @@ public class MusicGroupController extends BaseController {
|
|
|
}
|
|
|
MusicGroupPaymentCalenderDetail userLastCalenderDetail = musicGroupPaymentCalenderDetailDao.getUserLastCalenderDetail(musicGroupId, userId);
|
|
|
if(userLastCalenderDetail == null){
|
|
|
- throw new BizException("当前续费时间已截止,请联系指导老师");
|
|
|
+ MusicGroupPaymentCalender lastCalender = musicGroupPaymentCalenderDao.getLastStartOne(musicGroupId);
|
|
|
+ String tips = (lastCalender != null && lastCalender.getPaymentStatus().equals(PaymentStatusEnum.YES))?"当前续费时间已截止,如有问题请联系指导老师":"当前续费未开始,如有问题请联系指导老师";
|
|
|
+ throw new BizException(tips);
|
|
|
}
|
|
|
return succeed(musicGroupService.renew(musicGroupId, userId, isUseBalancePayment));
|
|
|
}
|