Search in sources :

Example 21 with RedisService

use of hry.redis.common.utils.RedisService in project benchmark by seelunzi.

the class TradeRedis method putchange.

/*     */
/*     */
public static void putchange(EntrustTrade entrust) /*     */
{
    /* 396 */
    RedisService redisService = (RedisService) ContextUtil.getBean("redisService");
    /* 397 */
    String v = redisService.get("changeEntrust");
    /* 398 */
    List<EntrustTrade> list = JSON.parseArray(v, EntrustTrade.class);
    /* 399 */
    if (null == list) {
        /* 400 */
        list = new ArrayList();
    /*     */
    }
    /*     */
    /* 403 */
    list.add(entrust);
    /*     */
    /*     */
    /* 406 */
    redisService.save("changeEntrust", JSON.toJSONString(list));
/*     */
}
Also used : RedisService(hry.redis.common.utils.RedisService)

Example 22 with RedisService

use of hry.redis.common.utils.RedisService in project benchmark by seelunzi.

the class TradeRedis method getTradeDealEntrustChangeNum.

/*     */
/*     */
public static String getTradeDealEntrustChangeNum() {
    /* 142 */
    RedisService redisService = (RedisService) ContextUtil.getBean("redisService");
    /* 143 */
    String v = redisService.get("deal:tradeDealEntrustChangeNum");
    /* 144 */
    if ((!StringUtil.isEmpty(v)) && (!"null".equals(v))) {
        /* 145 */
        String num = String.valueOf(Integer.valueOf(v).intValue() + 1);
        /* 146 */
        redisService.save("deal:tradeDealEntrustChangeNum", num);
        /* 147 */
        return "deal:tradeDealEntrustChange:" + num;
    /*     */
    }
    /* 149 */
    redisService.save("deal:tradeDealEntrustChangeNum", "0");
    /* 150 */
    return "deal:tradeDealEntrustChange:0";
/*     */
}
Also used : RedisService(hry.redis.common.utils.RedisService)

Example 23 with RedisService

use of hry.redis.common.utils.RedisService in project benchmark by seelunzi.

the class PushData method pushIndex.

/*     */
/*     */
public static void pushIndex(String pustdata, String currencyType) /*     */
{
    /*  38 */
    String key = currencyType + ":pushIndex";
    /*  39 */
    RedisService redisService = (RedisService) ContextUtil.getBean("redisService");
    /*  40 */
    String preData = redisService.get(key);
    /*  41 */
    if ((null == preData) || (!preData.equals(pustdata))) {
        /*  42 */
        redisService.save(key, pustdata);
    /*     */
    }
/*     */
}
Also used : RedisService(hry.redis.common.utils.RedisService)

Example 24 with RedisService

use of hry.redis.common.utils.RedisService in project benchmark by seelunzi.

the class PushData method pushtheSeatEntrustDephCenter.

/*     */
/*     */
public static void pushtheSeatEntrustDephCenter(String pustdata, String currencyType, String key1) /*     */
{
    /*  69 */
    String key = currencyType + ":pushtheSeatEntrustCenter" + key1;
    /*  70 */
    RedisService redisService = (RedisService) ContextUtil.getBean("redisService");
    /*  71 */
    String preData = redisService.get(key);
    /*  72 */
    if ((null == preData) || (!preData.equals(pustdata))) {
        /*  73 */
        redisService.save(key, pustdata);
    /*     */
    }
/*     */
}
Also used : RedisService(hry.redis.common.utils.RedisService)

Example 25 with RedisService

use of hry.redis.common.utils.RedisService in project benchmark by seelunzi.

the class PushData method pushEntrusDephMarket.

/*     */
/*     */
public static void pushEntrusDephMarket(String pustdata, String currencyType, String key1) /*     */
{
    /*  79 */
    String key = currencyType + ":pushEntrusMarket" + key1;
    /*  80 */
    RedisService redisService = (RedisService) ContextUtil.getBean("redisService");
    /*  81 */
    String preData = redisService.get(key);
    /*  82 */
    if ((null == preData) || (!preData.equals(pustdata))) {
        /*  83 */
        redisService.save(key, pustdata);
    /*     */
    }
/*     */
}
Also used : RedisService(hry.redis.common.utils.RedisService)

Aggregations

RedisService (hry.redis.common.utils.RedisService)29 ExOrderInfo (hry.trade.entrust.model.ExOrderInfo)4 RedisTradeService (hry.redis.common.utils.RedisTradeService)3 BigDecimal (java.math.BigDecimal)3 ExCointoCoin (hry.exchange.product.model.ExCointoCoin)1 ExEntrustService (hry.trade.entrust.service.ExEntrustService)1