|
@@ -1,5 +1,6 @@
|
|
package com.ym.mec.biz.service.impl;
|
|
package com.ym.mec.biz.service.impl;
|
|
|
|
|
|
|
|
+import com.ym.mec.common.exception.BizException;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@@ -8,6 +9,12 @@ import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderDetail;
|
|
import com.ym.mec.biz.service.MusicGroupPaymentCalenderDetailService;
|
|
import com.ym.mec.biz.service.MusicGroupPaymentCalenderDetailService;
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
+
|
|
|
|
+import java.math.BigDecimal;
|
|
|
|
+import java.util.Date;
|
|
|
|
+
|
|
|
|
+import static com.ym.mec.biz.dal.entity.MusicGroupStudentFee.PaymentStatus.NON_PAYMENT;
|
|
|
|
|
|
@Service
|
|
@Service
|
|
public class MusicGroupPaymentCalenderDetailServiceImpl extends BaseServiceImpl<Long, MusicGroupPaymentCalenderDetail> implements MusicGroupPaymentCalenderDetailService {
|
|
public class MusicGroupPaymentCalenderDetailServiceImpl extends BaseServiceImpl<Long, MusicGroupPaymentCalenderDetail> implements MusicGroupPaymentCalenderDetailService {
|
|
@@ -19,5 +26,22 @@ public class MusicGroupPaymentCalenderDetailServiceImpl extends BaseServiceImpl<
|
|
public BaseDAO<Long, MusicGroupPaymentCalenderDetail> getDAO() {
|
|
public BaseDAO<Long, MusicGroupPaymentCalenderDetail> getDAO() {
|
|
return musicGroupPaymentCalenderDetailDao;
|
|
return musicGroupPaymentCalenderDetailDao;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
|
+ public void updateActualAmount(BigDecimal actualAmount, Long id) {
|
|
|
|
+ if(actualAmount == null || id == null){
|
|
|
|
+ throw new BizException("参数校验失败");
|
|
|
|
+ }
|
|
|
|
+ MusicGroupPaymentCalenderDetail calenderDetail = musicGroupPaymentCalenderDetailDao.get(id);
|
|
|
|
+ if(calenderDetail == null){
|
|
|
|
+ throw new BizException("缴费记录不存在");
|
|
|
|
+ }
|
|
|
|
+ if(calenderDetail.getPaymentStatus() == null || calenderDetail.getPaymentStatus() != NON_PAYMENT){
|
|
|
|
+ throw new BizException("修改失败,缴费状态异常");
|
|
|
|
+ }
|
|
|
|
+ calenderDetail.setActualAmount(actualAmount);
|
|
|
|
+ calenderDetail.setUpdateTime(new Date());
|
|
|
|
+ musicGroupPaymentCalenderDetailDao.update(calenderDetail);
|
|
|
|
+ }
|
|
}
|
|
}
|