去掉返回值字段名称中的空格。

This commit is contained in:
wuwei1972 2019-09-12 23:36:11 +08:00
parent a26ed19789
commit 7ed3bb9da7

View File

@ -248,7 +248,7 @@ class RestActor(moduleName: String) extends ModuleBase(moduleName) {
val r = bb match {
case null => QueryResult(None)
case _ =>
QueryResult(Option(JsonMethods.parse(string2JsonInput("{"+"\"create time\":\""+bb+"\"}"))))
QueryResult(Option(JsonMethods.parse(string2JsonInput("{"+"\"createtime\":\""+bb+"\"}"))))
}
sender ! r
@ -257,7 +257,7 @@ class RestActor(moduleName: String) extends ModuleBase(moduleName) {
val r = bb match {
case null => QueryResult(None)
case _ =>
QueryResult(Option(JsonMethods.parse(string2JsonInput("{"+"\"create time\":\""+bb+"\"}"))))
QueryResult(Option(JsonMethods.parse(string2JsonInput("{"+"\"createtime\":\""+bb+"\"}"))))
}
sender ! r
@ -315,12 +315,12 @@ class RestActor(moduleName: String) extends ModuleBase(moduleName) {
case NodeNumber =>
val stablenode = pe.getNodeMgr.getStableNodes.size
val snode = pe.getNodeMgr.getNodes.size
val rs = "{\"consensus nodes\":\""+stablenode+"\",\"nodes\":\""+snode+"\"}"
val rs = "{\"consensusnodes\":\""+stablenode+"\",\"nodes\":\""+snode+"\"}"
sender ! QueryResult(Option(JsonMethods.parse(string2JsonInput(rs))))
case TransNumber =>
val num = pe.getTransPoolMgr.getTransLength()
val rs = "{\"number of cache\":\""+num+"\"}"
val rs = "{\"numberofcache\":\""+num+"\"}"
sender ! QueryResult(Option(JsonMethods.parse(string2JsonInput(rs))))