count negative

This commit is contained in:
Vladimir N. Korotenko
2025-11-22 20:19:15 +03:00
parent 8278958934
commit e76a10e530

View File

@@ -196,6 +196,8 @@ int AccountFeedbacks(const std::string address, const char *bkaddress, bool isDe
positivefb++; positivefb++;
if (statustext.compare("negative") == 0) if (statustext.compare("negative") == 0)
negativefb++; negativefb++;
if (statustext.compare("neutral") == 0)
negativefb++;
if (fb == 0) if (fb == 0)
{ {
@@ -204,8 +206,7 @@ int AccountFeedbacks(const std::string address, const char *bkaddress, bool isDe
stream << " statustext: " << val["statustext"] << endl; stream << " statustext: " << val["statustext"] << endl;
stream << " comments: " << val["comments"] << endl; stream << " comments: " << val["comments"] << endl;
} }
else
{
if (fb == 1 && statustext.compare("positive") == 0) if (fb == 1 && statustext.compare("positive") == 0)
{ {
stream << "- deal: " << val["deal"] << endl; stream << "- deal: " << val["deal"] << endl;
@@ -213,7 +214,7 @@ int AccountFeedbacks(const std::string address, const char *bkaddress, bool isDe
stream << " statustext: " << val["statustext"] << endl; stream << " statustext: " << val["statustext"] << endl;
stream << " comments: " << val["comments"] << endl; stream << " comments: " << val["comments"] << endl;
} }
else if (fb == 2 && statustext.compare("negative") == 0 || fb == 2 && statustext.compare("neutral") == 0) if ((fb == 2 && statustext.compare("negative") == 0) || (fb == 2 && statustext.compare("neutral") == 0))
{ {
stream << "- deal: " << val["deal"] << endl; stream << "- deal: " << val["deal"] << endl;
stream << " date: " << val["date"] << endl; stream << " date: " << val["date"] << endl;
@@ -221,7 +222,6 @@ int AccountFeedbacks(const std::string address, const char *bkaddress, bool isDe
stream << " comments: " << val["comments"] << endl; stream << " comments: " << val["comments"] << endl;
} }
} }
}
stream << "------------Summary--------------" << endl; stream << "------------Summary--------------" << endl;
stream << "total: " << size << endl; stream << "total: " << size << endl;
stream << "positive: " << positivefb << endl; stream << "positive: " << positivefb << endl;