|
|
@@ -1024,7 +1024,18 @@ bool CSqlite3::UpdateOneFood(rapidjson::Value& foodrows)
|
|
|
std::string member_price = foodinfo["member_price"].GetString();
|
|
|
std::string buying_price = foodinfo["buying_price"].GetString();
|
|
|
std::string stock = to_string(foodinfo["stock"].GetDouble());
|
|
|
- std::string stockvalid = "1";
|
|
|
+
|
|
|
+ std::string stockvalid;
|
|
|
+ std::string stock_status = foodinfo["stock_status"].GetString();
|
|
|
+ if (stock_status == "OPEN")
|
|
|
+ {
|
|
|
+ stockvalid = "1";
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ stockvalid = "0";
|
|
|
+ }
|
|
|
+
|
|
|
std::string stock_warning = to_string(foodinfo["stock_warning"].GetDouble());
|
|
|
std::string is_shouyinji_show = foodinfo["is_shouyinji_show"].GetString();
|
|
|
std::string expiration_date = foodinfo["expiration_date"].GetString();
|