张洋 преди 2 години
родител
ревизия
057f474818

BIN
bin/Win32/Release/setup/zhipuzi_pos_windows_setup_1.0.1.4.exe


+ 3 - 0
zhipuzi_pos_windows/helper/CLewaimaiJson.h

@@ -33,7 +33,10 @@ public:
 	//把一个map转化成json字符串,map的key是json的名字,map的value是json的value
 	static std::string ParamMapToJsonstring(std::map<string, string> param);
 
+	//把json值转换成字符串类型,兼容各种后端返回类型,避免报错
 	static std::string ToString(const rapidjson::Value& valObj);
+
+	//把json值转换成整数类型,兼容各种后端返回类型,避免报错
 	static int ToInt(const rapidjson::Value& valObj);
 };
 

+ 1 - 1
zhipuzi_pos_windows/zhipuzi/CWaimaiOrder.cpp

@@ -118,7 +118,7 @@ bool CWaimaiOrder::InitData(std::string order_id, std::string order_no)
             m_delivery_date = data["delivery_date"].GetString();
             m_courier = data["courier"].GetString();
             m_delivertime = data["delivertime"].GetString();
-            m_customer_order_total = data["customer_order_total"].GetString();
+			m_customer_order_total = CLewaimaiJson::ToString(data["customer_order_total"]);
 
             m_invoice = data["invoice"].GetInt();