use of hry.trade.websoketContext.model.MarketTradesSelf in project benchmark by seelunzi.
the class ExOrderServiceImpl method getNewList.
/* */
/* */
/* */
public String getNewList(String header, Integer count) /* */
{
/* 160 */
if (null == count) {
/* 161 */
count = Integer.valueOf(10);
/* */
}
/* 163 */
ExOrderDao exOrderDao = (ExOrderDao) this.dao;
/* 164 */
String[] headarry = header.split(":");
/* 165 */
Map<String, Object> seramap = new HashMap();
/* 166 */
seramap.put("website", headarry[0]);
/* 167 */
seramap.put("currencyType", headarry[1]);
/* 168 */
seramap.put("coinCode", headarry[2].split("_")[0]);
/* 169 */
seramap.put("fixPriceCoinCode", headarry[2].split("_")[1]);
/* 170 */
seramap.put("count", count);
/* 171 */
List<ExOrder> list = exOrderDao.findNewList(seramap);
/* 172 */
for (ExOrder l : list) {
/* 173 */
l.setTransactionPrice(l.getTransactionPrice().setScale(4, 4));
/* 174 */
l.setTransactionCount(l.getTransactionCount().setScale(4, 4));
/* */
}
/* 176 */
MarketTradesSelf marketTrades = new MarketTradesSelf();
/* 177 */
marketTrades.setTrades(list);
/* 178 */
SimplePropertyPreFilter s = new SimplePropertyPreFilter(ExOrder.class, new String[] { "coinCode", "transactionTime", "transactionPrice", "transactionCount" });
/* 179 */
return JSON.toJSONString(marketTrades, s, new SerializerFeature[0]).toString();
/* */
}
Aggregations