|
@@ -551,14 +551,18 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ String orderSubject = "乐团报名";
|
|
|
+ if(musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType().equals(CooperationOrgan.OwnershipType.COOPERATION)){
|
|
|
+ orderSubject = "乐团相关费用";
|
|
|
+ }
|
|
|
String baseApiUrl = sysConfigDao.findConfigValue("base_api_url");
|
|
|
Map payMap = payService.getPayMap(
|
|
|
amount,
|
|
|
orderNo,
|
|
|
baseApiUrl + "/api-student/studentOrder/notify",
|
|
|
baseApiUrl + "/api-student/studentOrder/paymentResult?orderNo=" + orderNo,
|
|
|
- "乐团报名",
|
|
|
- "乐团报名",
|
|
|
+ orderSubject,
|
|
|
+ orderSubject,
|
|
|
userId,
|
|
|
classFee,
|
|
|
musicGroup.getOrganId()
|
|
@@ -741,15 +745,18 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ String orderSubject = "乐团报名";
|
|
|
+ if(musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType().equals(CooperationOrgan.OwnershipType.COOPERATION)){
|
|
|
+ orderSubject = "乐团相关费用";
|
|
|
+ }
|
|
|
String baseApiUrl = sysConfigDao.findConfigValue("base_api_url");
|
|
|
Map payMap = payService.getPayMap(
|
|
|
amount,
|
|
|
orderNo,
|
|
|
baseApiUrl + "/api-student/studentOrder/notify",
|
|
|
baseApiUrl + "/api-student/studentOrder/paymentResult?orderNo=" + orderNo,
|
|
|
- "乐团报名",
|
|
|
- "乐团报名",
|
|
|
+ orderSubject,
|
|
|
+ orderSubject,
|
|
|
userId,
|
|
|
classFee,
|
|
|
musicGroup.getOrganId()
|
|
@@ -946,15 +953,17 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
@Override
|
|
|
public void pushMessage(String musicGroupId) throws IOException {
|
|
|
MusicGroup musicGroup = musicGroupDao.get(musicGroupId);
|
|
|
- //3.0发送该消息
|
|
|
- if (new Integer(3).equals(musicGroup.getChargeTypeId())) {
|
|
|
- Map<Integer, String> studentMap = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertMybatisMap(studentRegistrationDao.findIdMapByMusicGroupId(musicGroupId, 2))), HashMap.class);
|
|
|
- if (studentMap != null && studentMap.size() > 0) {
|
|
|
- String baseURL = sysConfigDao.findConfigValue(SysConfigService.BASE_API_URL);
|
|
|
- String url = baseURL + "/#/smallRegister?musicGroupId=" + musicGroupId;
|
|
|
- String serverPhone = sysConfigDao.findConfigValue(SysConfigService.SERVER_PHONE);
|
|
|
- sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.SMS_BASICS_SKILL_APPLY_MESSAGE,
|
|
|
- studentMap, null, 0, "5?" + url, musicGroup.getName(), HttpUtil.getSortUrl(url), serverPhone);
|
|
|
+ if(musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType() == CooperationOrgan.OwnershipType.OWN){
|
|
|
+ //3.0发送该消息
|
|
|
+ if (new Integer(3).equals(musicGroup.getChargeTypeId())) {
|
|
|
+ Map<Integer, String> studentMap = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertMybatisMap(studentRegistrationDao.findIdMapByMusicGroupId(musicGroupId, 2))), HashMap.class);
|
|
|
+ if (studentMap != null && studentMap.size() > 0) {
|
|
|
+ String baseURL = sysConfigDao.findConfigValue(SysConfigService.BASE_API_URL);
|
|
|
+ String url = baseURL + "/#/smallRegister?musicGroupId=" + musicGroupId;
|
|
|
+ String serverPhone = sysConfigDao.findConfigValue(SysConfigService.SERVER_PHONE);
|
|
|
+ sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.SMS_BASICS_SKILL_APPLY_MESSAGE,
|
|
|
+ studentMap, null, 0, "5?" + url, musicGroup.getName(), HttpUtil.getSortUrl(url), serverPhone);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1055,14 +1064,16 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
+ musicGroupId, "", PlatformCashAccountDetailTypeEnum.REFUNDS, null, DealStatusEnum.SUCCESS, "取消乐团");
|
|
|
}
|
|
|
//获取当前乐团所有已报名学员
|
|
|
- List<StudentRegistration> registrations = studentRegistrationDao.findClassGroupStu(musicGroupId, null);
|
|
|
- if (registrations != null && registrations.size() > 0) {
|
|
|
- Map<Integer, String> map = new HashMap<>(registrations.size());
|
|
|
- registrations.forEach(e -> {
|
|
|
- map.put(e.getUserId(), e.getUserId().toString());
|
|
|
- });
|
|
|
- sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.STUDENT_PUSH_MUSIC_GROUP_CLOSE,
|
|
|
- map, null, 0, "1", musicGroup.getName(), sysConfigDao.findConfigValue(SysConfigService.REFUND_PERIOD));
|
|
|
+ if(musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType() == CooperationOrgan.OwnershipType.OWN){
|
|
|
+ List<StudentRegistration> registrations = studentRegistrationDao.findClassGroupStu(musicGroupId, null);
|
|
|
+ if (registrations != null && registrations.size() > 0) {
|
|
|
+ Map<Integer, String> map = new HashMap<>(registrations.size());
|
|
|
+ registrations.forEach(e -> {
|
|
|
+ map.put(e.getUserId(), e.getUserId().toString());
|
|
|
+ });
|
|
|
+ sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.STUDENT_PUSH_MUSIC_GROUP_CLOSE,
|
|
|
+ map, null, 0, "1", musicGroup.getName(), sysConfigDao.findConfigValue(SysConfigService.REFUND_PERIOD));
|
|
|
+ }
|
|
|
}
|
|
|
//记录建团日志
|
|
|
musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "取消乐团", sysUser.getId(), ""));
|
|
@@ -1608,12 +1619,14 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
paymentDetail.setComAmount(studentPaymentOrder.getComAmount().negate());
|
|
|
paymentDetail.setPerAmount(studentPaymentOrder.getPerAmount().negate());
|
|
|
sysUserCashAccountDetailService.insert(paymentDetail);
|
|
|
-
|
|
|
- // 发送续费结果通知
|
|
|
- sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.STUDENT_SMS_MUSIC_GROUP_RENEW_SUCCESS, push, null, 0, "1",
|
|
|
- studentRegistration.getParentsName(), studentPaymentOrder.getActualAmount());
|
|
|
- sysMessageService.batchSendMessage(MessageSender.YIMEI, MessageTypeEnum.STUDENT_SMS_MUSIC_GROUP_RENEW_SUCCESS, yimei, null, 0, "1",
|
|
|
- studentRegistration.getParentsName(), studentPaymentOrder.getActualAmount());
|
|
|
+ MusicGroup musicGroup = musicGroupDao.get(musicGroupId);
|
|
|
+ if(musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType() == CooperationOrgan.OwnershipType.OWN){
|
|
|
+ // 发送续费结果通知
|
|
|
+ sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.STUDENT_SMS_MUSIC_GROUP_RENEW_SUCCESS, push, null, 0, "1",
|
|
|
+ studentRegistration.getParentsName(), studentPaymentOrder.getActualAmount());
|
|
|
+ sysMessageService.batchSendMessage(MessageSender.YIMEI, MessageTypeEnum.STUDENT_SMS_MUSIC_GROUP_RENEW_SUCCESS, yimei, null, 0, "1",
|
|
|
+ studentRegistration.getParentsName(), studentPaymentOrder.getActualAmount());
|
|
|
+ }
|
|
|
return true;
|
|
|
} else {
|
|
|
if (studentPaymentOrder.getBalancePaymentAmount() != null && studentPaymentOrder.getBalancePaymentAmount().doubleValue() > 0) {
|
|
@@ -1621,13 +1634,16 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
"乐团续费失败");
|
|
|
}
|
|
|
}
|
|
|
- if (studentPaymentOrder.getStatus() == DealStatusEnum.CLOSE || studentPaymentOrder.getStatus() == DealStatusEnum.FAILED) {
|
|
|
- String baseUrl = sysConfigDao.findConfigValue(SysConfigService.BASE_API_URL);
|
|
|
- String memo = baseUrl + "/#/renew?musicGroupId=" + musicGroupId;
|
|
|
- //4?http://mstudev.dayaedu.com/#/renew?musicGroupId=" +musicGroupId
|
|
|
- sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.STUDENT_PUSH_MUSIC_GROUP_RENEW_FAILED, push, null, 0, "4?" + memo,
|
|
|
- HttpUtil.getSortUrl(memo));
|
|
|
- return false;
|
|
|
+ MusicGroup musicGroup = musicGroupDao.get(musicGroupId);
|
|
|
+ if(musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType() == CooperationOrgan.OwnershipType.OWN){
|
|
|
+ if (studentPaymentOrder.getStatus() == DealStatusEnum.CLOSE || studentPaymentOrder.getStatus() == DealStatusEnum.FAILED) {
|
|
|
+ String baseUrl = sysConfigDao.findConfigValue(SysConfigService.BASE_API_URL);
|
|
|
+ String memo = baseUrl + "/#/renew?musicGroupId=" + musicGroupId;
|
|
|
+ //4?http://mstudev.dayaedu.com/#/renew?musicGroupId=" +musicGroupId
|
|
|
+ sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.STUDENT_PUSH_MUSIC_GROUP_RENEW_FAILED, push, null, 0, "4?" + memo,
|
|
|
+ HttpUtil.getSortUrl(memo));
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
@@ -1951,24 +1967,25 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, event, sysUser.getId(), ""));
|
|
|
musicGroup.setStatus(MusicGroupStatusEnum.PREPARE);
|
|
|
musicGroupDao.update(musicGroup);
|
|
|
- //给家长发送乐团基础训练课短信
|
|
|
- //获取所有乐团学员列表
|
|
|
- List<StudentRegistration> students = studentRegistrationDao.queryStudentByMusicGroupId(musicGroupId);
|
|
|
- if (students != null && students.size() > 0) {
|
|
|
- // 获取所有家长电话
|
|
|
- Set<String> parentsPhones = students.stream().map(StudentRegistration::getParentsPhone).collect(Collectors.toSet());
|
|
|
- // 获取对应家长的用户编号
|
|
|
- Map<Integer, String> userIds = MapUtil.convertMybatisMap(studentRegistrationDao.findParentId(StringUtils.join(parentsPhones, ",")));
|
|
|
- userIds = JSONObject.parseObject(JSONObject.toJSONString(userIds), HashMap.class);
|
|
|
- if (userIds != null && userIds.size() > 0) {
|
|
|
- String studentApplyUrl = sysConfigDao.findConfigValue(SysConfigService.STUDENT_APPLY_URL) + musicGroupId;
|
|
|
- String serverPhone = sysConfigDao.findConfigValue(SysConfigService.SERVER_PHONE);
|
|
|
- sysMessageService.batchSendMessage(MessageSender.YIMEI, MessageTypeEnum.SMS_BASICS_SKILL_APPLY_MESSAGE, userIds, null, 0, "", musicGroup.getName(), studentApplyUrl, serverPhone);
|
|
|
+ if(musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType() == CooperationOrgan.OwnershipType.OWN){
|
|
|
+ //给家长发送乐团基础训练课短信
|
|
|
+ //获取所有乐团学员列表
|
|
|
+ List<StudentRegistration> students = studentRegistrationDao.queryStudentByMusicGroupId(musicGroupId);
|
|
|
+ if (students != null && students.size() > 0) {
|
|
|
+ // 获取所有家长电话
|
|
|
+ Set<String> parentsPhones = students.stream().map(StudentRegistration::getParentsPhone).collect(Collectors.toSet());
|
|
|
+ // 获取对应家长的用户编号
|
|
|
+ Map<Integer, String> userIds = MapUtil.convertMybatisMap(studentRegistrationDao.findParentId(StringUtils.join(parentsPhones, ",")));
|
|
|
+ userIds = JSONObject.parseObject(JSONObject.toJSONString(userIds), HashMap.class);
|
|
|
+ if (userIds != null && userIds.size() > 0) {
|
|
|
+ String studentApplyUrl = sysConfigDao.findConfigValue(SysConfigService.STUDENT_APPLY_URL) + musicGroupId;
|
|
|
+ String serverPhone = sysConfigDao.findConfigValue(SysConfigService.SERVER_PHONE);
|
|
|
+ sysMessageService.batchSendMessage(MessageSender.YIMEI, MessageTypeEnum.SMS_BASICS_SKILL_APPLY_MESSAGE, userIds, null, 0, "", musicGroup.getName(), studentApplyUrl, serverPhone);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
Set<Integer> roleIds = new HashSet<>(1);
|
|
|
roleIds.add(SysUserRole.SECTION_MANAGER);
|
|
|
-
|
|
|
sysMessageService.batchSeoMessage(musicGroupDao.queryUserIdByRoleId(roleIds,musicGroup.getOrganId()),MessageTypeEnum.BACKSTAGE_MUSIC_GROUP_MARKING,"",musicGroup.getName());
|
|
|
}
|
|
|
}
|