use of hry.redis.common.utils.RedisService in project benchmark by seelunzi.
the class PushData method pushNewListRecordMarketAsc.
/* */
/* */
public static void pushNewListRecordMarketAsc(String pustdata, String currencyType) {
/* 88 */
String key = currencyType + ":pushNewListRecordMarket";
/* 89 */
RedisService redisService = (RedisService) ContextUtil.getBean("redisService");
/* 90 */
redisService.save(key, pustdata);
/* */
}
use of hry.redis.common.utils.RedisService 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);
/* */
}
/* */
}
use of hry.redis.common.utils.RedisService in project benchmark by seelunzi.
the class TradeRedis method setStringData.
/* */
/* */
public static void setStringData(String key, String val) {
/* 557 */
RedisService redisService = (RedisService) ContextUtil.getBean("redisService");
/* 558 */
String preData = redisService.save(key, val);
/* */
}
use of hry.redis.common.utils.RedisService in project benchmark by seelunzi.
the class TradeRedis method setcancelSelfOnePrice.
/* */
/* */
public static void setcancelSelfOnePrice(EntrustTrade exEntrust) /* */
{
/* 264 */
RedisService redisService = (RedisService) ContextUtil.getBean("redisService");
/* 265 */
List<BigDecimal> keyslist = getSelfkeys(exEntrust);
/* 266 */
String keyFront = getHeaderFront(exEntrust);
/* 267 */
if ((null != keyslist) && (keyslist.size() > 0)) {
/* 268 */
BigDecimal onePrice = (BigDecimal) keyslist.get(0);
/* 269 */
if (null != onePrice) {
/* 270 */
if (exEntrust.getType().equals(Integer.valueOf(1))) {
/* 271 */
String buyonePricekey = keyFront + ":" + "buyonePrice";
/* 272 */
redisService.save(buyonePricekey, JSON.toJSONString(onePrice));
/* */
} else {
/* 274 */
String sellonePricekey = keyFront + ":" + "sellonePrice";
/* 275 */
redisService.save(sellonePricekey, JSON.toJSONString(onePrice));
/* */
}
/* */
/* */
}
/* */
} else /* 280 */
if (exEntrust.getType().equals(Integer.valueOf(1))) {
/* 281 */
String buyonePricekey = keyFront + ":" + "buyonePrice";
/* 282 */
redisService.delete(buyonePricekey);
/* */
} else {
/* 284 */
String sellonePricekey = keyFront + ":" + "sellonePrice";
/* 285 */
redisService.delete(sellonePricekey);
/* */
}
/* */
}
use of hry.redis.common.utils.RedisService in project benchmark by seelunzi.
the class TradeRedis method putExOrderInfolist.
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
public static void putExOrderInfolist(List<ExOrderInfo> oinfolist) /* */
{
/* 433 */
RedisService redisService = (RedisService) ContextUtil.getBean("redisService");
/* 434 */
String v = redisService.get("exorderinfos");
/* 435 */
List<ExOrderInfo> list = JSON.parseArray(v, ExOrderInfo.class);
/* 436 */
if (null == list) {
/* 437 */
list = new ArrayList();
/* */
}
/* 439 */
for (ExOrderInfo info : oinfolist) {
/* 440 */
list.add(info);
/* */
}
/* 442 */
redisService.save("exorderinfos", JSON.toJSONString(list));
/* */
}
Aggregations