瀏覽代碼

Merge branch 'yonge' of http://git.dayaedu.com/yonge/mec into yonge

zouxuan 5 年之前
父節點
當前提交
81722b8b34

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/ClassGroup.java

@@ -56,7 +56,7 @@ public class ClassGroup {
 	private String classNames;
 
 	/** 预计招生人数 */
-	@ApiModelProperty(value = "预计招生人数",hidden = true)
+	@ApiModelProperty(value = "预计招生人数", required = true)
 	private Integer expectStudentNum;
 
 	/** 学生数 */

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/SysConfigService.java

@@ -185,6 +185,8 @@ public interface SysConfigService extends BaseService<Long, SysConfig> {
      */
     String EDU_TEACHER_BASE_URL = "edu_teacher_base_url";
 
+    String HOLIDAY_SETTING = "holiday_setting";
+
     /**
      * @return com.ym.mec.biz.dal.entity.SysConfig
      * @params paramName

+ 36 - 44
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java

@@ -453,19 +453,17 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 
 				String courseScheduleName = subjectList.stream().map(subject -> subject.getName()).collect(Collectors.joining("/"));
 
-				Map<String, Integer> holidayDays = new HashMap<>();
-				Map<Integer, Map<String, Integer>> holiday = new HashMap<>();
+                Set<String> holidayDays = new HashSet<>();
+
 				if (highClassGroup.getHoliday()) {
-					holiday = jiaRiFeignService.query(now.getYear());
-					holidayDays = holiday.get(now.getYear());
+                    SysConfig holidaySetting = sysConfigService.findByParamName(SysConfigService.HOLIDAY_SETTING);
+                    if(Objects.nonNull(holidaySetting)&&StringUtils.isNotBlank(holidaySetting.getParanValue())){
+                        holidayDays = new HashSet<>(JSON.parseArray(holidaySetting.getParanValue(), String.class));
+                    }
 				}
 
 				WhileNode: while (highClassGroup.getCourseTimes() > times) {
-					if (highClassGroup.getHoliday() && !holiday.containsKey(now.getYear())) {
-						holiday = jiaRiFeignService.query(now.getYear());
-						holidayDays = holiday.get(now.getYear());
-					}
-					if (highClassGroup.getHoliday() && holidayDays.containsKey(now.format(DateTimeFormatter.ofPattern("MMdd")))) {
+					if (highClassGroup.getHoliday() && holidayDays.contains(now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))) {
 						now = now.plusDays(1);
 						continue;
 					}
@@ -1441,21 +1439,19 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
         BigDecimal expectPrice = new BigDecimal("0");
         int times = 0;
 
-        Map<String, Integer> holidayDays = new HashMap<>();
-        Map<Integer, Map<String, Integer>> holiday = new HashMap<>();
+        Set<String> holidayDays = new HashSet<>();
+
         if (classGroup4MixDto.getHoliday()) {
-            holiday = jiaRiFeignService.query(now.getYear());
-            holidayDays = holiday.get(now.getYear());
+            SysConfig holidaySetting = sysConfigService.findByParamName(SysConfigService.HOLIDAY_SETTING);
+            if(Objects.nonNull(holidaySetting)&&StringUtils.isNotBlank(holidaySetting.getParanValue())){
+                holidayDays = new HashSet<>(JSON.parseArray(holidaySetting.getParanValue(), String.class));
+            }
         }
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
 
         WhileNode:
         while (true) {
-            if(classGroup4MixDto.getHoliday() && !holiday.containsKey(now.getYear())){
-                holiday = jiaRiFeignService.query(now.getYear());
-                holidayDays = holiday.get(now.getYear());
-            }
-            if (classGroup4MixDto.getHoliday() && holidayDays.containsKey(now.format(DateTimeFormatter.ofPattern("MMdd")))) {
+            if (classGroup4MixDto.getHoliday() && holidayDays.contains(now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))) {
                 now = now.plusDays(1);
                 continue;
             }
@@ -1735,21 +1731,18 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
         List<CourseSchedule> courseScheduleList = new ArrayList<>();
 
         int times = 0;
-        Map<String, Integer> holidayDays = new HashMap<>();
-        Map<Integer, Map<String, Integer>> holiday = new HashMap<>();
+        Set<String> holidayDays = new HashSet<>();
         if (classGroup4MixDto.getHoliday()) {
-            holiday = jiaRiFeignService.query(now.getYear());
-            holidayDays = holiday.get(now.getYear());
+            SysConfig holidaySetting = sysConfigService.findByParamName(SysConfigService.HOLIDAY_SETTING);
+            if(Objects.nonNull(holidaySetting)&&StringUtils.isNotBlank(holidaySetting.getParanValue())){
+                holidayDays = new HashSet<>(JSON.parseArray(holidaySetting.getParanValue(), String.class));
+            }
         }
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
 
         WhileNode:
         while (true) {
-            if(classGroup4MixDto.getHoliday() && !holiday.containsKey(now.getYear())){
-                holiday = jiaRiFeignService.query(now.getYear());
-                holidayDays = holiday.get(now.getYear());
-            }
-            if (classGroup4MixDto.getHoliday() && holidayDays.containsKey(now.format(DateTimeFormatter.ofPattern("MMdd")))) {
+            if (classGroup4MixDto.getHoliday() && holidayDays.contains(now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))) {
                 now = now.plusDays(1);
                 continue;
             }
@@ -2005,21 +1998,18 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 
         BigDecimal expectPrice = new BigDecimal("0");
         int times = 0;
-        Map<String, Integer> holidayDays = new HashMap<>();
-        Map<Integer, Map<String, Integer>> holiday = new HashMap<>();
+        Set<String> holidayDays = new HashSet<>();
         if (classGroup4MixDto.getHoliday()) {
-            holiday = jiaRiFeignService.query(now.getYear());
-            holidayDays = holiday.get(now.getYear());
+            SysConfig holidaySetting = sysConfigService.findByParamName(SysConfigService.HOLIDAY_SETTING);
+            if(Objects.nonNull(holidaySetting)&&StringUtils.isNotBlank(holidaySetting.getParanValue())){
+                holidayDays = new HashSet<>(JSON.parseArray(holidaySetting.getParanValue(), String.class));
+            }
         }
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
 
         WhileNode:
         while (true) {
-            if(classGroup4MixDto.getHoliday() && !holiday.containsKey(now.getYear())){
-                holiday = jiaRiFeignService.query(now.getYear());
-                holidayDays = holiday.get(now.getYear());
-            }
-            if (classGroup4MixDto.getHoliday() && holidayDays.containsKey(now.format(DateTimeFormatter.ofPattern("MMdd")))) {
+            if (classGroup4MixDto.getHoliday() && holidayDays.contains(now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))) {
                 now = now.plusDays(1);
                 continue;
             }
@@ -2375,14 +2365,16 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
             highClassGroup.setTeacherName(bishopTeacher.getUserName());
             highClassGroup.setUserId(bishopTeacher.getUserId());
             CourseSchedule courseSchedule = courseScheduleDao.findOneCourseScheduleByClassGroupId(highClassGroup.getId());
-            highClassGroup.setStartClassTime(DateUtil.format(courseSchedule.getStartClassTime(), "HH:mm"));
-            highClassGroup.setEndClassTime(DateUtil.format(courseSchedule.getEndClassTime(), "HH:mm"));
-
-            Calendar calendar = Calendar.getInstance();
-            calendar.setTime(courseSchedule.getClassDate());
-            Integer dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK) - 1;
-            dayOfWeek = dayOfWeek.equals(0) ? 7 : dayOfWeek;
-            highClassGroup.setDayOfWeek(dayOfWeek);
+			if (courseSchedule != null) {
+				highClassGroup.setStartClassTime(DateUtil.format(courseSchedule.getStartClassTime(), "HH:mm"));
+				highClassGroup.setEndClassTime(DateUtil.format(courseSchedule.getEndClassTime(), "HH:mm"));
+
+				Calendar calendar = Calendar.getInstance();
+				calendar.setTime(courseSchedule.getClassDate());
+				Integer dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK) - 1;
+				dayOfWeek = dayOfWeek.equals(0) ? 7 : dayOfWeek;
+				highClassGroup.setDayOfWeek(dayOfWeek);
+			}
         }
         return highClassGroupList;
     }

+ 41 - 72
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -396,22 +396,18 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		List<CourseScheduleTeacherSalary> courseScheduleTeacherSalaries = new ArrayList<CourseScheduleTeacherSalary>();
 		List<CourseScheduleStudentPayment> courseScheduleStudentPayments = new ArrayList<CourseScheduleStudentPayment>();
 		List<TeacherAttendance> teacherAttendances = new ArrayList<TeacherAttendance>();
-		Map<String, Integer> holidayDays = new HashMap<>();
+		Set<String> holidayDays = new HashSet<>();
 		if (isJumpHoliday) {
-			try {
-		        Map<Integer, Map<String, Integer>> holiday = new HashMap<>();
-				holiday = jiaRiFeignService.query(calendar.get(Calendar.YEAR));
-				holidayDays = holiday.get(calendar.get(Calendar.YEAR));
-
-			} catch (Exception e) {
-				throw new BizException("获取节假日失败",e);
+			SysConfig holidaySetting = sysConfigService.findByParamName(SysConfigService.HOLIDAY_SETTING);
+			if(Objects.nonNull(holidaySetting)&&StringUtils.isNotBlank(holidaySetting.getParanValue())){
+				holidayDays = new HashSet<>(JSON.parseArray(holidaySetting.getParanValue(), String.class));
 			}
 		}
 		calendar.setTime(startDate);
 
 		int currentCourseTimes = 0;
 		while (coursesTimes != currentCourseTimes) {
-            if (holidayDays.containsKey(DateUtil.format(calendar.getTime(), "MMdd"))) {
+            if (holidayDays.contains(DateUtil.format(calendar.getTime(), "yyyy-MM-dd"))) {
                 calendar.add(Calendar.DATE, 1);
                 continue;
             }
@@ -1971,25 +1967,17 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         calendar.setTime(courseCreateStartTime);
         List<Date> courseStartDates = new ArrayList<>();
 
-        Map<String, Integer> holidayDays = new HashMap<>();
-        Map<Integer, Map<String, Integer>> holiday = new HashMap<>();
+		Set<String> holidayDays = new HashSet<>();
 
-        try {
-            if (vipGroupCourseAdjustInfo.isHoliday()) {
-                holiday = jiaRiFeignService.query(calendar.get(Calendar.YEAR));
-                holidayDays = holiday.get(calendar.get(Calendar.YEAR));
-            }
-        } catch (DecodeException e) {
-            LOGGER.error("节假日解析错误");
-            vipGroupCourseAdjustInfo.setHoliday(false);
-        }
+		if (vipGroupCourseAdjustInfo.isHoliday()) {
+			SysConfig holidaySetting = sysConfigService.findByParamName(SysConfigService.HOLIDAY_SETTING);
+			if(StringUtils.isNotBlank(holidaySetting.getParanValue())){
+				holidayDays = new HashSet<>(JSON.parseArray(holidaySetting.getParanValue(), String.class));
+			}
+		}
 
         while (true) {
-            if (vipGroupCourseAdjustInfo.isHoliday() && !holiday.containsKey(calendar.get(Calendar.YEAR))) {
-                holiday = jiaRiFeignService.query(calendar.get(Calendar.YEAR));
-                holidayDays = holiday.get(calendar.get(Calendar.YEAR));
-            }
-            if (vipGroupCourseAdjustInfo.isHoliday() && holidayDays.containsKey(DateUtil.format(calendar.getTime(), "MMdd"))) {
+            if (vipGroupCourseAdjustInfo.isHoliday() && holidayDays.contains(DateUtil.format(calendar.getTime(), "yyyy-MM-dd"))) {
                 calendar.add(Calendar.DATE, 1);
                 continue;
             }
@@ -2133,8 +2121,14 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         Calendar calendar = Calendar.getInstance();
         calendar.setTime(coursePostPoneInfo.getRecoveryDate());
 
-        Map<String, Integer> holidayDays = new HashMap<>();
-        Map<Integer, Map<String, Integer>> holiday = new HashMap<>();
+		Set<String> holidayDays = new HashSet<>();
+
+		if (coursePostPoneInfo.isSkipHoliday()) {
+			SysConfig holidaySetting = sysConfigService.findByParamName(SysConfigService.HOLIDAY_SETTING);
+			if(Objects.nonNull(holidaySetting)&&StringUtils.isNotBlank(holidaySetting.getParanValue())){
+				holidayDays = new HashSet<>(JSON.parseArray(holidaySetting.getParanValue(), String.class));
+			}
+		}
 
         classGroupCourseSchedulesWithDate.sort(Comparator.comparing(CourseSchedule::getStartClassTime));
 
@@ -2151,17 +2145,8 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 
             calendar.setTime(courseSchedule.getClassDate());
             calendar.add(Calendar.DATE, betweenDays);
-            try {
-                if (coursePostPoneInfo.isSkipHoliday() && !holiday.containsKey(calendar.get(Calendar.YEAR))) {
-                    holiday = jiaRiFeignService.query(calendar.get(Calendar.YEAR));
-                    holidayDays = holiday.get(calendar.get(Calendar.YEAR));
-                }
-            } catch (Exception e) {
-                LOGGER.error("节假日解析错误");
-                coursePostPoneInfo.setSkipHoliday(false);
-            }
 
-            if (coursePostPoneInfo.isSkipHoliday() && holidayDays.containsKey(DateUtil.format(calendar.getTime(), "MMdd"))) {
+            if (coursePostPoneInfo.isSkipHoliday() && holidayDays.contains(DateUtil.format(calendar.getTime(), "yyyy-MM-dd"))) {
                 betweenDays=betweenDays+7;
                 calendar.add(Calendar.DATE, betweenDays);
                 i=i-1;
@@ -2219,27 +2204,19 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         Calendar calendar = Calendar.getInstance();
         calendar.setTime(courseCreateStartTime);
 
-        Map<String, Integer> holidayDays = new HashMap<>();
-        Map<Integer, Map<String, Integer>> holiday = new HashMap<>();
+		Set<String> holidayDays = new HashSet<>();
 
-        try {
-            if (vipGroupCourseAdjustInfo.isHoliday()) {
-                holiday = jiaRiFeignService.query(calendar.get(Calendar.YEAR));
-                holidayDays = holiday.get(calendar.get(Calendar.YEAR));
-            }
-        } catch (DecodeException e) {
-            LOGGER.error("节假日解析错误");
-            vipGroupCourseAdjustInfo.setHoliday(false);
-        }
+		if (vipGroupCourseAdjustInfo.isHoliday()) {
+			SysConfig holidaySetting = sysConfigService.findByParamName(SysConfigService.HOLIDAY_SETTING);
+			if(Objects.nonNull(holidaySetting)&&StringUtils.isNotBlank(holidaySetting.getParanValue())){
+				holidayDays = new HashSet<>(JSON.parseArray(holidaySetting.getParanValue(), String.class));
+			}
+		}
 
         List<CourseSchedule> courseSchedules = new ArrayList<>();
 
         while (true) {
-            if (vipGroupCourseAdjustInfo.isHoliday() && !holiday.containsKey(calendar.get(Calendar.YEAR))) {
-                holiday = jiaRiFeignService.query(calendar.get(Calendar.YEAR));
-                holidayDays = holiday.get(calendar.get(Calendar.YEAR));
-            }
-            if (vipGroupCourseAdjustInfo.isHoliday() && holidayDays.containsKey(DateUtil.format(calendar.getTime(), "MMdd"))) {
+            if (vipGroupCourseAdjustInfo.isHoliday() && holidayDays.contains(DateUtil.format(calendar.getTime(), "yyyy-MM-dd"))) {
                 calendar.add(Calendar.DATE, 1);
                 continue;
             }
@@ -3604,31 +3581,23 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         Calendar calendar = Calendar.getInstance();
         calendar.setTime(courseGenerateInfo.getCourseCreateStartTime());
 
-        Map<String, Integer> holidayDays = new HashMap<>();
-        Map<Integer, Map<String, Integer>> holiday = new HashMap<>();
+        Set<String> holidayDays = new HashSet<>();
 
-        try {
-            if (courseGenerateInfo.isSkipHoliday()) {
-                holiday = jiaRiFeignService.query(calendar.get(Calendar.YEAR));
-                holidayDays = holiday.get(calendar.get(Calendar.YEAR));
-            }
-        } catch (DecodeException e) {
-            LOGGER.error("节假日解析错误");
-            courseGenerateInfo.setSkipHoliday(false);
-        }
+		if (courseGenerateInfo.isSkipHoliday()) {
+			SysConfig holidaySetting = sysConfigService.findByParamName(SysConfigService.HOLIDAY_SETTING);
+			if(Objects.nonNull(holidaySetting)&&StringUtils.isNotBlank(holidaySetting.getParanValue())){
+				holidayDays = new HashSet<>(JSON.parseArray(holidaySetting.getParanValue(), String.class));
+			}
+		}
 
         List<CourseSchedule> courseSchedules = new ArrayList<>();
         Date now=new Date();
 
         while (true) {
-            if (courseGenerateInfo.isSkipHoliday() && !holiday.containsKey(calendar.get(Calendar.YEAR))) {
-                holiday = jiaRiFeignService.query(calendar.get(Calendar.YEAR));
-                holidayDays = holiday.get(calendar.get(Calendar.YEAR));
-            }
-            if (courseGenerateInfo.isSkipHoliday() && holidayDays.containsKey(DateUtil.format(calendar.getTime(), "MMdd"))) {
-                calendar.add(Calendar.DATE, 1);
-                continue;
-            }
+			if (courseGenerateInfo.isSkipHoliday() && holidayDays.contains(DateUtil.format(calendar.getTime(), "yyyy-MM-dd"))) {
+				calendar.add(Calendar.DATE, 1);
+				continue;
+			}
             int i = calendar.get(Calendar.DAY_OF_WEEK);
             if (i == 1) {
                 i = 7;

+ 15 - 25
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRepairServiceImpl.java

@@ -156,6 +156,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
             notifyMap.put("channelType", channelType);
             notifyMap.put("orderNo", "");
             studentPaymentOrderService.updateOrder(notifyMap);
+            notifyMap.put("orderNo", orderNo);
             return notifyMap;
         }
 
@@ -218,12 +219,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
                 "联系人:" + studentRepair.getEmployeePhone() + "(" + studentRepair.getEmployeePhone() + ")\n\r" +
                 "地址:" + studentRepair.getEmployeeAddress() ;
 
-        if(studentRepair.getSendType().equals(0)) {
-            sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.SMS_REPAIR_UNSEND_COMPLETED, map, null, 0, "1", "STUDENT",
-                    student.getUsername(), studentRepair.getEmployeeName(), studentRepair.getEmployeePhone(), studentRepair.getEmployeeAddress());
-        }else {
-            sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.SMS_REPAIR_SEND_COMPLETED, map, null, 0, "1", "STUDENT",
-                    student.getUsername());
+        if(studentRepair.getSendType().equals(1)) {
             imContent = student.getUsername() + "学员您好,您的乐器已保养维修完毕,快递已寄出,请注意查收。";
         }
         sysMessageService.sendPrivateMessage(student.getId().toString(), imContent);
@@ -256,6 +252,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
         studentDao.lockUser(studentRepair.getStudentId());
         BigDecimal amount = studentRepair.getAmount();
         String orderNo = idGeneratorService.generatorId("payment") + "";
+        studentRepair.setIsUseBalancePayment(repairInfo.getIsUseBalancePayment());
         studentRepair.setTransNo(orderNo);
         studentRepair.setRepairStatus(0);
         studentRepair.setPayStatus(1);
@@ -285,8 +282,8 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
         studentPaymentOrderService.insert(studentPaymentOrder);
         studentPaymentOrder.setVersion(0);
 
-        if (repairInfo.getIsUseBalancePayment() && amount.compareTo(BigDecimal.ZERO) > 0) {
-            SysUserCashAccount userCashAccount = sysUserCashAccountService.getLocked(repairInfo.getStudentId());
+        if (studentRepair.getIsUseBalancePayment() && amount.compareTo(BigDecimal.ZERO) > 0) {
+            SysUserCashAccount userCashAccount = sysUserCashAccountService.getLocked(studentRepair.getStudentId());
             if (userCashAccount == null) {
                 throw new BizException("用户账户找不到");
             }
@@ -295,7 +292,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
                 amount = amount.subtract(balance);
                 studentPaymentOrder.setActualAmount(amount);
                 studentPaymentOrder.setBalancePaymentAmount(balance);
-                sysUserCashAccountService.updateBalance(repairInfo.getStudentId(), balance.negate(), PlatformCashAccountDetailTypeEnum.PAY_FEE, "乐器维修");
+                sysUserCashAccountService.updateBalance(studentRepair.getStudentId(), balance.negate(), PlatformCashAccountDetailTypeEnum.PAY_FEE, "乐器维修");
             }
         }
         studentPaymentOrderService.update(studentPaymentOrder);
@@ -308,6 +305,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
             notifyMap.put("channelType", channelType);
             notifyMap.put("orderNo", "");
             studentPaymentOrderService.updateOrder(notifyMap);
+            notifyMap.put("orderNo", orderNo);
             return notifyMap;
         }
 
@@ -354,9 +352,9 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
     @Override
     @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
     public Boolean orderCallback(StudentPaymentOrder studentPaymentOrder) {
-        Date noDate = new Date();
+        Date nowDate = new Date();
         //更新订单信息
-        studentPaymentOrder.setUpdateTime(noDate);
+        studentPaymentOrder.setUpdateTime(nowDate);
         int updateCount = studentPaymentOrderService.update(studentPaymentOrder);
         if (updateCount <= 0) {
             throw new BizException("订单更新失败");
@@ -365,21 +363,19 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
         StudentRepair repairInfo = getRepairInfo(Integer.parseInt(studentPaymentOrder.getMusicGroupId()));
 
         Integer userId = studentPaymentOrder.getUserId();
-        SysUser sysUser = sysUserFeignService.queryUserById(userId);
 
         Map<Integer, String> map = new HashMap();
         map.put(userId, userId.toString());
 
         if (studentPaymentOrder.getStatus() == DealStatusEnum.SUCCESS) {
             repairInfo.setPayStatus(2);
-            repairInfo.setUpdateTime(noDate);
+            repairInfo.setUpdateTime(nowDate);
             if (this.update(repairInfo) <= 0) {
                 throw new BizException("维修单更新失败");
             }
 
             //插入交易明细
             BigDecimal amount = studentPaymentOrder.getActualAmount();
-            Date nowDate = new Date();
             SysUserCashAccount cashAccount = sysUserCashAccountService.get(userId);
             //充值
             SysUserCashAccountDetail rechargeDetail = new SysUserCashAccountDetail();
@@ -415,26 +411,20 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
             }
             sysUserCashAccountDetailService.insert(paymentDetail);
 
-            String imContent = sysUser.getUsername() + "学员您好,您的乐器维修已受理,我们会尽快完成保养维修";
+            String imContent = repairInfo.getStudentName() + "学员您好,您的乐器维修已受理,我们会尽快完成保养维修";
 
-            if(repairInfo.getType().equals(0)) {
-                sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.SMS_REPAIR_OFFLINE_PAYMENT_SUCCESS, map, null, 0, "1", "STUDENT",
-                        sysUser.getUsername());
-            } else {
-                imContent = sysUser.getUsername() + "学员您好,请尽快寄送乐器至维修点,我们会尽快完成保养维修\n\r" +
+            if(repairInfo.getType().equals(1)){
+                imContent = repairInfo.getStudentName() + "学员您好,请尽快寄送乐器至维修点,我们会尽快完成保养维修\n\r" +
                         "联系人:" + repairInfo.getEmployeePhone() + "(" + repairInfo.getEmployeePhone() + ")\n\r" +
                         "地址:" + repairInfo.getEmployeeAddress() + "";
-
-                sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.SMS_REPAIR_ONLINE_PAYMENT_SUCCESS, map, null, 0, "1", "STUDENT",
-                        sysUser.getUsername(), repairInfo.getEmployeeName(), repairInfo.getEmployeePhone(), repairInfo.getEmployeeAddress());
             }
-            sysMessageService.sendPrivateMessage(sysUser.getId().toString(), imContent);
+            sysMessageService.sendPrivateMessage(userId.toString(), imContent);
             return true;
         }
 
         if (studentPaymentOrder.getStatus() == DealStatusEnum.CLOSE || studentPaymentOrder.getStatus() == DealStatusEnum.FAILED) {
             repairInfo.setPayStatus(0);
-            repairInfo.setUpdateTime(noDate);
+            repairInfo.setUpdateTime(nowDate);
             if (this.update(repairInfo) <= 0) {
                 throw new BizException("维修单更新失败");
             }

+ 2 - 2
mec-biz/src/main/resources/config/mybatis/StudentRepairMapper.xml

@@ -240,10 +240,10 @@
     </select>
 
     <select id="getStudentMusicGroupRepairer" resultMap="com.ym.mec.biz.dal.dao.MusicGroupDao.BasicUserDto">
-        SELECT su.real_name_ username_, su.id_ user_id_, su.avatar_ head_url_
+        SELECT repairer.real_name_ username_, repairer.id_ user_id_, repairer.avatar_ head_url_
         FROM music_group mg
                  LEFT JOIN student_registration sr on sr.music_group_id_ = mg.id_
-                 LEFT JOIN sys_user su ON su.id_ = sr.user_id_
+                 LEFT JOIN sys_user repairer ON repairer.id_ = mg.repair_user_id_
         WHERE sr.user_id_ = #{studentId}
           AND mg.status_ = 'PROGRESS'
           AND mg.repair_user_id_ IS NOT NULL

+ 6 - 1
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/message/provider/YimeiSmsPlugin.java

@@ -46,7 +46,12 @@ public class YimeiSmsPlugin implements MessageSenderPlugin, InitializingBean {
 			param.put("sign", DigestUtils.md5Hex(appId + secretKey + timestamp));
 			param.put("content", content);
 			param.put("mobiles", receiver);
-			return HttpUtil.postForHttp(host, param);
+			
+			long startTime = System.currentTimeMillis();
+			String result =  HttpUtil.postForHttp(host, param);
+			logger.info("调用亿美接口共消耗{}毫秒",System.currentTimeMillis() - startTime);
+			
+			return result;
 		} catch (Exception e) {
 			throw new ThirdpartyException("调用发送短信接口出现异常", e);
 		}

+ 5 - 5
mec-web/src/main/java/com/ym/mec/web/controller/CourseScheduleController.java

@@ -11,10 +11,7 @@ import com.ym.mec.biz.dal.dto.CreateCourseScheduleDto;
 import com.ym.mec.biz.dal.dto.VipGroupCourseAdjustInfoDto;
 import com.ym.mec.biz.dal.entity.*;
 import com.ym.mec.biz.dal.entity.CourseSchedule.CourseScheduleType;
-import com.ym.mec.biz.dal.enums.AuditStatusEnum;
-import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
-import com.ym.mec.biz.dal.enums.GroupType;
-import com.ym.mec.biz.dal.enums.TeachModeEnum;
+import com.ym.mec.biz.dal.enums.*;
 import com.ym.mec.biz.dal.page.EndCourseScheduleQueryInfo;
 import com.ym.mec.biz.dal.page.StudentAttendanceQueryInfo;
 import com.ym.mec.biz.dal.page.VipGroupQueryInfo;
@@ -94,7 +91,10 @@ public class CourseScheduleController extends BaseController {
             courseSchedule.setSchoolId(musicGroup.getSchoolId());
             courseSchedule.setMusicGroupId(musicGroup.getId());
             courseSchedule.setGroupType(GroupType.MUSIC);
-            courseSchedule.setTeachMode(TeachModeEnum.OFFLINE);
+            courseSchedule.setStatus(CourseStatusEnum.NOT_START);
+            if(Objects.isNull(courseSchedule.getTeachMode())){
+                courseSchedule.setTeachMode(TeachModeEnum.OFFLINE);
+            }
             courseSchedule.setOrganId(musicGroup.getOrganId());
         });
 

+ 1 - 0
mec-web/src/main/java/com/ym/mec/web/controller/StudentRepairController.java

@@ -63,6 +63,7 @@ public class StudentRepairController extends BaseController {
         if(endTime != null){
             queryInfo.setEndTime(DateUtil.addDays(endTime, 1));
         }
+        queryInfo.setPayStatus(2);
         return succeed(studentRepairService.queryPage(queryInfo));
     }