Просмотр исходного кода

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

zouxuan 5 лет назад
Родитель
Сommit
149dec0489

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

@@ -172,6 +172,10 @@ public interface SysConfigService extends BaseService<Long, SysConfig> {
      */
     String TEACHER_BASE_URL = "teacher_base_url";
 
+    String COURSE_BEFORE_BUFFER_TIME = "course_before_buffer_time";
+
+    String COURSE_AFTER_BUFFER_TIME = "course_after_buffer_time";
+
     /**
      * @return com.ym.mec.biz.dal.entity.SysConfig
      * @params paramName

+ 4 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -746,10 +746,14 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         }
         Date now = new Date();
         SysConfig studentAttendanceAfterTimeConfig = sysConfigService.findByParamName(SysConfigService.ENABLE_STUDENT_ATTENDANCE_BEFOR_COURSE_START_TIME_RANGE_VIP);
+		SysConfig courseBeforeBufferTime = sysConfigService.findByParamName(SysConfigService.COURSE_BEFORE_BUFFER_TIME);
+		SysConfig courseAfterBufferTime = sysConfigService.findByParamName(SysConfigService.COURSE_AFTER_BUFFER_TIME);
         Map<String, Object> result = new HashMap<>(3);
         result.put("vipAppealDaysRange", sysConfigDao.findConfigValue(SysConfigService.VIP_APPEAL_DAYS_RANGE));
         result.put("advanceLeaveHours", Integer.parseInt(sysConfigDao.findConfigValue(SysConfigService.ADVANCE_LEAVE_HOURS)));
         result.put("joinRoomBeforeTime",studentAttendanceAfterTimeConfig.getParanValue(Integer.class));
+		result.put("courseBeforeBufferTime", courseBeforeBufferTime.getParanValue(Integer.class));
+		result.put("courseAfterBufferTime", courseAfterBufferTime.getParanValue(Integer.class));
 //		List<Integer> quitClassGroupIds=classGroupStudentMapperDao.findClassGroupIdByUserAndCourseDateAndStatus(user.getId(),classDate, ClassGroupStudentStatusEnum.QUIT.getCode());
         List<CourseScheduleDto> studentCourseSchedulesWithDate = courseScheduleDao.getStudentCourseSchedulesWithDate(classDate, user.getId().longValue(), null);
         List<Long> courseScheduleIds = studentCourseSchedulesWithDate.stream()

+ 16 - 20
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherCourseScheduleController.java

@@ -1,31 +1,12 @@
 package com.ym.mec.teacher.controller;
 
-import com.ym.mec.biz.dal.dto.TeacherRemarkCommitDto;
-
-import com.ym.mec.common.page.QueryInfo;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
-import org.springframework.web.bind.annotation.*;
-
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dao.ClassGroupStudentMapperDao;
 import com.ym.mec.biz.dal.dao.StudentAttendanceDao;
 import com.ym.mec.biz.dal.dto.ClassDateAdjustDto;
 import com.ym.mec.biz.dal.dto.CourseScheduleDto;
+import com.ym.mec.biz.dal.dto.TeacherRemarkCommitDto;
 import com.ym.mec.biz.dal.entity.CourseSchedule;
 import com.ym.mec.biz.dal.entity.SysConfig;
 import com.ym.mec.biz.dal.enums.ClassGroupStudentStatusEnum;
@@ -41,8 +22,19 @@ import com.ym.mec.biz.service.SysConfigService;
 import com.ym.mec.biz.service.VipGroupService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.exception.BizException;
+import com.ym.mec.common.page.QueryInfo;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.date.DateUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.*;
+
+import java.text.SimpleDateFormat;
+import java.util.*;
 
 /**
  * @Author Joburgess
@@ -93,6 +85,8 @@ public class TeacherCourseScheduleController extends BaseController {
         }
         SysConfig sysConfig = sysConfigService.findByParamName(SysConfigService.ENABLE_STUDENT_ATTENDANCE_TIME_RANGE);
         SysConfig sysConfigVip = sysConfigService.findByParamName(SysConfigService.ENABLE_STUDENT_ATTENDANCE_TIME_RANGE_VIP);
+        SysConfig courseBeforeBufferTime = sysConfigService.findByParamName(SysConfigService.COURSE_BEFORE_BUFFER_TIME);
+        SysConfig courseAfterBufferTime = sysConfigService.findByParamName(SysConfigService.COURSE_AFTER_BUFFER_TIME);
         SysConfig studentAttendanceAfterTimeConfig = sysConfigService.findByParamName(SysConfigService.ENABLE_STUDENT_ATTENDANCE_BEFOR_COURSE_START_TIME_RANGE_VIP);
         List<CourseScheduleDto> teacherCourseSchedulesWithDate = scheduleService.getTeacherCourseSchedulesWithDate(user.getId(),date,type);
         Map<String,Object> result = new HashMap<>();
@@ -101,6 +95,8 @@ public class TeacherCourseScheduleController extends BaseController {
         result.put("enableStudentAttendanceTimeRange",sysConfig.getParanValue(Integer.class));
         result.put("enableStudentAttendanceTimeRangeVip",sysConfigVip.getParanValue(Integer.class));
         result.put("joinRoomBeforeTime",studentAttendanceAfterTimeConfig.getParanValue(Integer.class));
+        result.put("courseBeforeBufferTime", courseBeforeBufferTime.getParanValue(Integer.class));
+        result.put("courseAfterBufferTime", courseAfterBufferTime.getParanValue(Integer.class));
         return succeed(result);
     }