| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- #include "respgetuserzxshserviceinfo.h"
- #include <QScriptValue>
- #include <QScriptEngine>
- #include <QScriptValueIterator>
- RespGetUserZXSHServiceInfo::RespGetUserZXSHServiceInfo(QString json)
- {
- this->json = json;
- QScriptEngine engine;
- QScriptValue sv = engine.evaluate("value = " + this->json);
- QScriptValueIterator it(sv);
- if(json.isEmpty())
- {
- rtnCode = RTNCODE_NETWORK_NOTAVAILABLE;
- rtnMemo = RTNMEMO_NETWORK_NOTAVAILABLE;
- }
- else if(json=="ABORT")
- {
- rtnCode = RTNCODE_NETWORK_ABORT;
- rtnMemo = RTNMEMO_NETWORK_ABORT;
- }
- else
- {
- rtnCode = RTNCODE_INVALID_FORMAT;
- rtnMemo = RTNMEMO_INVALID_FORMAT;
- while (it.hasNext())
- {
- it.next();
- if(it.name()=="rtnCode")
- {
- this->rtnCode = it.value().toInt32();
- }
- else if(it.name()=="rtnMemo")
- {
- this->rtnMemo = it.value().toString();
- }
- else if(it.name()=="payType")
- {
- this->rtnMemo = it.value().toString();
- }
- else if(it.name()=="monthStartTime")
- {
- this->monthStartTime = it.value().toString();
- }
- else if(it.name()=="monthEndTime")
- {
- this->monthEndTime = it.value().toString();
- }
- else if(it.name()=="monthDownShzs")
- {
- this->monthDownShzs = it.value().toString();
- }
- else if(it.name()=="monthMaxDownShzs")
- {
- this->monthMaxDownShzs = it.value().toString();
- }
- else if(it.name()=="zxshMonthDownIn7dayShzs")
- {
- this->zxshMonthDownIn7dayShzs = it.value().toString();
- }
- else if(it.name()=="zxshMonthMaxDownIn7dayShzs")
- {
- this->zxshMonthMaxDownIn7dayShzs = it.value().toString();
- }
- else if(it.name()=="zxshMonthDownIn1MonthShzs")
- {
- this->zxshMonthDownIn1MonthShzs = it.value().toString();
- }
- else if(it.name()=="zxshMonthMaxDownIn1MonthShzs")
- {
- this->zxshMonthMaxDownIn1MonthShzs = it.value().toString();
- }
- else if(it.name()=="zxshMonthDownIn3MonthShzs")
- {
- this->zxshMonthDownIn3MonthShzs = it.value().toString();
- }
- else if(it.name()=="zxshMonthMaxDownIn3MonthShzs")
- {
- this->zxshMonthMaxDownIn3MonthShzs = it.value().toString();
- }
- else if(it.name()=="zxshMonthDownShzs")
- {
- this->zxshMonthDownShzs = it.value().toString();
- }
- else if(it.name()=="zxshMonthMaxDownShzs")
- {
- this->zxshMonthMaxDownShzs = it.value().toString();
- }
- }
- }
- }
- int RespGetUserZXSHServiceInfo::getRtnCode()
- {
- return this->rtnCode;
- }
- QString RespGetUserZXSHServiceInfo::getRtnMemo()
- {
- return this->rtnMemo;
- }
- QString RespGetUserZXSHServiceInfo::getMonthStartTime()
- {
- return this->monthStartTime;
- }
- QString RespGetUserZXSHServiceInfo::getMonthEndTime()
- {
- return this->monthEndTime;
- }
- QString RespGetUserZXSHServiceInfo::getMonthDownShzs()
- {
- return this->monthDownShzs;
- }
- QString RespGetUserZXSHServiceInfo::getMonthMaxDownShzs()
- {
- return this->monthMaxDownShzs;
- }
- QString RespGetUserZXSHServiceInfo::getZxshMonthDownIn7dayShzs()
- {
- return this->zxshMonthDownIn7dayShzs;
- }
- QString RespGetUserZXSHServiceInfo::getZxshMonthMaxDownIn7dayShzs()
- {
- return this->zxshMonthMaxDownIn7dayShzs;
- }
- QString RespGetUserZXSHServiceInfo::getZxshMonthDownIn1MonthShzs()
- {
- return this->zxshMonthDownIn1MonthShzs;
- }
- QString RespGetUserZXSHServiceInfo::getZxshMonthMaxDownIn1MonthShzs()
- {
- return this->zxshMonthMaxDownIn1MonthShzs;
- }
- QString RespGetUserZXSHServiceInfo::getZxshMonthDownIn3MonthShzs()
- {
- return this->zxshMonthDownIn3MonthShzs;
- }
- QString RespGetUserZXSHServiceInfo::getZxshMonthMaxDownIn3MonthShzs()
- {
- return this->zxshMonthMaxDownIn3MonthShzs;
- }
- QString RespGetUserZXSHServiceInfo::getZxshMonthDownShzs()
- {
- return this->zxshMonthDownShzs;
- }
- QString RespGetUserZXSHServiceInfo::getZxshMonthMaxDownShzs()
- {
- return this->zxshMonthMaxDownShzs;
- }
|