SUPPORT-9541: add login
This commit is contained in:
parent
c57c7af095
commit
a302ac6b15
6 changed files with 44 additions and 9 deletions
|
|
@ -1,14 +1,15 @@
|
|||
package ru.micord.ervu.account_applications.kafka.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* @author Adel Kalimullin
|
||||
*/
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public record DeclarationStatus(
|
||||
@JsonProperty("applicationNumber") Long applicationNumber,
|
||||
@JsonProperty("password") String password,
|
||||
@JsonProperty("status") boolean status,
|
||||
@JsonProperty("userName") String userName,
|
||||
@JsonProperty("description") String errorMsg
|
||||
) {}
|
||||
|
|
@ -31,6 +31,8 @@ import {BlockedRegion} from "../../../generated/ru/micord/ervu/account_applicati
|
|||
import {ErvuPermission} from "../../../modules/app/enum/ErvuPermission";
|
||||
import {BlockingData} from "./dto/blocking/BlockingData";
|
||||
import {UnblockingData} from "./dto/blocking/UnblockingData";
|
||||
import {AccountDetails} from "./dto/blocking/AccountDetails";
|
||||
import {PersonDetails} from "./dto/blocking/PersonDetails";
|
||||
|
||||
@AnalyticalScope(Form)
|
||||
export class UserManagementService extends Behavior {
|
||||
|
|
@ -67,6 +69,7 @@ export class UserManagementService extends Behavior {
|
|||
const appNumber = formJson['appNumber'];
|
||||
const accountId = formJson['accountId'];
|
||||
const personId = formJson['idPerson'];
|
||||
const login = formJson['login'];
|
||||
let request;
|
||||
|
||||
switch (kind) {
|
||||
|
|
@ -131,7 +134,9 @@ export class UserManagementService extends Behavior {
|
|||
break;
|
||||
case ApplicationKind.BLOCK_USER:
|
||||
let blockingData = new BlockingData();
|
||||
blockingData.accountIdList = [accountId];
|
||||
blockingData.accountList = [
|
||||
new AccountDetails(accountId, login)
|
||||
];
|
||||
request = new ProcessRequest<BlockingData>();
|
||||
request.data = blockingData;
|
||||
request.processKey = ProcessKey.BLOCK;
|
||||
|
|
@ -143,14 +148,22 @@ export class UserManagementService extends Behavior {
|
|||
|
||||
switch (blockedRegion) {
|
||||
case BlockedRegion.ACCOUNT:
|
||||
unblockingData.accountIdList = [accountId];
|
||||
unblockingData.accountList = [
|
||||
new AccountDetails(accountId, login)
|
||||
];
|
||||
break;
|
||||
case BlockedRegion.PERSON:
|
||||
unblockingData.personIdList = [personId];
|
||||
unblockingData.personList = [
|
||||
new PersonDetails(personId, login)
|
||||
];
|
||||
break;
|
||||
case BlockedRegion.BOTH:
|
||||
unblockingData.accountIdList = [accountId];
|
||||
unblockingData.personIdList = [personId];
|
||||
unblockingData.accountList = [
|
||||
new AccountDetails(accountId, login)
|
||||
];
|
||||
unblockingData.personList = [
|
||||
new PersonDetails(personId, login)
|
||||
];
|
||||
break;
|
||||
}
|
||||
request = new ProcessRequest<UnblockingData>();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
export class AccountDetails {
|
||||
public accountId: string;
|
||||
public login: string;
|
||||
|
||||
constructor(accountId: string, login: string) {
|
||||
this.accountId = accountId;
|
||||
this.login = login;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
import {Data} from "../Data";
|
||||
import {AccountDetails} from "./AccountDetails";
|
||||
|
||||
export class BlockingData extends Data {
|
||||
public accountIdList: string[];
|
||||
public accountList: AccountDetails[];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
export class PersonDetails {
|
||||
public personId: string;
|
||||
public login: string;
|
||||
|
||||
constructor(personId: string, login: string) {
|
||||
this.personId = personId;
|
||||
this.login = login;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
import {Data} from "../Data";
|
||||
import {AccountDetails} from "./AccountDetails";
|
||||
import { PersonDetails } from "./PersonDetails";
|
||||
|
||||
export class UnblockingData extends Data {
|
||||
public accountIdList: string[] = [];
|
||||
public personIdList: string[] = [];
|
||||
public accountList: AccountDetails[] = [];
|
||||
public personList: PersonDetails[] = [];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue