|
@@ -4017,6 +4017,10 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
|
return BaseController.succeed();
|
|
|
}
|
|
|
|
|
|
+ public static void main(String[] args) {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public void pushStudyReport(Date expiredDate, String pushType) {
|
|
|
if (Objects.isNull(expiredDate)) {
|
|
@@ -4026,9 +4030,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
|
if (StringUtils.isBlank(pushType)) {
|
|
|
throw new BizException("请指定推送类型:JIGUANG、SMS、ALL");
|
|
|
}
|
|
|
- Integer tenantId = TenantContextHolder.getTenantId();
|
|
|
-
|
|
|
- List<CourseScheduleEvaluate> reports = courseScheduleEvaluateDao.findExpiredDateBeforeReport(expiredDate, tenantId);
|
|
|
+ List<CourseScheduleEvaluate> reports = courseScheduleEvaluateDao.findExpiredDateBeforeReport(expiredDate);
|
|
|
|
|
|
if (CollectionUtils.isEmpty(reports)) {
|
|
|
return;
|
|
@@ -4041,36 +4043,28 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
|
if (Objects.isNull(userFreePracticeGroup)) {
|
|
|
continue;
|
|
|
}
|
|
|
-// ClassGroup classGroup = classGroupDao.findByMusicGroupAndType(userFreePracticeGroup.getId().toString(), GroupType.PRACTICE.getCode());
|
|
|
-//
|
|
|
-// CourseScheduleEvaluate courseScheduleEvaluate = courseScheduleEvaluateDao.findByClassGroupId(classGroup.getId());
|
|
|
-// if(Objects.isNull(courseScheduleEvaluate)){
|
|
|
-// continue;
|
|
|
-// }
|
|
|
-
|
|
|
- String pushUrl = baseApiUrl + "/#/reportDetail?classGroupId=" + report.getClassGroupId();
|
|
|
- String smsUrl = baseApiUrl + "/#/transfer?url=" + baseApiUrl + "&hash=reportDetail&classGroupId=" + report.getClassGroupId();
|
|
|
-
|
|
|
+ StringBuffer pushUrl = new StringBuffer(baseApiUrl);
|
|
|
+ StringBuffer smsUrl = new StringBuffer(baseApiUrl);
|
|
|
if (report.getVersion().equals(2)) {
|
|
|
- pushUrl = baseApiUrl + "/#/reportDetailNew?id=" + report.getId() + "&classGroupId=" + report.getClassGroupId();
|
|
|
- smsUrl = baseApiUrl + "/#/transfer?url=" + baseApiUrl + "&hash=reportDetailNew&id=" + report.getId() + "&classGroupId=" + report.getClassGroupId();
|
|
|
+ pushUrl.append("/#/reportDetailNew?id=").append(report.getId()).append("&classGroupId=").append(report.getClassGroupId());
|
|
|
+ smsUrl.append("/#/transfer?url=").append(baseApiUrl).append("&hash=reportDetailNew&id=").append(report.getId()).append("&classGroupId=").append(report.getClassGroupId());
|
|
|
+ }else {
|
|
|
+ pushUrl.append("/#/reportDetail?classGroupId=").append(report.getClassGroupId());
|
|
|
+ smsUrl.append("/#/transfer?url=").append(baseApiUrl).append("&hash=reportDetail&classGroupId=").append(report.getClassGroupId());
|
|
|
}
|
|
|
-
|
|
|
-// SysUser student = sysUserFeignService.queryUserById(userFreePracticeGroup.getStudentId());
|
|
|
SysUser student = teacherDao.getUser(userFreePracticeGroup.getStudentId());
|
|
|
-
|
|
|
if (pushType.equals("ALL") || pushType.equals("JIGUANG")) {
|
|
|
Map<Integer, String> userMap = new HashMap<>();
|
|
|
userMap.put(userFreePracticeGroup.getStudentId(), userFreePracticeGroup.getStudentId().toString());
|
|
|
sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.STUDENT_SMS_PUSH_PRACTICE_COMPLETED_STUDY_REPORT,
|
|
|
- userMap, null, 0, "5?" + pushUrl, "STUDENT", pushUrl);
|
|
|
+ userMap, null, 0, pushUrl.insert(0,"5?").toString(), "STUDENT", pushUrl.toString());
|
|
|
}
|
|
|
|
|
|
if (pushType.equals("ALL") || pushType.equals("SMS")) {
|
|
|
Map<Integer, String> userPhoneMap = new HashMap<>();
|
|
|
userPhoneMap.put(userFreePracticeGroup.getStudentId(), student.getPhone());
|
|
|
sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.AWSMS, MessageTypeEnum.STUDENT_SMS_PUSH_PRACTICE_COMPLETED_STUDY_REPORT,
|
|
|
- userPhoneMap, null, 0, null, "STUDENT", HttpUtil.getSortUrl(smsUrl));
|
|
|
+ userPhoneMap, null, 0, null, "STUDENT", HttpUtil.getSortUrl(smsUrl.toString()));
|
|
|
}
|
|
|
report.setIsPushed(1);
|
|
|
courseScheduleEvaluateDao.update(report);
|
|
@@ -5083,6 +5077,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
|
throw new BizException("未找到此课程");
|
|
|
}
|
|
|
VipGroupPayInfoDto vipGroupPayInfo = new VipGroupPayInfoDto();
|
|
|
+ vipGroupPayInfo.setTenantId(practiceGroup.getTenantId());
|
|
|
vipGroupPayInfo.setVipGroupId(practiceGroupId.intValue());
|
|
|
vipGroupPayInfo.setViipGroupName(practiceGroup.getName());
|
|
|
vipGroupPayInfo.setPrice(practiceGroup.getTotalPrice());
|