Commit da77d83b by guanghui.cui

去除发送失败本地sqlite存储,直接返回服务端失败

parent f4550690
......@@ -412,79 +412,6 @@ bool JsonModule::getPushOrders(IN const char* json,OUT orderObj &order)
}
}
//积分信息
// if(orderContent_obj.HasMember("points"))
// {
// rapidjson::Value& points_obj = orderContent_obj["points"];
// if(points_obj.IsObject())
// {
// order.bonusInfo.summary = std::to_string(GetJsonIntSafe(points_obj,"totalPoint"));
// //积分信息详情
// if(points_obj.HasMember("pointDetails"))
// {
// rapidjson::Value& pointDetails_array = points_obj["pointDetails"];
// if(pointDetails_array.IsArray())
// {
// for(unsigned int i=0;i<pointDetails_array.Size();i++){
// rapidjson::Value& pointDetails_obj = pointDetails_array[i];
// bonusDetail detail;
// GetJsonStringSafe(pointDetails_obj,"bomId");
// GetJsonStringSafe(pointDetails_obj,"comboId");
// detail.desc = GetJsonStringSafe(pointDetails_obj,"desc");
// GetJsonStringSafe(pointDetails_obj,"groupId");
// detail.point = GetJsonIntSafe(pointDetails_obj,"point");
// detail.sku = GetJsonStringSafe(pointDetails_obj,"sku");
// detail.type = atoi(GetJsonStringSafe(pointDetails_obj,"type"));
// order.bonusInfo.vecDetail.push_back(detail);
// }
// }
// }
// }
// }
//优惠信息
// if(orderContent_obj.HasMember("promotions"))
// {
// rapidjson::Value& promotions_obj = orderContent_obj["promotions"];
// if(promotions_obj.IsObject())
// {
// order.promotionInfo.summary=GetJsonIntSafe(promotions_obj,"totalDiscount");
// GetJsonIntSafe(promotions_obj,"totalOriginalPrice");
// GetJsonIntSafe(promotions_obj,"totalPrmotionPrice");
// //优惠信息详情
// if(promotions_obj.HasMember("promtionDetails"))
// {
// rapidjson::Value& promtionDetails_array = promotions_obj["promtionDetails"];
// if(promtionDetails_array.IsArray())
// {
// for(unsigned int i=0;i<promtionDetails_array.Size();i++){
// rapidjson::Value& promtionDetails_obj = promtionDetails_array[i];
// promotionsDetail detail;
// detail.pro_id = GetJsonStringSafe(promtionDetails_obj,"proId");
// GetJsonStringSafe(promtionDetails_obj,"bomId");
// GetJsonStringSafe(promtionDetails_obj,"comboId");
// detail.desc = GetJsonStringSafe(promtionDetails_obj,"desc");
// detail.offer = GetJsonIntSafe(promtionDetails_obj,"discount");
// GetJsonStringSafe(promtionDetails_obj,"groupId");
// GetJsonIntSafe(promtionDetails_obj,"originalPrice");
// GetJsonStringSafe(promtionDetails_obj,"pcode");
// GetJsonIntSafe(promtionDetails_obj,"prmotionPrice");
// detail.sku = GetJsonStringSafe(promtionDetails_obj,"sku");
// detail.type = atoi(GetJsonStringSafe(promtionDetails_obj,"type"));
// order.promotionInfo.vecDetail.push_back(detail);
// }
// }
// }
// }
// }
GetJsonStringSafe(orderContent_obj,"sessionId");
order.reduced_price = GetJsonIntSafe(orderContent_obj,"totalDiscount");
......@@ -642,13 +569,8 @@ bool JsonModule::getInitBackData(IN const char* inJson,OUT std::string& outJson)
rapidjson::Value& code = document["code"];
status_code = atoi(code.GetString());
if(document.HasMember("orderConfirmType")){
autoconfirm = document["orderConfirmType"].GetInt();
}
if(document.HasMember("orderPushPosIndex")){
default_pos = document["orderPushPosIndex"].GetString();
}
autoconfirm = GetJsonIntSafe(document,"orderConfirmType");
default_pos = GetJsonStringSafe(document,"orderPushPosIndex");
// if(document.HasMember("message")){
// msg = document["message"].GetString();
......@@ -1283,78 +1205,6 @@ std::string JsonModule::_convertToNewOrderJson(orderObj &obj)
writer.EndArray();
//----------------电子点标 结束-----------
// //----------------消费积分----------------
// writer.Key("bonus");
// writer.StartObject();
// writer.Key("summary");
// writer.String(obj.bonusInfo.summary.c_str());
// //-----------------start 积分详情------------------
// writer.Key("details");
// writer.StartArray();
// for(unsigned int i=0;i<obj.bonusInfo.vecDetail.size();i++)
// {
// writer.StartObject();
// writer.Key("type");
// writer.Int(obj.bonusInfo.vecDetail[i].type);
// writer.Key("desc");
// writer.String(obj.bonusInfo.vecDetail[i].desc.c_str());
// writer.Key("point");
// writer.Int(obj.bonusInfo.vecDetail[i].point);
// writer.Key("sku");
// writer.String(obj.bonusInfo.vecDetail[i].sku.c_str());
// writer.EndObject();
// }
// writer.EndArray();
// //-----------------end 积分详情--------------------
// writer.EndObject();
// //----------------消费积分 结束-----------
// //----------------促销列表----------------
// writer.Key("promotions");
// writer.StartObject();
// writer.Key("summary");
// writer.String(obj.promotionInfo.summary.c_str());
// //-----------------start 促销详情------------------
// writer.Key("details");
// writer.StartArray();
// for(unsigned int i=0;i<obj.promotionInfo.vecDetail.size();i++)
// {
// writer.StartObject();
// writer.Key("pro_id");
// writer.String(obj.promotionInfo.vecDetail[i].pro_id.c_str());
// writer.Key("type");
// writer.Int(obj.promotionInfo.vecDetail[i].type);
// writer.Key("desc");
// writer.String(obj.promotionInfo.vecDetail[i].desc.c_str());
// writer.Key("offer");
// writer.Int(obj.promotionInfo.vecDetail[i].offer);
// writer.Key("sku");
// writer.String(obj.promotionInfo.vecDetail[i].sku.c_str());
// writer.EndObject();
// }
// writer.EndArray();
// //-----------------end 促销详情--------------------
// writer.EndObject();
// //----------------促销列表 结束-----------
writer.EndObject();
return buffer.GetString();
......
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