|
|
@@ -164,8 +164,8 @@ public class StaffManagerImpl extends RedisCacheManager implements StaffManager |
|
|
|
@Override |
|
|
|
public StaffVo query(StaffQueryRequestDTO dto) throws ManagerException { |
|
|
|
//不允许查询普通用户专属用员工(对前端无感) |
|
|
|
if (commonStaffId.equals(dto.getStaffId())) throw new ManagerException("该员工不存在"); |
|
|
|
Staff staff = staffRepo.findById(dto.getStaffId()).orElse(null); |
|
|
|
if (commonStaffId.equals(dto.getId())) throw new ManagerException("该员工不存在"); |
|
|
|
Staff staff = staffRepo.findById(dto.getId()).orElse(null); |
|
|
|
if (staff == null) throw new ManagerException("员工不存在!"); |
|
|
|
StaffVo staffVo = new StaffVo(); |
|
|
|
copyProperties(staff, staffVo); |