员工账号重复校验
This commit is contained in:
@@ -153,7 +153,9 @@ public class TbPlussShopStaffServiceImpl implements TbPlussShopStaffService {
|
|||||||
resources.setPassword(null);
|
resources.setPassword(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
checkStaffParams(resources);
|
if (pattern.matcher(resources.getCode()).find()) {
|
||||||
|
throw new BadRequestException("员工编号不能包含中文");
|
||||||
|
}
|
||||||
|
|
||||||
TbPlussShopStaff tbPlussShopStaff = tbPlussShopStaffRepository.findById(resources.getId()).orElseGet(TbPlussShopStaff::new);
|
TbPlussShopStaff tbPlussShopStaff = tbPlussShopStaffRepository.findById(resources.getId()).orElseGet(TbPlussShopStaff::new);
|
||||||
User sysUser = userRepository.findByUsername(resources.getShopId()+"@"+tbPlussShopStaff.getAccount());
|
User sysUser = userRepository.findByUsername(resources.getShopId()+"@"+tbPlussShopStaff.getAccount());
|
||||||
|
|||||||
Reference in New Issue
Block a user