Close #3 change flow

This commit is contained in:
Vladimir N. Korotenko
2025-11-17 20:10:03 +03:00
parent 55a50c35a6
commit 14790904d4
2 changed files with 21 additions and 15 deletions

View File

@@ -195,25 +195,31 @@ int AccountFeedbacks(const std::string address, const char* bkaddress, bool isDe
if (statustext.compare("positive") == 0) positivefb++; if (statustext.compare("positive") == 0) positivefb++;
if (statustext.compare("negative") == 0) negativefb++; if (statustext.compare("negative") == 0) negativefb++;
if (fb == 1 && statustext.compare("positive") == 0) {
if (fb == 0) {
stream << "- deal: " << val["deal"] << endl; stream << "- deal: " << val["deal"] << endl;
stream << " date: " << val["date"] << endl; stream << " date: " << val["date"] << endl;
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) { else {
stream << "- deal: " << val["deal"] << endl; if (fb == 1 && statustext.compare("positive") == 0) {
stream << " date: " << val["date"] << endl; stream << "- deal: " << val["deal"] << endl;
stream << " statustext: " << val["statustext"] << endl; stream << " date: " << val["date"] << endl;
stream << " comments: " << val["comments"] << endl; stream << " statustext: " << val["statustext"] << endl;
stream << " comments: " << val["comments"] << endl;
}
else if (fb == 2 && statustext.compare("negative") == 0) {
stream << "- deal: " << val["deal"] << endl;
stream << " date: " << val["date"] << endl;
stream << " statustext: " << val["statustext"] << endl;
stream << " comments: " << val["comments"] << endl;
}
} }
else
{
stream << "- deal: " << val["deal"] << endl;
stream << " date: " << val["date"] << endl;
stream << " statustext: " << val["statustext"] << endl;
stream << " comments: " << val["comments"] << endl;
}
} }
stream << "------------Summary--------------" << endl; stream << "------------Summary--------------" << endl;
stream << "total: " << size << endl; stream << "total: " << size << endl;

View File

@@ -90,7 +90,7 @@ int main(int argc, char *argv[])
if (input.cmdOptionExists("-f") || input.cmdOptionExists("--feedbacks")) if (input.cmdOptionExists("-f") || input.cmdOptionExists("--feedbacks"))
{ {
int fb = 0; // all int fb = 0; // all
const string &fbp = input.getCmdOption("-f"); const string fbp = input.getCmdOption("-f");
if (!fbp.empty()) if (!fbp.empty())
{ {
if (fbp.compare("p") == 0) if (fbp.compare("p") == 0)
@@ -98,7 +98,7 @@ int main(int argc, char *argv[])
if (fbp.compare("n") == 0) if (fbp.compare("n") == 0)
fb = 2; fb = 2;
} }
const string &fbps = input.getCmdOption("--feedbacks"); const string fbps = input.getCmdOption("--feedbacks");
if (!fbps.empty()) if (!fbps.empty())
{ {
if (fbps.compare("p") == 0) if (fbps.compare("p") == 0)