Commit 18ad56b1 by NitefullWind

1. 增加卡券核销接口。

parent 4f64e691
#ifndef FMP_REDEEM_I_H
#define FMP_REDEEM_I_H
#include <fmp_plugin_i.h>
/**
* 业务插件接口,必须继承自 FMPluginInterface
* @brief The FMPRedeemInterface class
*/
class FMPRedeemInterface : public QObject, public FMPluginInterface
{
Q_OBJECT
Q_INTERFACES(FMPBaseInterface)
Q_INTERFACES(FMPluginInterface)
public:
explicit FMPRedeemInterface(ctkPluginContext *ctx) : FMPluginInterface(ctx)
{
connect(this, &FMPRedeemInterface::TriggerInit, this, &FMPRedeemInterface::OnTriggerInit);
connect(this, &FMPRedeemInterface::TriggerUninit, this, &FMPRedeemInterface::OnTriggerUninit);
}
virtual QJsonObject Redeem(const QJsonArray& productsInfo) = 0; //券码核销
virtual QJsonObject Redeem(const QJsonObject& productsInfoObj) = 0; //券码核销
virtual QJsonObject Reverse(QJsonObject request) = 0; //卡券冲正
virtual QJsonObject GetRedeemJson()const = 0;
signals:
void TriggerInit();
void TriggerUninit();
protected slots:
void OnTriggerInit() { FMPluginInterface::OnTriggerInit(); }
void OnTriggerUninit() { FMPluginInterface::OnTriggerUninit(); }
};
Q_DECLARE_INTERFACE(FMPRedeemInterface, "fmp.redeem")
#endif // FMP_REDEEM_I_H
#include "../../fmp_redeem/fmp_redeem_i.h"
\ No newline at end of file
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