-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathglobalServiceHandle.cpp
More file actions
106 lines (95 loc) · 2.81 KB
/
Copy pathglobalServiceHandle.cpp
File metadata and controls
106 lines (95 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#include "globalServiceHandle.h"
#include <iostream>
#include "global_server.h"
#include "http_req.h"
#include "global_player.h"
using namespace std;
using namespace ::gs2global;
using namespace base;
GlobalServiceHandler::GlobalServiceHandler(GlobalServer* svr)
{
m_pSvr = svr;
m_pRollLog = svr->m_pRollLog;
m_pDbMgr = svr->m_pDbMgr;
m_pConf = &(svr->m_confMgr);
}
GlobalServiceHandler::~GlobalServiceHandler(void)
{
}
int32_t GlobalServiceHandler::getNickCnt(const std::string& strNick)
{
m_pRollLog->debug("GlobalServiceHandler::getNickCnt begining(strNick:%s)", strNick.c_str());
//GameUserInfo* pGameUserInfo;
try
{
int res = 0;
//pGameUserInfo = this->_checkUserVaild(nUid, res);
return res;
}
catch(...)
{
m_pRollLog->error("GlobalServiceHandler::getNickCnt unknow exception");
return 0;
}
}
int32_t GlobalServiceHandler::getIdCntBindPhone(const std::string& strPhone)
{
m_pRollLog->debug("GlobalServiceHandler::getIdCntBindPhone begining(strPhone:%s)", strPhone.c_str());
//GameUserInfo* pGameUserInfo;
try
{
int res = 0;
//pGameUserInfo = this->_checkUserVaild(nUid, res);
return res;
}
catch(...)
{
m_pRollLog->error("GlobalServiceHandler::getIdCntBindPhone unknow exception");
return 0;
}
}
int32_t GlobalServiceHandler::getIdCntBindOpenid(const std::string& strOpenid)
{
m_pRollLog->debug("GlobalServiceHandler::getIdCntBindOpenid begining(strOpenid:%s)", strOpenid.c_str());
//GameUserInfo* pGameUserInfo;
try
{
int res = m_pSvr->m_pGlobalPlayer->getIdCntBindOpenid(strOpenid);
//pGameUserInfo = this->_checkUserVaild(nUid, res);
return res;
}
catch(...)
{
m_pRollLog->error("GlobalServiceHandler::getIdCntBindOpenid unknow exception");
return 0;
}
}
int32_t GlobalServiceHandler::getUidByExtensionCode(const int64_t lnExtensionCode)
{
m_pRollLog->debug("GlobalServiceHandler::getUidByExtensionCode begining(lnExtensionCode:%ld)", lnExtensionCode);
//GameUserInfo* pGameUserInfo;
try
{
int res = m_pSvr->m_pGlobalPlayer->getUidByExtensionCode(lnExtensionCode);
//pGameUserInfo = this->_checkUserVaild(nUid, res);
return res;
}
catch(...)
{
m_pRollLog->error("GlobalServiceHandler::getIdCntBindOpenid unknow exception");
return 0;
}
}
bool GlobalServiceHandler::isOpenidBound(const std::string& strOpenid)
{
m_pRollLog->debug("GlobalServiceHandler::isOpenidBound begining(strOpenid:%s)", strOpenid.c_str());
try
{
return m_pSvr->m_pGlobalPlayer->isOpenidBound(strOpenid);
}
catch(...)
{
m_pRollLog->error("GlobalServiceHandler::isOpenidBound unknow exception");
return false;
}
}