zouxuan 5 years ago
parent
commit
c781f62a67

+ 4 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderDetailServiceImpl.java

@@ -65,7 +65,7 @@ public class MusicGroupPaymentCalenderDetailServiceImpl extends BaseServiceImpl<
 			if(e.getPaymentStatus() == null || e.getPaymentStatus() != NON_PAYMENT){
 				throw new BizException("修改失败,缴费状态不匹配");
 			}
-			if(compare == 1){
+			if(expectAmount.intValue() == 0){
 				e.setPaymentStatus(PAID_COMPLETED);
 			}
 			e.setUpdateTime(date);
@@ -74,9 +74,11 @@ public class MusicGroupPaymentCalenderDetailServiceImpl extends BaseServiceImpl<
 		//如果是设置为0元
 		MusicGroupPaymentCalender calender = musicGroupPaymentCalenderDao.get(calenderDetails.get(0).getMusicGroupPaymentCalenderId());
 		if(calender.getType() == ONLINE){
+			//剩余网管课可购买次数加一
 			musicGroupStudentFeeDao.remainNetworkClassTimesAdd(ids);
 		}
-		if(compare == 1){
+		if(expectAmount.intValue() == 0){
+			//缴费完成
 			musicGroupStudentFeeDao.setPaidCompleted(calenderDetails);
 		}
 		musicGroupPaymentCalenderDetailDao.batchUpdate(calenderDetails);