Close #17
This commit is contained in:
@@ -293,7 +293,7 @@ int Deals::Status()
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
int Deals::Complite()
|
int Deals::Complete()
|
||||||
{
|
{
|
||||||
|
|
||||||
string data = CommonStatus();
|
string data = CommonStatus();
|
||||||
@@ -305,10 +305,14 @@ int Deals::Complite()
|
|||||||
|
|
||||||
string positive = "Positive";
|
string positive = "Positive";
|
||||||
int refund = 0;
|
int refund = 0;
|
||||||
|
/*
|
||||||
|
|
||||||
if (parser.cmdOptionExists("-n") || parser.cmdOptionExists("--negative"))
|
if (parser.cmdOptionExists("-n") || parser.cmdOptionExists("--negative"))
|
||||||
{
|
{
|
||||||
positive = "Negative";
|
positive = "Negative";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
if (parser.cmdOptionExists("--refund"))
|
if (parser.cmdOptionExists("--refund"))
|
||||||
{
|
{
|
||||||
refund = stoi(parser.getCmdOption("--refund"));
|
refund = stoi(parser.getCmdOption("--refund"));
|
||||||
@@ -317,6 +321,10 @@ int Deals::Complite()
|
|||||||
{
|
{
|
||||||
refund = stoi(parser.getCmdOption("-r"));
|
refund = stoi(parser.getCmdOption("-r"));
|
||||||
}
|
}
|
||||||
|
if (refund > 0)
|
||||||
|
{
|
||||||
|
positive = "Negative";
|
||||||
|
}
|
||||||
|
|
||||||
deal["feedback"]["status"] = positive;
|
deal["feedback"]["status"] = positive;
|
||||||
if (refund > 0)
|
if (refund > 0)
|
||||||
|
|||||||
@@ -3,13 +3,15 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include "InputParser.hpp"
|
#include "InputParser.hpp"
|
||||||
|
|
||||||
class Deals {
|
class Deals
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
/// @brief Конструктор
|
/// @brief Конструктор
|
||||||
/// @param parser - парсер аргументов
|
/// @param parser - парсер аргументов
|
||||||
/// @param isRussian - вывод справки на русском
|
/// @param isRussian - вывод справки на русском
|
||||||
Deals(const InputParser& parser, const bool isRussian, const std::string address, bool isDebug);
|
Deals(const InputParser &parser, const bool isRussian, const std::string address, bool isDebug);
|
||||||
int Process();
|
int Process();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
InputParser parser;
|
InputParser parser;
|
||||||
bool isRussian;
|
bool isRussian;
|
||||||
@@ -26,12 +28,11 @@ private:
|
|||||||
int Create();
|
int Create();
|
||||||
int Status();
|
int Status();
|
||||||
std::string CommonStatus();
|
std::string CommonStatus();
|
||||||
int Complite();
|
int Complete();
|
||||||
int Cancel();
|
int Cancel();
|
||||||
int Negative();
|
int Negative();
|
||||||
|
|
||||||
std::string GetVal(const std::string first,const std::string second);
|
std::string GetVal(const std::string first, const std::string second);
|
||||||
std::string GetDate(const std::string date);
|
std::string GetDate(const std::string date);
|
||||||
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
Reference in New Issue
Block a user