|
@@ -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')")
|