|
@@ -1,6 +1,8 @@
|
|
|
package com.yonge.cooleshow.biz.dal.service.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
@@ -56,6 +58,7 @@ import com.yonge.cooleshow.biz.dal.vo.TeacherHomeVo;
|
|
|
import com.yonge.cooleshow.biz.dal.vo.TeacherVo;
|
|
|
import com.yonge.cooleshow.biz.dal.wordfilter.WordFilter;
|
|
|
import com.yonge.cooleshow.biz.dal.wrapper.StatGroupWrapper;
|
|
|
+import com.yonge.cooleshow.biz.dal.wrapper.TeacherFreeTimeWrapper;
|
|
|
import com.yonge.cooleshow.biz.dal.wrapper.UserPaymentOrderWrapper;
|
|
|
import com.yonge.cooleshow.biz.dal.wrapper.VipCardRecordWrapper;
|
|
|
import com.yonge.cooleshow.biz.dal.wrapper.im.ImGroupWrapper;
|
|
@@ -1664,4 +1667,17 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherDao, Teacher> impleme
|
|
|
teacherTotalService.totalTeacherTotalById(teacherId);
|
|
|
studentTotalService.totalStudentTotalById(studentId);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public TeacherFreeTimeWrapper.TeacherFreeConfig queryTeacherTime() {
|
|
|
+ TeacherFreeTimeWrapper.TeacherFreeConfig teacherFreeConfig = new TeacherFreeTimeWrapper.TeacherFreeConfig();
|
|
|
+ teacherFreeConfig.setStartTime(sysConfigService.findConfigValue(SysConfigConstant.COURSE_START_SETTING));
|
|
|
+ teacherFreeConfig.setEndTime(sysConfigService.findConfigValue(SysConfigConstant.COURSE_END_SETTING));
|
|
|
+ List<TeacherFreeTimeWrapper.CourseConfigDto> vipCourseTime = JSON.parseArray(sysConfigService.findConfigValue(SysConfigConstant.VIP_COURSE_TIMES_SETTING),TeacherFreeTimeWrapper.CourseConfigDto.class);
|
|
|
+ vipCourseTime.addAll(JSON.parseArray(sysConfigService.findConfigValue(SysConfigConstant.PRACTICE_TIMES_SETTING),TeacherFreeTimeWrapper.CourseConfigDto.class));
|
|
|
+ //获取空闲时间 + 课程时间 两者之和最大的时间
|
|
|
+ int maxTime = vipCourseTime.stream().mapToInt(o -> o.getCourseMinutes() + o.getFreeMinutes()).max().orElse(0);
|
|
|
+ teacherFreeConfig.setIntervalTime(maxTime);
|
|
|
+ return teacherFreeConfig;
|
|
|
+ }
|
|
|
}
|