|
@@ -379,7 +379,17 @@ public class AppInstructorController extends JeecgController<AppInstructor, IApp
|
|
|
//@AutoLog(value = "教练表-通过id查询")
|
|
|
@Operation(summary="员工信息-修改状态")
|
|
|
@PutMapping(value = "/updateStatus")
|
|
|
- public Result<String> updateStatus(SysUser sysUser) {
|
|
|
+ public Result<String> updateStatus(@RequestBody SysUser sysUser) {
|
|
|
+ StaffVO staffVO = appInstructorService.findById(sysUser.getId());
|
|
|
+ if(staffVO==null) {
|
|
|
+ return Result.error("未找到对应数据");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(staffVO.getInstructorId())){
|
|
|
+ AppInstructor appInstructor = new AppInstructor();
|
|
|
+ appInstructor.setId(staffVO.getInstructorId());
|
|
|
+ appInstructor.setStatus(sysUser.getStatus());
|
|
|
+ appInstructorService.updateById(appInstructor);
|
|
|
+ }
|
|
|
sysUserService.updateById(sysUser);
|
|
|
return Result.OK("修改状态成功");
|
|
|
}
|