-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsystem_info_config_detail.h
More file actions
105 lines (93 loc) · 2.89 KB
/
Copy pathsystem_info_config_detail.h
File metadata and controls
105 lines (93 loc) · 2.89 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
#ifndef __SYSTEM_INFO_CONFIG_DETAIL_H__
#define __SYSTEM_INFO_CONFIG_DETAIL_H__
class SystemInfoConfigDetailRequest
{
public:
SystemInfoConfigDetailRequest(const string& json) {
this->Deserialize(json);
}
template <typename Writer>
void Serialize(Writer& writer) const {
writer.StartObject();
SERIALIZE_MEMBER(writer,id);
writer.EndObject();
}
void toString(std::string& json) {
StringBuffer sb;
Writer<StringBuffer> writer(sb);
Serialize(writer);
json = sb.GetString();
}
void Deserialize(const string& json)
{
Document d;
if (d.Parse(json.c_str()).HasParseError()){
throw logic_error("parse json error. raw data : " + json);
}
SET_DOC_MEMBER(d,id);
}
static tars::Int32 handler(const vector<tars::Char>& reqBuf, const map<std::string, std::string>& extraInfo, vector<tars::Char>& rspBuf)
{
return 0;
}
private:
CInteger _id ; //主键
};
class SystemInfoConfigDetailResponse
{
public:
SystemInfoConfigDetailResponse(const string& json) {
this->Deserialize(json);
}
template <typename Writer>
void Serialize(Writer& writer) const {
writer.StartObject();
SERIALIZE_MEMBER(writer,id);
SERIALIZE_MEMBER(writer,area);
SERIALIZE_MEMBER(writer,target);
SERIALIZE_MEMBER(writer,nickName);
SERIALIZE_MEMBER(writer,title);
SERIALIZE_MEMBER(writer,content);
SERIALIZE_MEMBER(writer,beginTime);
SERIALIZE_MEMBER(writer,optUser);
SERIALIZE_MEMBER(writer,createDate);
writer.EndObject();
}
void toString(std::string& json) {
StringBuffer sb;
Writer<StringBuffer> writer(sb);
Serialize(writer);
json = sb.GetString();
}
void Deserialize(const string& json)
{
Document d;
if (d.Parse(json.c_str()).HasParseError()){
throw logic_error("parse json error. raw data : " + json);
}
SET_DOC_MEMBER(d,id);
SET_DOC_MEMBER(d,area);
SET_DOC_MEMBER(d,target);
SET_DOC_MEMBER(d,nickName);
SET_DOC_MEMBER(d,title);
SET_DOC_MEMBER(d,content);
SET_DOC_MEMBER(d,beginTime);
SET_DOC_MEMBER(d,optUser);
SET_DOC_MEMBER(d,createDate);
}
static tars::Int32 handler(const vector<tars::Char>& reqBuf, const map<std::string, std::string>& extraInfo, vector<tars::Char>& rspBuf)
{
return 0;
}
private:
CInteger _id ; //主键
CString _area ; //发送消息的地区:台湾、东南亚、欧洲、大陆等
CString _target ; //发送目标(空代表所有人,用户ID代表个人)
CString _nickName ; //昵称(发送所有人时,昵称为空)
CString _title ; //配置标题,最多显示20个字符
CString _content ; //配置内容,最多显示100个字符
CString _beginTime ; //生效时间
CString _optUser ; //操作者
CString _createDate ; //创建时间
};
#endif