company-service улучшил валидацию для Relation companyId
This commit is contained in:
parent
537f8a3ff6
commit
fe241653b5
1 changed files with 4 additions and 1 deletions
|
|
@ -118,7 +118,9 @@ public class RelationService extends QueueConsumer implements InitializingBean {
|
|||
String serviceStatus = req.getServiceStatus();
|
||||
if (serviceStatus == null || serviceStatus.isEmpty()) {
|
||||
Company company = companyMap.getSingleObjectByID(req.getCompanyId());
|
||||
req.setServiceStatus(company.getWorkflowStatus());
|
||||
if (company != null) {
|
||||
req.setServiceStatus(company.getWorkflowStatus());
|
||||
}
|
||||
}
|
||||
}
|
||||
{ // Валидация
|
||||
|
|
@ -281,6 +283,7 @@ public class RelationService extends QueueConsumer implements InitializingBean {
|
|||
// --- internal API ---
|
||||
|
||||
protected void createNewRelation(ImdgTransaction transaction, Long companyId, ClearingMemberCategory clearingMemberCategory) {
|
||||
Objects.requireNonNull(companyId, "companyId");
|
||||
Imdg<Relation> relationMap = transaction.getImdg(IMDGDistributedNames.Map_Relation, Relation.class);
|
||||
Relation relation = new Relation();
|
||||
Company company = transaction.getImdg(IMDGDistributedNames.Map_Company, Company.class).getSingleObjectByFieldValues(Map.of("id", companyId));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue