Commit ce85a7f0 by guanghui.cui

新添加积分字段

parent eccade2a
...@@ -196,6 +196,9 @@ struct orderObj ...@@ -196,6 +196,9 @@ struct orderObj
std::string pickup_point; //自取订单取餐处 std::string pickup_point; //自取订单取餐处
std::string invoice_pickup_code; //订单发票提出码 std::string invoice_pickup_code; //订单发票提出码
std::string order_drift; //订单漂移 std::string order_drift; //订单漂移
int bonus_basic = 0; //基本积分
int bonus_extra = 0; //额外积分
int bonus_total = 0; // 获得总积分
store storeInfo; //门店信息 store storeInfo; //门店信息
delivery deliveryInfo; //配送信息 delivery deliveryInfo; //配送信息
......
...@@ -388,7 +388,9 @@ bool JsonModule::getPushOrders(IN const char* json,OUT orderObj &order) ...@@ -388,7 +388,9 @@ bool JsonModule::getPushOrders(IN const char* json,OUT orderObj &order)
rapidjson::Value& points_obj = orderContent_obj["points"]; rapidjson::Value& points_obj = orderContent_obj["points"];
if(points_obj.IsObject()) if(points_obj.IsObject())
{ {
std::to_string(GetJsonIntSafe(points_obj,"totalPoint")); order.bonus_total = GetJsonIntSafe(points_obj,"totalPoint");
order.bonus_extra = GetJsonIntSafe(points_obj, "extraPoint");
order.bonus_basic = GetJsonIntSafe(points_obj, "basicPoint");
//积分信息详情 //积分信息详情
if(points_obj.HasMember("pointDetails")) if(points_obj.HasMember("pointDetails"))
{ {
...@@ -1211,6 +1213,15 @@ std::string JsonModule::_convertToNewOrderJson(orderObj &obj) ...@@ -1211,6 +1213,15 @@ std::string JsonModule::_convertToNewOrderJson(orderObj &obj)
//----------------付款明细 结束----------- //----------------付款明细 结束-----------
//----------------消费积分---------------- //----------------消费积分----------------
writer.Key("bonusBasic");
writer.Int(obj.bonus_basic);
writer.Key("bonusExtra");
writer.Int(obj.bonus_extra);
writer.Key("bonusTotal");
writer.Int(obj.bonus_total);
writer.Key("bonus"); writer.Key("bonus");
writer.StartArray(); writer.StartArray();
for(unsigned int i=0;i<obj.vecBonus.size();i++) for(unsigned int i=0;i<obj.vecBonus.size();i++)
......
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