更新
This commit is contained in:
parent
34ef8ce13f
commit
65ad926fb9
@ -230,21 +230,26 @@ public class InspectionStaffServiceImpl extends ServiceImpl<InspectionStaffMappe
|
||||
@Override
|
||||
public Long addFolder(Long userId) {
|
||||
AdminUserDO user = userService.getUser(userId);
|
||||
Long folderId = inspectionFileService.addFolder(user.getNickname());
|
||||
if (ObjectUtil.isNotEmpty(user)) {
|
||||
Long folderId = inspectionFileService.addFolder(user.getNickname());
|
||||
|
||||
//查询员工子表是否存在数据
|
||||
InspectionStaff staff = this.getOne(Wrappers.<InspectionStaff>lambdaQuery().eq(InspectionStaff::getUserId, userId));
|
||||
if (ObjectUtil.isNull(staff)) {
|
||||
staff = new InspectionStaff();
|
||||
staff.setUserId(userId);
|
||||
staff.setFolderId(folderId);
|
||||
//新增
|
||||
this.save(staff);
|
||||
} else {
|
||||
//修改文件夹id
|
||||
this.update(Wrappers.<InspectionStaff>lambdaUpdate().eq(InspectionStaff::getUserId, userId).set(InspectionStaff::getFolderId, folderId));
|
||||
//查询员工子表是否存在数据
|
||||
InspectionStaff staff = this.getOne(Wrappers.<InspectionStaff>lambdaQuery().eq(InspectionStaff::getUserId, userId));
|
||||
if (ObjectUtil.isNull(staff)) {
|
||||
staff = new InspectionStaff();
|
||||
staff.setUserId(userId);
|
||||
staff.setFolderId(folderId);
|
||||
//新增
|
||||
this.save(staff);
|
||||
} else {
|
||||
//修改文件夹id
|
||||
this.update(Wrappers.<InspectionStaff>lambdaUpdate().eq(InspectionStaff::getUserId, userId).set(InspectionStaff::getFolderId, folderId));
|
||||
}
|
||||
return folderId;
|
||||
}else {
|
||||
log.error("用户不存在");
|
||||
return null;
|
||||
}
|
||||
return folderId;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user