Commit 439c74e3 by guanghui.cui

增加券id字段

parent f652ea28
...@@ -134,6 +134,7 @@ struct promotions ...@@ -134,6 +134,7 @@ struct promotions
std::string desc; //优惠明细 std::string desc; //优惠明细
std::string name; //名称 std::string name; //名称
std::string sku; //商品编号 std::string sku; //商品编号
std::string couponId; //券id
int originalPrice=0; //原始价格 int originalPrice=0; //原始价格
int discount=0; //折扣 int discount=0; //折扣
int promotionPrice=0; //优惠价格 int promotionPrice=0; //优惠价格
......
...@@ -384,6 +384,7 @@ bool JsonModule::getPushOrders(IN const char* json,OUT orderObj &order) ...@@ -384,6 +384,7 @@ bool JsonModule::getPushOrders(IN const char* json,OUT orderObj &order)
detail.proType = GetJsonStringSafe(promtionDetails_obj,"type"); detail.proType = GetJsonStringSafe(promtionDetails_obj,"type");
detail.desc = GetJsonStringSafe(promtionDetails_obj,"desc"); detail.desc = GetJsonStringSafe(promtionDetails_obj,"desc");
detail.sku = GetJsonStringSafe(promtionDetails_obj,"sku"); detail.sku = GetJsonStringSafe(promtionDetails_obj,"sku");
detail.couponId = GetJsonStringSafe(promtionDetails_obj, "couponId");
detail.originalPrice = GetJsonIntSafe(promtionDetails_obj,"originalPrice"); detail.originalPrice = GetJsonIntSafe(promtionDetails_obj,"originalPrice");
detail.promotionPrice = GetJsonIntSafe(promtionDetails_obj,"promotionPrice"); detail.promotionPrice = GetJsonIntSafe(promtionDetails_obj,"promotionPrice");
detail.discount = GetJsonIntSafe(promtionDetails_obj,"discount"); detail.discount = GetJsonIntSafe(promtionDetails_obj,"discount");
...@@ -1367,6 +1368,9 @@ std::string JsonModule::_convertToNewOrderJson(orderObj &obj) ...@@ -1367,6 +1368,9 @@ std::string JsonModule::_convertToNewOrderJson(orderObj &obj)
writer.Key("giftQty"); writer.Key("giftQty");
writer.Int(obj.vecPromotions[i].giftQty); writer.Int(obj.vecPromotions[i].giftQty);
writer.Key("couponId");
writer.String(obj.vecPromotions[i].couponId.c_str());
writer.EndObject(); writer.EndObject();
} }
writer.EndArray(); writer.EndArray();
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
INITIALIZE_EASYLOGGINGPP INITIALIZE_EASYLOGGINGPP
#define VERSION "1.1.0 beta1" //版本号 #define VERSION "1.1.0 beta2" //版本号
std::string g_init_data; std::string g_init_data;
std::string g_init_data_ods_back; std::string g_init_data_ods_back;
......
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