http://jira.mfd.msk:8088/browse/CLS-16 security status/created/updated
This commit is contained in:
parent
edacf7ebea
commit
c242fde299
2 changed files with 8 additions and 0 deletions
|
|
@ -20,6 +20,10 @@
|
|||
<groupId>ru.spcex.platform</groupId>
|
||||
<artifactId>platform-messaging</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.spcex.platform</groupId>
|
||||
<artifactId>platform-enum</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.spcex.platform</groupId>
|
||||
<artifactId>platform-imdg-api-hazelcast-impl</artifactId>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import ru.spcex.platform.imdg.api.ImdgProvider;
|
|||
import ru.spcex.platform.imdg.api.ImdgTransaction;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.Instant;
|
||||
|
||||
@Service
|
||||
public class MoneyMarketSecurityService extends QueueConsumer implements InitializingBean {
|
||||
|
|
@ -86,6 +87,8 @@ public class MoneyMarketSecurityService extends QueueConsumer implements Initial
|
|||
mms.setFullName(req.getFullName());
|
||||
mms.setSecuritySymbol(req.getSecuritySymbol());
|
||||
mms.setSecurityId(mms.getId());
|
||||
mms.setCreated(Instant.now());
|
||||
mms.setWorkflowStatus(ru.spcex.platform.enumeration.Status.Active.getKey());
|
||||
try {
|
||||
transaction.beginTransaction();
|
||||
Imdg<MoneyMarketSecurity> moneyMarketSecurityMap = transaction.getImdg(IMDGDistributedNames.Map_MoneyMarketSecurity, MoneyMarketSecurity.class);
|
||||
|
|
@ -108,6 +111,7 @@ public class MoneyMarketSecurityService extends QueueConsumer implements Initial
|
|||
MoneyMarketSecurityUpdateRequest req = userRequest.getRequestPayload();
|
||||
log.debug("MoneyMarketSecurityUpdateRequest received id = {}", req.getId());
|
||||
MoneyMarketSecurity mms = moneyMarketSecurityMap.getSingleObjectByID(req.getId());
|
||||
mms.setUpdated(Instant.now());
|
||||
mms.setEndDate(req.getEndDate());
|
||||
mms.setNominalValue(req.getNominalValue() != null ? BigDecimal.valueOf(req.getNominalValue()) : null);
|
||||
mms.setNominalCurrency(req.getNominalCurrencyId());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue