Search in sources :

Example 1 with ExEntrustService

use of hry.trade.entrust.service.ExEntrustService in project benchmark by seelunzi.

the class ExEntrutKlineRunable method run.

/*    */
/*    */
public void run() {
    /* 26 */
    long start = System.currentTimeMillis();
    /* 27 */
    ExEntrustService entrustService = (ExEntrustService) ContextUtil.getBean("exEntrustService");
    /* 28 */
    ExOrderService exOrderService = (ExOrderService) ContextUtil.getBean("exOrderService");
    /*    */
    /*    */
    /* 31 */
    PushData.pushEntrusMarket(entrustService.getExEntrustChangeMarket(this.coinCode, this.fixPriceCoinCode, Integer.valueOf(18)), this.header);
    /* 32 */
    long end1 = System.currentTimeMillis();
    /*    */
    /*    */
    /* 35 */
    PushData.pushNewListRecordMarketDesc(exOrderService.getNewListMarket(this.header, "desc"), this.header);
    /* 36 */
    long end2 = System.currentTimeMillis();
/*    */
}
Also used : ExEntrustService(hry.trade.entrust.service.ExEntrustService) ExOrderService(hry.trade.entrust.service.ExOrderService)

Example 2 with ExEntrustService

use of hry.trade.entrust.service.ExEntrustService in project benchmark by seelunzi.

the class ExEntrustServiceImpl method initTradeRedis.

/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
public void initTradeRedis() /*     */
{
    /*  87 */
    RedisService redisService = (RedisService) ContextUtil.getBean("redisService");
    /*  88 */
    ExEntrustService exEntrustService = (ExEntrustService) ContextUtil.getBean("exEntrustService");
    /*     */
    /*     */
    /*     */
    /*  92 */
    List<ExCointoCoin> listExCointoCoin = this.commonDao.getExointocoinValid();
    /*  93 */
    for (ExCointoCoin exCointoCoin : listExCointoCoin) {
        /*  94 */
        String header = getHeader(exCointoCoin.getCoinCode(), exCointoCoin.getFixPriceCoinCode());
        /*  95 */
        this.exOrderService.setLastExchangPrice(header);
        /*  96 */
        this.exOrderService.setCurrentExchangPrice(header);
    /*     */
    }
/*     */
}
Also used : ExEntrustService(hry.trade.entrust.service.ExEntrustService) ExCointoCoin(hry.exchange.product.model.ExCointoCoin) RedisService(hry.redis.common.utils.RedisService)

Example 3 with ExEntrustService

use of hry.trade.entrust.service.ExEntrustService in project benchmark by seelunzi.

the class ExEntrustServiceImpl method addExEntrust.

/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
/*     */
public String addExEntrust(Integer fixPriceType, Integer type, Long customerId, BigDecimal price, String autoUsername, String coinCode, BigDecimal entrustCount, String currencyType, String website) /*     */
{
    /* 377 */
    long start1 = System.currentTimeMillis();
    /* 378 */
    EntrustTrade exEntrust = new EntrustTrade();
    /* 379 */
    String[] rtd = coinCode.split("_");
    /* 380 */
    if (rtd.length == 1) {
        /* 381 */
        return "";
    /*     */
    }
    /* 383 */
    exEntrust.setFixPriceCoinCode(rtd[1]);
    /* 384 */
    exEntrust.setCoinCode(rtd[0]);
    /*     */
    /* 386 */
    exEntrust.setFixPriceType(fixPriceType);
    /* 387 */
    exEntrust.setType(type);
    /* 388 */
    exEntrust.setEntrustPrice(price);
    /* 389 */
    exEntrust.setEntrustCount(entrustCount);
    /* 390 */
    if ((price.compareTo(new BigDecimal(0)) == 0) || (entrustCount.compareTo(new BigDecimal(0)) == 0)) {
        /* 391 */
        return "";
    /*     */
    }
    /* 393 */
    exEntrust.setEntrustSum(new BigDecimal("0"));
    /* 394 */
    exEntrust.setEntrustWay(Integer.valueOf(1));
    /* 395 */
    exEntrust.setCustomerId(customerId);
    /*     */
    /*     */
    /*     */
    /*     */
    /*     */
    /* 401 */
    exEntrust.setSource(Integer.valueOf(2));
    /* 402 */
    exEntrust.setUserName(autoUsername);
    /* 403 */
    exEntrust.setTrueName("机器人");
    /* 404 */
    ExEntrustService exEntrustService = (ExEntrustService) ContextUtil.getBean("exEntrustService");
    /* 405 */
    initExEntrust(exEntrust);
    /* 406 */
    MQEnter.pushExEntrustMQ(exEntrust);
    /* 407 */
    return "";
/*     */
}
Also used : EntrustTrade(hry.trade.redis.model.EntrustTrade) ExEntrustService(hry.trade.entrust.service.ExEntrustService) BigDecimal(java.math.BigDecimal)

Aggregations

ExEntrustService (hry.trade.entrust.service.ExEntrustService)3 ExCointoCoin (hry.exchange.product.model.ExCointoCoin)1 RedisService (hry.redis.common.utils.RedisService)1 ExOrderService (hry.trade.entrust.service.ExOrderService)1 EntrustTrade (hry.trade.redis.model.EntrustTrade)1 BigDecimal (java.math.BigDecimal)1