重复账号
This commit is contained in:
@@ -163,7 +163,7 @@ public class TbPlussShopStaffServiceImpl implements TbPlussShopStaffService {
|
|||||||
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());
|
||||||
if(!tbPlussShopStaff.getAccount().equals(resources.getAccount())){
|
if(!tbPlussShopStaff.getAccount().equals(resources.getAccount())){
|
||||||
if (userRepository.findByUsername(resources.getAccount()) != null) {
|
if (userRepository.findByUsername(resources.getShopId()+"@"+resources.getAccount()) != null) {
|
||||||
throw new BadRequestException("员工账号不可重复");
|
throw new BadRequestException("员工账号不可重复");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user