Commit 32a008df by NitefullWind

1. 新增第三方支付(待确认)。2. 规范debuglog.txt文件位置。

parent 421ec86f
......@@ -22,6 +22,7 @@ FMVipForward::FMVipForward(QObject *parent) : QObject(parent)
{
_urlStr = _cfg.GetTransUrlFormat();
_sessionDataList = QString("operator_id,pos_id,business_date").split(",");
_thirdTypeList = QString("支付宝,微信,银联,其他").split(",");
connect(&_nam, SIGNAL(finished(QNetworkReply*)), this, SLOT(onServerFinished(QNetworkReply*)));
}
......@@ -230,6 +231,15 @@ void FMVipForward::final(const QJsonObject &job, QJsonObject &fmjob)
scoreAmount = pay_ob["paid_total_amount"].toInt();
} else if(type == "77") {
coupons.append(pay_ob["code"].toString());
} else if(type == "26") {
thirdAmount = pay_ob["padi_total_amount"].toInt();
transObj["thirdPayTransId"] = pay_ob["paid_transid"];
QString thirdPayType = pay_ob["pay_str"].toString().trimmed();
int t = _thirdTypeList.indexOf(thirdPayType);
if (t < 0) {
type = _thirdTypeList.length();
}
transObj["thirdPayType"] = t;
}
}
transObj["coupons"] = coupons;
......
......@@ -104,6 +104,7 @@ private:
QMap<QString, QVariant> _sessionDataMap;
QStringList _sessionDataList;
QStringList _thirdTypeList;
signals:
void serverResponsed(const QJsonObject& rspData);
private slots:
......
......@@ -63,7 +63,7 @@ void customMessageHandler(QtMsgType type,const QMessageLogContext& Context, cons
QString strDateTime = QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss ddd");
QFile outFile("debuglog.txt");
QFile outFile(qApp->applicationDirPath() + "debuglog.txt");
outFile.open(QIODevice::WriteOnly | QIODevice::Append);
QTextStream ts(&outFile);
ts << strDateTime << txt << "\r\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment