CLS-256, CLS-259 немного поменялось API по meta
This commit is contained in:
parent
a2cc3945f6
commit
4ffbefbbe0
4 changed files with 34 additions and 56 deletions
|
|
@ -67,4 +67,15 @@ public class CompanyController extends AbstractQueueController {
|
|||
@RequestBody CompanyNewAction companyNewAction) throws ExecutionException, InterruptedException {
|
||||
return processRequest(Consts.DESTINATION_COMPANY_NEW, companyNewAction);
|
||||
}
|
||||
|
||||
|
||||
// @ApiOperation(value = "update company.")
|
||||
// @ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)})
|
||||
// @RequestMapping(method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
// @ResponseBody
|
||||
// public CudResponse add(
|
||||
// @ApiParam(value = "Параметры команды в JSON формате.", required = true)
|
||||
// @RequestBody CompanyNewAction companyNewAction) throws ExecutionException, InterruptedException {
|
||||
// return processRequest(Consts.DESTINATION_COMPANY_NEW, companyNewAction);
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,24 +14,26 @@ public class CompanyNewAction implements IAction<CompanyNewRequest> {
|
|||
@ApiModelProperty(value = "Полное наименование Компании", example = "OOO Full Company Name")
|
||||
@JsonProperty
|
||||
private String fullName;
|
||||
@ApiModelProperty(value = "Код участника торгов", example = "TRADINGCODE")
|
||||
|
||||
@ApiModelProperty(value = "Тип реквизита", example = "TRDC")
|
||||
@JsonProperty
|
||||
private String tradingCode;
|
||||
@ApiModelProperty(value = "Код участника клиринга", example = "CLEARINGCODE")
|
||||
private String companySymbol;
|
||||
@ApiModelProperty(value = "Значение реквизита", example = "COMPANYSYMBOL_VALUE-123")
|
||||
@JsonProperty
|
||||
private String clearingCode;
|
||||
@ApiModelProperty(value = "Регистрационный код участника", example = "REGISTRATIONCODE")
|
||||
private String companySymbolValue;
|
||||
@ApiModelProperty(value = "Наименование статуса", example = "ACTV")
|
||||
@JsonProperty
|
||||
private String registrationCode;
|
||||
private String workflowStatus;
|
||||
|
||||
|
||||
@Override
|
||||
public CompanyNewRequest toRequest() {
|
||||
CompanyNewRequest request = new CompanyNewRequest();
|
||||
request.setShortName(this.shortName);
|
||||
request.setFullName(this.fullName);
|
||||
request.setTradingCode(this.tradingCode);
|
||||
request.setClearingCode(this.clearingCode);
|
||||
request.setRegistrationCode(this.registrationCode);
|
||||
request.setCompanySymbol(this.companySymbol);
|
||||
request.setCompanySymbolValue(this.companySymbolValue);
|
||||
request.setWorkflowStatus(this.workflowStatus);
|
||||
return request;
|
||||
}
|
||||
|
||||
|
|
@ -57,27 +59,27 @@ public class CompanyNewAction implements IAction<CompanyNewRequest> {
|
|||
this.fullName = fullName;
|
||||
}
|
||||
|
||||
public String getTradingCode() {
|
||||
return tradingCode;
|
||||
public String getCompanySymbol() {
|
||||
return companySymbol;
|
||||
}
|
||||
|
||||
public void setTradingCode(String tradingCode) {
|
||||
this.tradingCode = tradingCode;
|
||||
public void setCompanySymbol(String companySymbol) {
|
||||
this.companySymbol = companySymbol;
|
||||
}
|
||||
|
||||
public String getClearingCode() {
|
||||
return clearingCode;
|
||||
public String getCompanySymbolValue() {
|
||||
return companySymbolValue;
|
||||
}
|
||||
|
||||
public void setClearingCode(String clearingCode) {
|
||||
this.clearingCode = clearingCode;
|
||||
public void setCompanySymbolValue(String companySymbolValue) {
|
||||
this.companySymbolValue = companySymbolValue;
|
||||
}
|
||||
|
||||
public String getRegistrationCode() {
|
||||
return registrationCode;
|
||||
public String getWorkflowStatus() {
|
||||
return workflowStatus;
|
||||
}
|
||||
|
||||
public void setRegistrationCode(String registrationCode) {
|
||||
this.registrationCode = registrationCode;
|
||||
public void setWorkflowStatus(String workflowStatus) {
|
||||
this.workflowStatus = workflowStatus;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,9 +52,6 @@ public class CompanyService extends QueueConsumer implements InitializingBean {
|
|||
private Function<CompanyNewRequest, IValidator> companyUpdateRequestValidator;
|
||||
private Function<CommonDeleteRequest, IValidator> companyDeleteRequestValidator;
|
||||
|
||||
// Синхронизация обновлений
|
||||
public final Object lockCompany = new Object(); // Company, CompanySymbol,
|
||||
|
||||
@Autowired
|
||||
public CompanyService(Consumer<String, Object> kafkaQueue, Producer<String, Object> kafkaProducer,
|
||||
ImdgProvider imdgProvider,
|
||||
|
|
|
|||
|
|
@ -15,14 +15,6 @@ public class CompanyNewRequest {
|
|||
@JsonProperty
|
||||
private String workflowStatus;
|
||||
|
||||
//todo deprecated 3 field:
|
||||
@JsonProperty
|
||||
private String tradingCode;
|
||||
@JsonProperty
|
||||
private String clearingCode;
|
||||
@JsonProperty
|
||||
private String registrationCode;
|
||||
|
||||
// for update, todo разобраться, это тот же тип запроса или надо отдельный на update сделать?
|
||||
@JsonProperty
|
||||
private Long id;
|
||||
|
|
@ -43,30 +35,6 @@ public class CompanyNewRequest {
|
|||
this.fullName = fullName;
|
||||
}
|
||||
|
||||
public String getTradingCode() {
|
||||
return tradingCode;
|
||||
}
|
||||
|
||||
public void setTradingCode(String tradingCode) {
|
||||
this.tradingCode = tradingCode;
|
||||
}
|
||||
|
||||
public String getClearingCode() {
|
||||
return clearingCode;
|
||||
}
|
||||
|
||||
public void setClearingCode(String clearingCode) {
|
||||
this.clearingCode = clearingCode;
|
||||
}
|
||||
|
||||
public String getRegistrationCode() {
|
||||
return registrationCode;
|
||||
}
|
||||
|
||||
public void setRegistrationCode(String registrationCode) {
|
||||
this.registrationCode = registrationCode;
|
||||
}
|
||||
|
||||
public String getCompanySymbol() {
|
||||
return companySymbol;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue