打印内存表数据

zhangshanxue 2019-12-08 11:41:23 +08:00
parent d3f2023ec8
commit 217da21fb9
1 changed files with 28 additions and 0 deletions

View File

@ -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;
}
}