This commit is contained in:
aozhiwei 2019-03-30 13:43:19 +08:00
parent 3c28297fdd
commit f0f55569b3

View File

@ -19,30 +19,20 @@ struct AddOrderNode
struct PayNotifyNode
{
int seqid;
int pay_type;//0:normal 1:ios 2:jinqi
int seqid = 0;
int pay_type = 0;//0:normal 1:ios 2:jinqi
std::string accountid;
std::string roleid;
std::string rolename;
int serverid;
int itemid;
int serverid = 0;
int itemid = 0;
std::string itemid_str;
std::string orderid;
std::string sp_orderid;
std::string sp_accountid;
double fee;
int payresult;
PayNotifyNode* next;
PayNotifyNode()
{
seqid = 0;
pay_type = 0;
serverid = 0;
itemid = 0;
payresult = 0;
next = NULL;
}
double fee = 0.0f;
int payresult = 0;
PayNotifyNode* next = nullptr;
};
struct ReissueNode
@ -54,15 +44,6 @@ struct ReissueNode
void OrderMgr::Init()
{
top_node_ = NULL;
bot_node_ = NULL;
work_node_ = NULL;
pay_notify_top_node_ = NULL;
pay_notify_bot_node_ = NULL;
pay_notify_work_node_ = NULL;
reissue_top_node_ = NULL;
reissue_bot_node_ = NULL;
reissue_work_node_ = NULL;
add_order_mutex_ = new std::mutex();
pay_notify_mutex_ = new std::mutex();
reissue_mutex_ = new std::mutex();
@ -78,16 +59,11 @@ void OrderMgr::Init()
mysql_conn_ = new a8::mysql::Connection();
query_ = mysql_conn_->CreateQuery();
assert(mysql_conn_->Connect(JsonDataMgr::Instance()->GetMysqlConf()->At("host")->AsXValue(),
JsonDataMgr::Instance()->GetMysqlConf()->At("port")->AsXValue(),
JsonDataMgr::Instance()->GetMysqlConf()->At("user")->AsXValue(),
JsonDataMgr::Instance()->GetMysqlConf()->At("passwd")->AsXValue(),
"paydb"));
JsonDataMgr::Instance()->GetMysqlConf()->At("port")->AsXValue(),
JsonDataMgr::Instance()->GetMysqlConf()->At("user")->AsXValue(),
JsonDataMgr::Instance()->GetMysqlConf()->At("passwd")->AsXValue(),
"paydb"));
f8::InitMysqlConnection(query_);
#if 0
DumpMysqlInfo(query_);
RegisterNetMsgHandler<OrderMgr, SSMPing>(g_dbsmsghandler, &OrderMgr::_SSMPing);
RegisterNetMsgHandler<OrderMgr, D2PPayNotifyACK>(g_dbsmsghandler, &OrderMgr::_D2PPayNotifyACK);
#endif
LoadPedingOrders();
}