Commit 29f0d7f2 by guanghui.cui

商品详情添加原价字段

parent 4ff5cce1
......@@ -12,7 +12,8 @@ struct product
std::string bom_id; //商品分组组合ID
std::string bag_id; //商品口袋ID
std::string name; //商品名称
int price=0; //商品价格
int original_price = 0; //商品原价
int price=0; //商品价格(折后价)
int qty=0; //商品数量
std::string sku; //商品SKU
};
......
......@@ -260,6 +260,7 @@ bool JsonModule::getPushOrders(IN const char* json,OUT orderObj &order)
structProduct.pro.combo_id = GetJsonStringSafe(product_obj,"catgId");
structProduct.pro.bom_id = GetJsonStringSafe(product_obj,"groupIndex");
structProduct.pro.name = GetJsonStringSafe(product_obj,"name");
structProduct.pro.original_price = GetJsonIntSafe(product_obj, "originalPrice");
structProduct.pro.price = GetJsonIntSafe(product_obj,"price");
GetJsonStringSafe(product_obj,"productType");
structProduct.pro.qty = GetJsonIntSafe(product_obj,"qty");
......@@ -1021,6 +1022,9 @@ std::string JsonModule::_convertToNewOrderJson(orderObj &obj)
writer.Key("name");
writer.String(obj.vecProducts[i].pro.name.c_str());
writer.Key("original_price");
writer.Int(obj.vecProducts[i].pro.original_price);
writer.Key("price");
writer.Int(obj.vecProducts[i].pro.price);
......
......@@ -247,7 +247,7 @@ int main()
#ifdef WIN32
WSADATA transData;
WSAStartup(MAKEWORD(2, 2), &transData);
//ShowWindow(GetConsoleWindow(), SW_HIDE); //隐藏窗口,后台运行
ShowWindow(GetConsoleWindow(), SW_HIDE); //隐藏窗口,后台运行
#else
signal(SIGPIPE, SIG_IGN);
#endif
......
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