Commit 2e37a54c by guanghui.cui

pk_id 更换类型为 uint64_t

parent 33248ce0
...@@ -755,7 +755,7 @@ bool JsonModule::getOdsResponseData(int status_code, const std::string &msg, IN ...@@ -755,7 +755,7 @@ bool JsonModule::getOdsResponseData(int status_code, const std::string &msg, IN
return false; return false;
} }
int pk_id = GetJsonIntSafe(document, "pk_id"); uint64_t pk_id = GetJsonIntSafe(document, "pk_id");
rapidjson::Value& orderContent_obj = document["orderContent"]; rapidjson::Value& orderContent_obj = document["orderContent"];
if (orderContent_obj.HasMember("orders")) { if (orderContent_obj.HasMember("orders")) {
rapidjson::Value& orders_obj = orderContent_obj["orders"]; rapidjson::Value& orders_obj = orderContent_obj["orders"];
...@@ -788,7 +788,7 @@ bool JsonModule::getOdsResponseData(int status_code, const std::string &msg, IN ...@@ -788,7 +788,7 @@ bool JsonModule::getOdsResponseData(int status_code, const std::string &msg, IN
writer.String(msg.c_str()); writer.String(msg.c_str());
writer.Key("pk_id"); writer.Key("pk_id");
writer.Int(pk_id); writer.Uint64(pk_id);
writer.EndObject(); writer.EndObject();
...@@ -1732,7 +1732,7 @@ bool JsonModule::_getOrderResponseJson(IN const std::string& posResponse, IN con ...@@ -1732,7 +1732,7 @@ bool JsonModule::_getOrderResponseJson(IN const std::string& posResponse, IN con
int status = document1["ods_status"].GetInt(); int status = document1["ods_status"].GetInt();
std::string channel = document1["channel"].GetString(); std::string channel = document1["channel"].GetString();
int pk_id = GetJsonIntSafe(document2,"pk_id"); uint64_t pk_id = GetJsonIntSafe(document2,"pk_id");
rapidjson::StringBuffer buffer; rapidjson::StringBuffer buffer;
rapidjson::Writer<rapidjson::StringBuffer> writer(buffer); rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
...@@ -1757,7 +1757,7 @@ bool JsonModule::_getOrderResponseJson(IN const std::string& posResponse, IN con ...@@ -1757,7 +1757,7 @@ bool JsonModule::_getOrderResponseJson(IN const std::string& posResponse, IN con
writer.String(msg.c_str()); writer.String(msg.c_str());
writer.Key("pk_id"); writer.Key("pk_id");
writer.Int(pk_id); writer.Uint64(pk_id);
//该状态表示商品在pos中不存在,需要返回字段给中台,由于双方命名规则不一致,所以这里拼上中台需要字段 //该状态表示商品在pos中不存在,需要返回字段给中台,由于双方命名规则不一致,所以这里拼上中台需要字段
if (103 == status_code) { if (103 == status_code) {
...@@ -1798,7 +1798,7 @@ bool JsonModule::_getStockWarnResponseJson(IN const std::string& posResponse, IN ...@@ -1798,7 +1798,7 @@ bool JsonModule::_getStockWarnResponseJson(IN const std::string& posResponse, IN
std::string channel = document2["channel"].GetString(); std::string channel = document2["channel"].GetString();
int64_t alertTime = document2["alertTime"].GetInt64(); int64_t alertTime = document2["alertTime"].GetInt64();
std::string storeId = document2["storeId"].GetString(); std::string storeId = document2["storeId"].GetString();
int pk_id = GetJsonIntSafe(document2,"pk_id"); uint64_t pk_id = GetJsonIntSafe(document2,"pk_id");
rapidjson::StringBuffer buffer; rapidjson::StringBuffer buffer;
rapidjson::Writer<rapidjson::StringBuffer> writer(buffer); rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
...@@ -1820,7 +1820,7 @@ bool JsonModule::_getStockWarnResponseJson(IN const std::string& posResponse, IN ...@@ -1820,7 +1820,7 @@ bool JsonModule::_getStockWarnResponseJson(IN const std::string& posResponse, IN
writer.Int(status_code); writer.Int(status_code);
writer.Key("pk_id"); writer.Key("pk_id");
writer.Int(pk_id); writer.Uint64(pk_id);
writer.EndObject(); writer.EndObject();
...@@ -1909,7 +1909,7 @@ std::string JsonModule::_convertToQueryOrderStatusJson(IN const char* json) ...@@ -1909,7 +1909,7 @@ std::string JsonModule::_convertToQueryOrderStatusJson(IN const char* json)
bool JsonModule::_getCommonWarnResponseJson(IN const std::string& posResponse, IN const std::string& orderData, IN const std::string& odsData,OUT std::string& result) bool JsonModule::_getCommonWarnResponseJson(IN const std::string& posResponse, IN const std::string& orderData, IN const std::string& odsData,OUT std::string& result)
{ {
std::string notifyDate,rackNo,storeId,terminalNo; std::string notifyDate,rackNo,storeId,terminalNo;
int64_t iDatetime=0,pk_id; uint64_t iDatetime=0,pk_id;
rapidjson::Document document,document1; // 定义一个Document对象 rapidjson::Document document,document1; // 定义一个Document对象
document1.Parse(odsData.data()); // 解析,Parse()无返回值,也不会抛异常 document1.Parse(odsData.data()); // 解析,Parse()无返回值,也不会抛异常
if (document1.HasParseError()) // 通过HasParseError()来判断解析是否成功 if (document1.HasParseError()) // 通过HasParseError()来判断解析是否成功
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment