-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathProcessor.h
More file actions
72 lines (60 loc) · 1.71 KB
/
Processor.h
File metadata and controls
72 lines (60 loc) · 1.71 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
#ifndef _Processor_H_
#define _Processor_H_
//
#include <util/tc_singleton.h>
#include "MatchServant.h"
#define STARTCHIP2RANKSCORES(x) (x * 100000 + 100000 - time(NULL) % 100000)
#define CHIP2RANKSCORES(x) (x * 100000 + time(NULL) % 100000)
#define RANKSCORES2CHIP(x) (x / 100000)
//
using namespace tars;
/**
*请求处理类
*
*/
class Processor
{
public:
/**
*
*/
Processor();
/**
*
*/
~Processor();
public:
//GAME_MATCH_GAME_RANK = 101, //比赛报名集合,key:matchid
//查询
int selectGameRank(int matchID, vector<match::UserRankInfo> &vecRankInfo);
//数量
int countGameRank(int matchID);
//新增
int addGameRank(int matchID, const match::UserMatchInfo &userMatchInfo);
//删除
int deleteGameRank(int matchID);
//移除
int rmGameRank(int matchID, long uid);
//GAME_MATCH_GAME_INFO = 102, //比赛信息, key:matchid
//查询
int selectGameInfo(int matchID, match::MatchInfo &matchInfo);
//增加
int UpdateGameInfo(const match::ReportMatchInfoReq &req);
//删除
int deleteGameInfo(int matchID);
//GAME_MATCH_USER_INFO = 103, //玩家的比赛信息, key:uid
//查询
int selectUserInfo(long uid, match::UserSignUpInfo &info);
//更新
int updateUserInfo(long uid, match::UserSignUpInfo &info);
//GAME_MATCH_JACKPOT = 104, //比赛奖池,key:matchid
//查询
int selectJackpot(int matchID);
//更新
int updateJackpot(int matchID);
//清理
int cleanJackpot(int matchID);
};
//singleton
typedef TC_Singleton<Processor, CreateStatic, DefaultLifetime> ProcessorSingleton;
#endif