SUPPORT-9212: fix
This commit is contained in:
parent
603322a301
commit
acfb45e7d5
2 changed files with 8 additions and 9 deletions
|
|
@ -22,10 +22,10 @@ public class AccountDataDao extends AbstractDataDao<AccountRecord> {
|
|||
}
|
||||
|
||||
public List<String> getAccountIdsByPersonId(String personId) {
|
||||
return getValuesByField(ACCOUNT.ID, ACCOUNT.PERSON_ID, personId);
|
||||
return getValuesByField(Tables.ACCOUNT.ID, Tables.ACCOUNT.PERSON_ID, personId);
|
||||
}
|
||||
|
||||
public void deleteByIds(List<String> ids){
|
||||
public void deleteByIds(List<String> ids) {
|
||||
deleteByFieldInValues(Tables.ACCOUNT.ID, ids);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import org.springframework.stereotype.Component;
|
|||
import ru.micord.webbpm.ervu.business_metrics.db_beans.idm_reconcile.Tables;
|
||||
import ru.micord.webbpm.ervu.business_metrics.db_beans.idm_reconcile.tables.records.AccountRoleRecord;
|
||||
|
||||
import static ru.micord.webbpm.ervu.business_metrics.db_beans.idm_reconcile.Tables.ACCOUNT_ROLE;
|
||||
|
||||
/**
|
||||
* @author Adel Kalimullin
|
||||
|
|
@ -24,24 +23,24 @@ public class AccountRoleDataDao extends AbstractDataDao<AccountRoleRecord> {
|
|||
}
|
||||
|
||||
public List<String> getRoleIdsByAccountId(String accountId) {
|
||||
return getValuesByField(ACCOUNT_ROLE.ROLE_ID, ACCOUNT_ROLE.ACCOUNT_ID, accountId);
|
||||
return getValuesByField(Tables.ACCOUNT_ROLE.ROLE_ID, Tables.ACCOUNT_ROLE.ACCOUNT_ID, accountId);
|
||||
}
|
||||
|
||||
public void deleteAccountRolesByAccountIdAndRoleIds(String accountId, List<String> roleIds) {
|
||||
deleteByFieldAndInValues(
|
||||
ACCOUNT_ROLE.ACCOUNT_ID, accountId,
|
||||
ACCOUNT_ROLE.ROLE_ID, roleIds
|
||||
Tables.ACCOUNT_ROLE.ACCOUNT_ID, accountId,
|
||||
Tables.ACCOUNT_ROLE.ROLE_ID, roleIds
|
||||
);
|
||||
}
|
||||
|
||||
public void deleteByAccountIds(List<String> accountIds) {
|
||||
deleteByFieldInValues(ACCOUNT_ROLE.ACCOUNT_ID, accountIds);
|
||||
deleteByFieldInValues(Tables.ACCOUNT_ROLE.ACCOUNT_ID, accountIds);
|
||||
}
|
||||
|
||||
public void deleteAccountRole(AccountRoleRecord record) {
|
||||
Map<Field<String>, String> conditions = Map.of(
|
||||
ACCOUNT_ROLE.ACCOUNT_ID, record.getAccountId(),
|
||||
ACCOUNT_ROLE.ROLE_ID, record.getRoleId()
|
||||
Tables.ACCOUNT_ROLE.ACCOUNT_ID, record.getAccountId(),
|
||||
Tables.ACCOUNT_ROLE.ROLE_ID, record.getRoleId()
|
||||
);
|
||||
|
||||
deleteByValues(conditions);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue