removed unused class, log fix
This commit is contained in:
parent
c242fde299
commit
5d08d3e438
3 changed files with 2 additions and 61 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -3,3 +3,4 @@ target
|
||||||
*.iml
|
*.iml
|
||||||
logs
|
logs
|
||||||
tmp_notes.**
|
tmp_notes.**
|
||||||
|
tmp
|
||||||
|
|
|
||||||
|
|
@ -1,61 +0,0 @@
|
||||||
package ru.spcex.clearing.balance.service;
|
|
||||||
|
|
||||||
import org.apache.kafka.clients.consumer.Consumer;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.InitializingBean;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import ru.clearing.classes.statics.data.sdf.SDf02;
|
|
||||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
|
||||||
import ru.spcex.clearing.platform.messaging.domain.BaseRequest;
|
|
||||||
import ru.spcex.clearing.platform.messaging.domain.Consts;
|
|
||||||
import ru.spcex.clearing.platform.messaging.domain.cud.balance.SDf02NewRequest;
|
|
||||||
import ru.spcex.clearing.platform.messaging.service.QueueConsumer;
|
|
||||||
import ru.spcex.platform.imdg.api.Imdg;
|
|
||||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
|
||||||
|
|
||||||
//fixme remove
|
|
||||||
@Deprecated
|
|
||||||
@Service
|
|
||||||
public class Sdf02Service extends QueueConsumer implements InitializingBean {
|
|
||||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
|
||||||
private final Imdg<SDf02> sdf8Map;
|
|
||||||
|
|
||||||
|
|
||||||
public Sdf02Service(Consumer<String, Object> kafkaQueue, ImdgProvider imdgProvider) {
|
|
||||||
super(kafkaQueue);
|
|
||||||
this.sdf8Map = imdgProvider.getImdg(IMDGDistributedNames.Map_SDf02, SDf02.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void afterPropertiesSet() {
|
|
||||||
callback(SDf02NewRequest.class)
|
|
||||||
.setConsumer(this::newSDf02)
|
|
||||||
.forDestination(Consts.DESTINATION_SDF02_NEW, callbacks::put);
|
|
||||||
init();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void newSDf02(BaseRequest<SDf02NewRequest> userRequest) {
|
|
||||||
SDf02NewRequest req = userRequest.getRequestPayload();
|
|
||||||
log.debug("SDf02NewRequest received");
|
|
||||||
SDf02 sDf02 = new SDf02();
|
|
||||||
sDf02.setCurr_code(req.getCurr_code());
|
|
||||||
sDf02.setAccount(req.getAccount());
|
|
||||||
sDf02.setRemainder(req.getRemainder());
|
|
||||||
sDf02.setDeal(req.getDeal());
|
|
||||||
sDf02.setAcc_code(req.getAcc_code());
|
|
||||||
sDf02.setDat(req.getDat());
|
|
||||||
sDf02.setMarket(req.getMarket());
|
|
||||||
sDf02.setAcc_name(req.getAcc_name());
|
|
||||||
sDf02.setAcc_type(req.getAcc_type());
|
|
||||||
sDf02.setSumengage(req.getSumengage());
|
|
||||||
sDf02.setSumunblock(req.getSumunblock());
|
|
||||||
sDf02.setFile_type(req.getFile_type());
|
|
||||||
sDf02.setResult(req.getResult());
|
|
||||||
// sDf02.setFileName(req.getFileName());
|
|
||||||
sDf02.setGenerationTime(req.getGenerationTime());
|
|
||||||
sDf02.setGenerationId(req.getGenerationId());
|
|
||||||
sdf8Map.insert(sDf02);
|
|
||||||
log.debug("successfully processed, new id {}", sDf02.getId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -107,6 +107,7 @@ public final class HazelcastHelper {
|
||||||
log.info("Wait till STORAGE be ready...");
|
log.info("Wait till STORAGE be ready...");
|
||||||
Thread.sleep(100);
|
Thread.sleep(100);
|
||||||
}
|
}
|
||||||
|
log.info("STORAGE connected!");
|
||||||
} catch (HazelcastException hcEx) {
|
} catch (HazelcastException hcEx) {
|
||||||
// проброс InterruptException из Hazelcast
|
// проброс InterruptException из Hazelcast
|
||||||
if (hcEx instanceof HazelcastException && hcEx.getCause() instanceof InterruptedException)
|
if (hcEx instanceof HazelcastException && hcEx.getCause() instanceof InterruptedException)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue