Search in sources :

Example 6 with RedisService

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

the class TradeRedis method put.

/*     */
/*     */
/*     */
public static void put(List<EntrustTrade> exEntrustlist, String type) /*     */
{
    /* 506 */
    if ((null == exEntrustlist) || (exEntrustlist.size() == 0)) {
        /* 507 */
        return;
    /*     */
    }
    /* 509 */
    RedisService redisService = (RedisService) ContextUtil.getBean("redisService");
    /* 510 */
    if (type.equals("change")) {
        /* 511 */
        String v = redisService.get("changeEntrust");
        /* 512 */
        List<EntrustTrade> list = JSON.parseArray(v, EntrustTrade.class);
        /* 513 */
        if (null == list) {
            /* 514 */
            redisService.save("changeEntrust", JSON.toJSONString(exEntrustlist));
        /*     */
        } else {
            /* 516 */
            for (EntrustTrade entrust : exEntrustlist) {
                /* 517 */
                list.add(entrust);
                /* 518 */
                putEntrustByUser(entrust);
            /*     */
            }
            /* 520 */
            redisService.save("changeEntrust", JSON.toJSONString(list));
        /*     */
        }
    /*     */
    }
/*     */
}
Also used : RedisService(hry.redis.common.utils.RedisService)

Example 7 with RedisService

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

the class TradeRedis method put.

/*     */
/*     */
public static void put(Accountadd accountadd) {
    /* 536 */
    RedisService redisService = (RedisService) ContextUtil.getBean("redisService");
    /* 537 */
    String v = redisService.get("Accountadds");
    /* 538 */
    List<Accountadd> list = JSON.parseArray(v, Accountadd.class);
    /* 539 */
    list.add(accountadd);
    /* 540 */
    redisService.save("Accountadds", JSON.toJSONString(list));
/*     */
}
Also used : RedisService(hry.redis.common.utils.RedisService)

Example 8 with RedisService

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

the class TradeRedis method getStringData.

/*     */
/*     */
public static String getStringData(String key) {
    /* 544 */
    RedisService redisService = (RedisService) ContextUtil.getBean("redisService");
    /* 545 */
    String v = redisService.get(key);
    /* 546 */
    return v;
/*     */
}
Also used : RedisService(hry.redis.common.utils.RedisService)

Example 9 with RedisService

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

the class PushData method pushtheSeatEntrustCenter.

/*     */
/*     */
public static void pushtheSeatEntrustCenter(String pustdata, String currencyType) {
    /*  59 */
    String key = currencyType + ":pushtheSeatEntrustCenter";
    /*  60 */
    RedisService redisService = (RedisService) ContextUtil.getBean("redisService");
    /*  61 */
    String preData = redisService.get(key);
    /*  62 */
    if ((null == preData) || (!preData.equals(pustdata))) {
        /*  63 */
        redisService.save(key, pustdata);
    /*     */
    }
/*     */
}
Also used : RedisService(hry.redis.common.utils.RedisService)

Example 10 with RedisService

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

the class PushData method pushNewRecordList.

/*     */
/*     */
public static void pushNewRecordList(String pustdata, String currencyType) {
    /*  28 */
    String key = currencyType + ":pushNewRecordList";
    /*  29 */
    RedisService redisService = (RedisService) ContextUtil.getBean("redisService");
    /*  30 */
    String preData = redisService.get(key);
    /*  31 */
    if ((null == preData) || (!preData.equals(pustdata))) {
        /*  32 */
        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