|
@@ -24,6 +24,7 @@ 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 com.yonge.log.model.AuditLogAnnotation;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
@@ -178,6 +179,7 @@ public class TeacherCourseScheduleController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "课时调整")
|
|
|
@PostMapping(value = "/classStartDateAdjust",consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
|
+ @AuditLogAnnotation(operateName = "课时调整")
|
|
|
public Object classStartDateAdjust(ClassDateAdjustDto classDateAdjustDto){
|
|
|
if(Objects.isNull(classDateAdjustDto.getId())){
|
|
|
return failed("请指定课程!");
|
|
@@ -193,6 +195,9 @@ public class TeacherCourseScheduleController extends BaseController {
|
|
|
return failed("客户端只能调整VIP课");
|
|
|
}
|
|
|
Date now = new Date();
|
|
|
+ if(now.compareTo(oldCourseSchedule.getStartClassTime())>0){
|
|
|
+ throw new BizException("进行中或已结束课程不可调整");
|
|
|
+ }
|
|
|
|
|
|
//默认开课前4小时内,可调整,如果全员请假,可在当天24小时前调整
|
|
|
SysConfig advanceLeaveHoursConfig = sysConfigService.findByParamName(SysConfigService.ENABLE_TEACHER_COURSE_ADJUST_DEFAULT_HOURS);
|
|
@@ -331,6 +336,7 @@ public class TeacherCourseScheduleController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "课程批量调整")
|
|
|
@PostMapping("/courseAdjustOnlyWithClassDate")
|
|
|
+ @AuditLogAnnotation(operateName = "课程批量调整")
|
|
|
public HttpResponseResult courseAdjustOnlyWithClassDate(@RequestBody List<CourseSchedule> courseSchedules){
|
|
|
SysUser user = sysUserFeignService.queryUserInfo();
|
|
|
if(null==user){
|