pay.h
1.07 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
#pragma once
#include <common.h>
#include <share_msg.pb.h>
//////////////////////////////////////////////////////////////////////////
//pay config
//////////////////////////////////////////////////////////////////////////
struct pay_cfg_t{
uint32_t id;
uint32_t type;
std::string amount;
std::string product;
std::map<ITEM_ID, ITEM_CNT> item_map;
uint32_t day;
// Ö§¸¶Ô¿¨Ê±,Ë͵ĵÀ¾ß
std::map<ITEM_ID, ITEM_CNT> payitem_map;
uint32_t agent_level;
bool notice;
pay_cfg_t();
};
struct vip_pay_reward_cfg_t {
uint32_t id;
uint32_t begin_time;
uint32_t end_time;
std::map<ITEM_ID, ITEM_CNT> item_map;
vip_pay_reward_cfg_t(){
this->id = 0;
this->begin_time = 0;
this->end_time = 0;
this->item_map.clear();
}
};
struct pay_cfg_mgr_t
{
bool load_cfg();
void init();
std::map<std::string, pay_cfg_t> pay_cfg_map;//key:product
std::map<uint32_t, pay_cfg_t> pay_cfg_id_map;//key:id
pay_cfg_t* find(const std::string& product);
pay_cfg_t* find(uint32_t id);
std::map<uint32_t, vip_pay_reward_cfg_t> vip_pay_reward_map;
};
extern pay_cfg_mgr_t* g_pay_cfg_mgr;