class CTNIotServerTool
{
public:
CTNIotServerTool();
~CTNIotServerTool();
string getStrID(const string& sSeqName, const string& sPre, int iSize=6,int iFullDate=1,int iNeedRestart=0);
int command(const string& cmd, const string& param, CTNString& outmsg);
string getORM(string sTable);
int runString(int iLuaID,string sScript);
int use(int iLuaID,string sLuaCode);
int import(int iLuaID,string sLib);
string get(const string& key);
void set(const string& key, const string& v);
void getHelp(const string& key,CSelectHelp& help);
void setHelp(const string& key, CSelectHelp& help);
void dumpKeys();
bool setRedis(const string& key, const string& v);
bool getRedis(const string& key, CTNString& v);
int execCmd(const string & cmd, const string & sqlcode, const string& param, CTNString& sSet, CTNString& sErr);
int execCmdThird(string sServerName, string cmd, string sqlcode, string param, CTNString& sSet, CTNString& sErr);
int commandThird(const string& sServerName, const string& cmd, const string& param, CTNString& outmsg);
string getCache(string sTable, string sKey,string sDestKey);
bool getCacheAll(string sTable, string sKey, CIntent& it);
void delCache(string sTable);
void setCache(string sTable, string sPKID, CSelectHelp& help);
bool getCacheCodeName(const string& sTable, const string& sKey,const string& sDestKey1,const string& sDestKey2, CTNString& sDest1, CTNString& sDest2);
int getCacheHelp(string sTable,string sKey, CSelectHelp& help);
int getCacheHelpLike(string sTable, string sKey, CSelectHelp& help, int imax = 4000);
int findHelp(string sKey, string sField, string sValue, CSelectHelp& help);
int getShiftID(string sEpqtID,string sDateTime,CTNString& sOutShiftDate);
int getShiftIDS(string sEpqtIDS, string sDateTime, CSelectHelp& helpOut);
bool publish(string sMsg,string sQue,string exchange="");
};