zouxuan 5 anos atrás
pai
commit
9f0a742e9e

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

@@ -1371,7 +1371,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 
         newCourseSchedules.forEach(newCourseSchedule -> {
 
-            if (newCourseSchedule.getStartClassTime().before(tomorrow) && sysUser.getUserType().contains("TEACHER")) {
+            if (!sysUser.getUserType().contains("SYSTEM") && newCourseSchedule.getStartClassTime().before(tomorrow) && sysUser.getUserType().contains("TEACHER")) {
                 throw new BizException("调整时间必须为明天及以后");
             }
 

+ 18 - 0
mec-web/src/main/java/com/ym/mec/web/controller/EmployeeController.java

@@ -7,11 +7,13 @@ import com.ym.mec.biz.dal.enums.EmployeeOperateEnum;
 import com.ym.mec.biz.dal.page.EmployeeQueryInfo;
 import com.ym.mec.biz.service.EmployeeService;
 import com.ym.mec.biz.service.OrganizationService;
+import com.ym.mec.biz.service.StudentManageService;
 import com.ym.mec.common.controller.BaseController;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 import java.util.Arrays;
@@ -32,6 +34,8 @@ public class EmployeeController extends BaseController {
     @Autowired
     private SysUserFeignService sysUserFeignService;
     @Autowired
+    private StudentManageService studentManageService;
+    @Autowired
     private OrganizationService organizationService;
 
     @ApiOperation(value = "根据部门获取下面的员工")
@@ -83,6 +87,20 @@ public class EmployeeController extends BaseController {
         return succeed();
     }
 
+    @ApiOperation(value = "修改用户")
+    @PostMapping("/updateUser")
+    public Object update(SysUser sysUser) {
+        SysUser user = sysUserFeignService.queryUserInfo();
+        if (user != null) {
+            Date date = new Date();
+            sysUser.setId(user.getId());
+            sysUser.setUpdateTime(date);
+            studentManageService.updateUser(sysUser);
+            return succeed();
+        }
+        return failed("获取用户失败");
+    }
+
 //    @ApiOperation(value = "删除员工")
 //    @PostMapping("/delete/{userId}")
 //    @PreAuthorize("@pcs.hasPermissions('employee/delete')")