修改时 员工账户不可重复
This commit is contained in:
@@ -145,7 +145,7 @@ public class TbPlussShopStaffServiceImpl implements TbPlussShopStaffService {
|
||||
}
|
||||
TbPlussShopStaff tbPlussShopStaff = tbPlussShopStaffRepository.findById(resources.getId()).orElseGet(TbPlussShopStaff::new);
|
||||
User sysUser = userRepository.findByUsername(tbPlussShopStaff.getAccount());
|
||||
if(tbPlussShopStaff.getAccount().equals(resources.getAccount())){
|
||||
if(!tbPlussShopStaff.getAccount().equals(resources.getAccount())){
|
||||
if (userRepository.findByUsername(resources.getAccount()) != null) {
|
||||
throw new BadRequestException("员工账号不可重复");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user