|
@@ -15,6 +15,7 @@ import java.util.stream.Collectors;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
+import com.ym.mec.biz.dal.entity.*;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -39,21 +40,6 @@ import com.ym.mec.biz.dal.dto.StudentAddDto;
|
|
|
import com.ym.mec.biz.dal.dto.StudentApplyDetailDto;
|
|
|
import com.ym.mec.biz.dal.dto.StudentFeeDetailDto;
|
|
|
import com.ym.mec.biz.dal.dto.StudentInfo;
|
|
|
-import com.ym.mec.biz.dal.entity.ClassGroup;
|
|
|
-import com.ym.mec.biz.dal.entity.ClassGroupStudentMapper;
|
|
|
-import com.ym.mec.biz.dal.entity.CourseSchedule;
|
|
|
-import com.ym.mec.biz.dal.entity.CourseScheduleStudentPayment;
|
|
|
-import com.ym.mec.biz.dal.entity.Goods;
|
|
|
-import com.ym.mec.biz.dal.entity.MusicGroup;
|
|
|
-import com.ym.mec.biz.dal.entity.MusicGroupStudentFee;
|
|
|
-import com.ym.mec.biz.dal.entity.MusicGroupSubjectGoodsGroup;
|
|
|
-import com.ym.mec.biz.dal.entity.MusicGroupSubjectPlan;
|
|
|
-import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
|
|
|
-import com.ym.mec.biz.dal.entity.StudentPaymentOrderDetail;
|
|
|
-import com.ym.mec.biz.dal.entity.StudentRegistration;
|
|
|
-import com.ym.mec.biz.dal.entity.Subject;
|
|
|
-import com.ym.mec.biz.dal.entity.SysUserCashAccount;
|
|
|
-import com.ym.mec.biz.dal.entity.SysUserCashAccountDetail;
|
|
|
import com.ym.mec.biz.dal.enums.ClassGroupStudentStatusEnum;
|
|
|
import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
|
|
|
import com.ym.mec.biz.dal.enums.DealStatusEnum;
|
|
@@ -848,19 +834,22 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
|
|
|
sysUserCashAccountDetailService.insert(paymentDetail);
|
|
|
|
|
|
- //发送缴费成功通知(短信 + push)
|
|
|
- Map<Integer, String> map = new HashMap<>(1);
|
|
|
- map.put(studentPaymentOrder.getUserId(), studentRegistration.getParentsPhone());
|
|
|
- sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.YIMEI,
|
|
|
- MessageTypeEnum.STUDENT_SMS_PAYMENT_SUCCESS, map, null, 0, "1",
|
|
|
- studentRegistration.getParentsName(), studentPaymentOrder.getActualAmount());
|
|
|
- //push
|
|
|
- Map<Integer, String> map1 = new HashMap<>(1);
|
|
|
- map1.put(studentPaymentOrder.getUserId(), studentPaymentOrder.getUserId().toString());
|
|
|
- sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG,
|
|
|
- MessageTypeEnum.STUDENT_SMS_PAYMENT_SUCCESS, map1, null, 0, "1",
|
|
|
- studentRegistration.getParentsName(), studentPaymentOrder.getActualAmount());
|
|
|
-
|
|
|
+ MusicGroup musicGroup = musicGroupDao.get(studentRegistration.getMusicGroupId());
|
|
|
+ //三方乐团不发送缴费通知
|
|
|
+ if(musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType() == CooperationOrgan.OwnershipType.OWN){
|
|
|
+ //发送缴费成功通知(短信 + push)
|
|
|
+ Map<Integer, String> map = new HashMap<>(1);
|
|
|
+ map.put(studentPaymentOrder.getUserId(), studentRegistration.getParentsPhone());
|
|
|
+ sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.YIMEI,
|
|
|
+ MessageTypeEnum.STUDENT_SMS_PAYMENT_SUCCESS, map, null, 0, "1",
|
|
|
+ studentRegistration.getParentsName(), studentPaymentOrder.getActualAmount());
|
|
|
+ //push
|
|
|
+ Map<Integer, String> map1 = new HashMap<>(1);
|
|
|
+ map1.put(studentPaymentOrder.getUserId(), studentPaymentOrder.getUserId().toString());
|
|
|
+ sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG,
|
|
|
+ MessageTypeEnum.STUDENT_SMS_PAYMENT_SUCCESS, map1, null, 0, "1",
|
|
|
+ studentRegistration.getParentsName(), studentPaymentOrder.getActualAmount());
|
|
|
+ }
|
|
|
// //生成课程协议
|
|
|
try {
|
|
|
contractService.transferMusicGroupCoursesContract(studentRegistration.getUserId(), studentRegistration.getMusicGroupId());
|
|
@@ -890,15 +879,16 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
if(studentPaymentOrder.getBalancePaymentAmount() != null && studentPaymentOrder.getBalancePaymentAmount().compareTo(BigDecimal.ZERO) >0 ){
|
|
|
sysUserCashAccountService.updateBalance(studentPaymentOrder.getUserId(), studentPaymentOrder.getBalancePaymentAmount(),PlatformCashAccountDetailTypeEnum.REFUNDS,"报名缴费失败");
|
|
|
}
|
|
|
-
|
|
|
- //发送缴费成功通知(短信 + push)
|
|
|
- String studentApplyUrl = sysConfigDao.findConfigValue(SysConfigService.STUDENT_APPLY_URL) + studentRegistration.getMusicGroupId();
|
|
|
-
|
|
|
- Map<Integer, String> map = new HashMap<>(1);
|
|
|
- map.put(studentPaymentOrder.getUserId(), studentRegistration.getParentsPhone());
|
|
|
- sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.YIMEI,
|
|
|
- MessageTypeEnum.STUDENT_SMS_PAYMENT_FAILED, map, null, 0, "1",
|
|
|
- HttpUtil.getSortUrl(studentApplyUrl));
|
|
|
+ MusicGroup musicGroup = musicGroupDao.get(studentRegistration.getMusicGroupId());
|
|
|
+ //三方乐团不发送缴费通知
|
|
|
+ if(musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType() == CooperationOrgan.OwnershipType.OWN){
|
|
|
+ String studentApplyUrl = sysConfigDao.findConfigValue(SysConfigService.STUDENT_APPLY_URL) + studentRegistration.getMusicGroupId();
|
|
|
+ Map<Integer, String> map = new HashMap<>(1);
|
|
|
+ map.put(studentPaymentOrder.getUserId(), studentRegistration.getParentsPhone());
|
|
|
+ sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.YIMEI,
|
|
|
+ MessageTypeEnum.STUDENT_SMS_PAYMENT_FAILED, map, null, 0, "1",
|
|
|
+ HttpUtil.getSortUrl(studentApplyUrl));
|
|
|
+ }
|
|
|
// sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG,
|
|
|
// MessageTypeEnum.STUDENT_SMS_PAYMENT_FAILED,map,null,0,"1",
|
|
|
// studentApplyUrl);
|