Commit 1e682164 by guanghui.cui

1:customer下添加加字段:card_no(纳客宝卡号) 2:payment.details下添加字段:pay_code(支付码)

parent 29f0d7f2
......@@ -41,6 +41,7 @@ struct paymentDetail
int type=0; //支付类型
std::string trans_id; //支付交易号
std::string account_id; //支付账户号
std::string pay_code; //支付码
};
//支付信息
......@@ -118,6 +119,7 @@ struct customer
std::string account; //顾客账号
int account_type=0; //顾客账号类型
std::string account_level; //顾客账号等级
std::string card_no; //纳客宝卡号
};
//促销
......
......@@ -200,6 +200,7 @@ bool JsonModule::getPushOrders(IN const char* json,OUT orderObj &order)
order.customerInfo.account = GetJsonStringSafe(customer_obj,"accountId");
order.customerInfo.account_type = atoi(GetJsonStringSafe(customer_obj,"accountType"));
order.customerInfo.account_level = GetJsonStringSafe(customer_obj,"level");
order.customerInfo.card_no = GetJsonStringSafe(customer_obj, "cardNo");
}
}
}
......@@ -313,6 +314,7 @@ bool JsonModule::getPushOrders(IN const char* json,OUT orderObj &order)
detail.type = atoi(_strType.data());
detail.trans_id = GetJsonStringSafe(payInfos_obj,"transNum");
detail.account_id=GetJsonStringSafe(payInfos_obj,"accountId");
detail.pay_code= GetJsonStringSafe(payInfos_obj, "payCode");
order.payInfo.vecDetail.push_back(detail);
}
......@@ -992,6 +994,9 @@ std::string JsonModule::_convertToNewOrderJson(orderObj &obj)
writer.Key("account_level");
writer.String(obj.customerInfo.account_level.c_str());
writer.Key("card_no");
writer.String(obj.customerInfo.card_no.c_str());
writer.EndObject();
//----------------顾客信息 结束-----------
......@@ -1091,6 +1096,9 @@ std::string JsonModule::_convertToNewOrderJson(orderObj &obj)
writer.Key("account_id");
writer.String(obj.payInfo.vecDetail[i].account_id.c_str());
writer.Key("pay_code");
writer.String(obj.payInfo.vecDetail[i].pay_code.c_str());
writer.EndObject();
}
writer.EndArray();
......
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