打印内存表数据
parent
d3f2023ec8
commit
217da21fb9
|
|
@ -0,0 +1,28 @@
|
|||
package com.ljsd.jieling.kefu;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import manager.STableManager;
|
||||
|
||||
public class Cmd_out_cfg extends GmAbstract {
|
||||
@Override
|
||||
public boolean exec(String[] args) throws Exception {
|
||||
|
||||
try {
|
||||
if(args.length!=2){
|
||||
return false;
|
||||
}
|
||||
String name = args[0];
|
||||
int id = Integer.valueOf(args[1]);
|
||||
if(!STableManager.getConfig(Class.forName(name)).containsKey(id)){
|
||||
System.out.print("--systemConfig-id not found");
|
||||
return false;
|
||||
}
|
||||
Gson gson = new Gson();
|
||||
System.out.print("--Config-"+name+"::"+gson.toJson(STableManager.getConfig(Class.forName(name)).get(id)));
|
||||
return true;
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue