add debug
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* @version:
|
||||
* @Date: 2025-02-21 14:03:54
|
||||
* @LastEditors: why
|
||||
* @LastEditTime: 2025-02-25 14:21:42
|
||||
* @LastEditTime: 2025-02-26 10:13:32
|
||||
*/
|
||||
#include <iostream>
|
||||
#include <chrono>
|
||||
@@ -198,6 +198,7 @@ int InsertRecord::HandleMsg(const msg_t msg, handparam_t *param){
|
||||
std::cout << "topic "<<msg.topic.c_str()<<" prase error:"<<e.what();
|
||||
return -1;//format fail
|
||||
}
|
||||
printf("insert request:%s \n",msg.payload.c_str());
|
||||
if(!value.is_object())return -1;
|
||||
if(value.contains("token")){
|
||||
resp["token"] = value["token"];
|
||||
@@ -246,6 +247,7 @@ int InsertRecord::HandleMsg(const msg_t msg, handparam_t *param){
|
||||
resp_msg.topic = ss.str();
|
||||
resp_msg.timestamp = now_to_string();
|
||||
resp_msg.payload = resp.dump();
|
||||
printf("resp:%s \n",resp_msg.payload.c_str());
|
||||
return WriteResponseMsg(resp_msg);
|
||||
}
|
||||
const std::string InsertRecord::GetFID(){
|
||||
|
||||
@@ -26,19 +26,3 @@ class InsertRecord::public IBizService
|
||||
std::string InsertRecord::now_to_string();
|
||||
time_t InsertRecord::string_to_now(std::string stamp);
|
||||
};
|
||||
|
||||
class UpdateRecord::public IBizService {
|
||||
public:
|
||||
void Init(initparam_t *param);
|
||||
int HandleMsg(const msg_t msg, handparam_t *param = NULL);
|
||||
const std::string GetFID();
|
||||
UpdateRecord();
|
||||
~UpdateRecord();
|
||||
private:
|
||||
handparam_t * handpara;
|
||||
initparam_t * initpara;
|
||||
std::vector<std::string> topic;//0:dst 1:src 2:sid 3:fid
|
||||
void topic_split(const std::string& str, char delimiter);
|
||||
InsertRecord::SQLBatch_exc(std::vector<std::string> &sql_list,std::vector<std::string> &result);
|
||||
std::string InsertRecord::now_to_string();
|
||||
}
|
||||
Reference in New Issue
Block a user