浏览代码

staff调整

master
zouhantao 1 个月前
父节点
当前提交
c980e067c2

+ 1
- 1
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/dto/system/StaffQueryRequestDTO.java 查看文件

@Accessors(chain = true) @Accessors(chain = true)
public class StaffQueryRequestDTO extends AbstractBizRequestDTO { public class StaffQueryRequestDTO extends AbstractBizRequestDTO {
@NotBlank(message = "员工id不可为空") @NotBlank(message = "员工id不可为空")
private String staffId;
private String id;
} }

+ 2
- 2
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/manager/system/StaffManagerImpl.java 查看文件

@Override @Override
public StaffVo query(StaffQueryRequestDTO dto) throws ManagerException { 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("员工不存在!"); if (staff == null) throw new ManagerException("员工不存在!");
StaffVo staffVo = new StaffVo(); StaffVo staffVo = new StaffVo();
copyProperties(staff, staffVo); copyProperties(staff, staffVo);

正在加载...
取消
保存