This commit is contained in:
许允枞 2025-02-27 14:15:40 +08:00
parent 34ef8ce13f
commit 65ad926fb9

View File

@ -230,6 +230,7 @@ public class InspectionStaffServiceImpl extends ServiceImpl<InspectionStaffMappe
@Override
public Long addFolder(Long userId) {
AdminUserDO user = userService.getUser(userId);
if (ObjectUtil.isNotEmpty(user)) {
Long folderId = inspectionFileService.addFolder(user.getNickname());
//查询员工子表是否存在数据
@ -245,6 +246,10 @@ public class InspectionStaffServiceImpl extends ServiceImpl<InspectionStaffMappe
this.update(Wrappers.<InspectionStaff>lambdaUpdate().eq(InspectionStaff::getUserId, userId).set(InspectionStaff::getFolderId, folderId));
}
return folderId;
}else {
log.error("用户不存在");
return null;
}
}
/**
@ -265,6 +270,10 @@ public class InspectionStaffServiceImpl extends ServiceImpl<InspectionStaffMappe
Long userId = userService.createUser(createReqVO);
users.put(staffImportExcelVO.getMobile(), userId);
//创建员工文件夹
Long folderId = addFolder(userId);
//修改文件夹id
this.update(Wrappers.<InspectionStaff>lambdaUpdate().eq(InspectionStaff::getUserId, userId).set(InspectionStaff::getFolderId, folderId));
}