|
|
|
@ -184,19 +184,19 @@ public class SystemSettingServiceImpl implements SystemSetttingService { |
|
|
|
|
if (phone != null && phone != "") { |
|
|
|
|
List<Integer> resultP = userInfoDao.queryPhone(phone); |
|
|
|
|
if (resultP.size() > 0) { |
|
|
|
|
return R.error(400, "手机号不能重复"); |
|
|
|
|
throw new RuntimeException("手机号不能重复"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (email != null && email != "") { |
|
|
|
|
List<Integer> resultE = userInfoDao.queryEmail(email); |
|
|
|
|
if (resultE.size() > 0) { |
|
|
|
|
return R.error(400, "手机号不能重复"); |
|
|
|
|
throw new RuntimeException("邮箱不能重复"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (resultA.size() > 0) { |
|
|
|
|
return R.error(400, "账号不能重复"); |
|
|
|
|
throw new RuntimeException("账号不能重复"); |
|
|
|
|
} else if (resultW.size() > 0) { |
|
|
|
|
return R.error(400, "工号不能重复"); |
|
|
|
|
throw new RuntimeException("工号不能重复"); |
|
|
|
|
} |
|
|
|
|
boolean resultUserInfo = userInfoDao.updateUserInfo(staffVo); |
|
|
|
|
// String[] split = staffVo.getRoleId().split(",");
|
|
|
|
@ -761,4 +761,36 @@ public class SystemSettingServiceImpl implements SystemSetttingService { |
|
|
|
|
return systemSetttingDao.queryUserIdsByProfessionalId(staffProfessionalArchitectureId); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R queryStaffInfo(StaffVo staffVo) { |
|
|
|
|
staffVo.setPlatformId(ConstantUtils.PLATFORMID); |
|
|
|
|
String account = staffVo.getAccount(); |
|
|
|
|
String phone = staffVo.getPhone(); |
|
|
|
|
String email = staffVo.getEmail(); |
|
|
|
|
String workNumber = staffVo.getWorkNumber(); |
|
|
|
|
|
|
|
|
|
userInfoDao.setNUM(staffVo.getUserId());//重置账号、手机号码为00
|
|
|
|
|
|
|
|
|
|
List<StaffVo> resultA = userInfoDao.queryAccount(account); |
|
|
|
|
List<Integer> resultW = systemSetttingDao.queryWorkNumber(workNumber); |
|
|
|
|
if (phone != null && phone != "") { |
|
|
|
|
List<Integer> resultP = userInfoDao.queryPhone(phone); |
|
|
|
|
if (resultP.size() > 0) { |
|
|
|
|
return R.error(400,"手机号不能重复"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (email != null && email != "") { |
|
|
|
|
List<Integer> resultE = userInfoDao.queryEmail(email); |
|
|
|
|
if (resultE.size() > 0) { |
|
|
|
|
return R.error(400,"邮箱不能重复"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (resultA.size() > 0) { |
|
|
|
|
return R.error(400,"账号不能重复"); |
|
|
|
|
} else if (resultW.size() > 0) { |
|
|
|
|
return R.error(400,"工号不能重复"); |
|
|
|
|
} |
|
|
|
|
return R.ok(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |