|
|
@ -242,6 +242,7 @@ public class PrivilageAccountServiceImpl extends ServiceImpl<PrivilageAccountDOM
|
|
|
|
String account = modifyAccountInput.getAccount();
|
|
|
|
String account = modifyAccountInput.getAccount();
|
|
|
|
//查询以前的账号名
|
|
|
|
//查询以前的账号名
|
|
|
|
PrivilageAccountDO privilageAccountDO = privilageAccountDOMapper.selectById(modifyAccountInput.getAccountId());
|
|
|
|
PrivilageAccountDO privilageAccountDO = privilageAccountDOMapper.selectById(modifyAccountInput.getAccountId());
|
|
|
|
|
|
|
|
PrivilageUserDO oldUser = privilageUserDOMapper.selectById(modifyAccountInput.getUserId());
|
|
|
|
String oldLogin = privilageAccountDO.getLogin();
|
|
|
|
String oldLogin = privilageAccountDO.getLogin();
|
|
|
|
//修改了账号
|
|
|
|
//修改了账号
|
|
|
|
if (!oldLogin.equals(modifyAccountInput.getAccount())) {
|
|
|
|
if (!oldLogin.equals(modifyAccountInput.getAccount())) {
|
|
|
@ -255,7 +256,7 @@ public class PrivilageAccountServiceImpl extends ServiceImpl<PrivilageAccountDOM
|
|
|
|
QueryWrapper<PrivilageUserDO> mobileUserQw = new QueryWrapper<>();
|
|
|
|
QueryWrapper<PrivilageUserDO> mobileUserQw = new QueryWrapper<>();
|
|
|
|
mobileUserQw.eq("mobil", mobil).eq("status", "1");
|
|
|
|
mobileUserQw.eq("mobil", mobil).eq("status", "1");
|
|
|
|
List<PrivilageUserDO> mobileUsers = privilageUserDOMapper.selectList(mobileUserQw);
|
|
|
|
List<PrivilageUserDO> mobileUsers = privilageUserDOMapper.selectList(mobileUserQw);
|
|
|
|
if (CollectionUtils.isNotEmpty(mobileUsers)) {
|
|
|
|
if (CollectionUtils.isNotEmpty(mobileUsers) && !oldUser.getMobil().equals(mobil)) {
|
|
|
|
return AccountEnum.ACCOUNT_MODIFY_STATUS_MOBILE_EXISTS.getType();
|
|
|
|
return AccountEnum.ACCOUNT_MODIFY_STATUS_MOBILE_EXISTS.getType();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -290,10 +291,14 @@ public class PrivilageAccountServiceImpl extends ServiceImpl<PrivilageAccountDOM
|
|
|
|
|
|
|
|
|
|
|
|
//店长维护用户店铺关系1.店长。4.导购
|
|
|
|
//店长维护用户店铺关系1.店长。4.导购
|
|
|
|
if (shopId != null && (privilageRoleDO.getCode().equals(RoleEnum.ROLE_CODE_DZ.getRoleCode()) || privilageRoleDO.getCode().equals(RoleEnum.ROLE_CODE_DG.getRoleCode()))) {
|
|
|
|
if (shopId != null && (privilageRoleDO.getCode().equals(RoleEnum.ROLE_CODE_DZ.getRoleCode()) || privilageRoleDO.getCode().equals(RoleEnum.ROLE_CODE_DG.getRoleCode()))) {
|
|
|
|
|
|
|
|
QueryWrapper<PoiStoreStaff> oldStaffQw = new QueryWrapper<>();
|
|
|
|
|
|
|
|
oldStaffQw.eq("user_id", userId).eq("status", "1").last("limit 1");
|
|
|
|
|
|
|
|
PoiStoreStaff oldStaffs = poiStoreStaffDOMapper.selectOne(oldStaffQw);
|
|
|
|
|
|
|
|
|
|
|
|
QueryWrapper<PoiStoreStaff> staffQw = new QueryWrapper<>();
|
|
|
|
QueryWrapper<PoiStoreStaff> staffQw = new QueryWrapper<>();
|
|
|
|
staffQw.eq("staff_code", account).eq("status", "1");
|
|
|
|
staffQw.eq("staff_code", account).eq("status", "1");
|
|
|
|
List<PoiStoreStaff> staffs = poiStoreStaffDOMapper.selectList(staffQw);
|
|
|
|
List<PoiStoreStaff> staffs = poiStoreStaffDOMapper.selectList(staffQw);
|
|
|
|
if (CollectionUtils.isNotEmpty(staffs)) {
|
|
|
|
if (CollectionUtils.isNotEmpty(staffs) && !oldStaffs.getStaffCode().equals(account)) {
|
|
|
|
return AccountEnum.ACCOUNT_MODIFY_STATUS_STAFF_EXISTS.getType();
|
|
|
|
return AccountEnum.ACCOUNT_MODIFY_STATUS_STAFF_EXISTS.getType();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
privilageDomainService.saveOneShop(userId, modifyAccountInput.getAccount(), shopId, modifyAccountInput.getType());
|
|
|
|
privilageDomainService.saveOneShop(userId, modifyAccountInput.getAccount(), shopId, modifyAccountInput.getType());
|
|
|
|