100 lines
3.2 KiB
Erlang
100 lines
3.2 KiB
Erlang
|
|
%%----------------------------------------------------
|
||
|
|
%
|
||
|
|
%% @author whjing2011@gmail.com
|
||
|
|
%%----------------------------------------------------
|
||
|
|
-module(proto_246).
|
||
|
|
-export([info/0, cfg/0]).
|
||
|
|
-include("protocol.hrl").
|
||
|
|
|
||
|
|
info() ->
|
||
|
|
{
|
||
|
|
"调查问卷"
|
||
|
|
,["questionnaire.hrl"]
|
||
|
|
}.
|
||
|
|
|
||
|
|
cfg() ->
|
||
|
|
[
|
||
|
|
#rpc{
|
||
|
|
code = 24600
|
||
|
|
,log_title = "调查问卷状态"
|
||
|
|
,req_desc = "调查问卷状态"
|
||
|
|
,req = []
|
||
|
|
,reply_desc = "调查问卷状态信息"
|
||
|
|
,reply = [
|
||
|
|
{uint8, status, "状态(0:没有 1:进行中)"}
|
||
|
|
,{uint32, start_time, "开始时间"}
|
||
|
|
,{uint32, end_time, "结束时间"}
|
||
|
|
,{uint8, flag, "0:未答题 1:已答题, 未领取奖励 2:已完成"}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
,#rpc{
|
||
|
|
code = 24601
|
||
|
|
,log_title = "获取答卷基本内容"
|
||
|
|
,req_desc = "获取答卷基本内容"
|
||
|
|
,req = []
|
||
|
|
,reply_desc = "获取答卷基本内容"
|
||
|
|
,reply = [
|
||
|
|
{rec, questionnaire_total, questionnaire_total, [
|
||
|
|
{uint32, id, "答卷ID"}
|
||
|
|
,{string, title, "标题"}
|
||
|
|
,{string, memo, "备注"}
|
||
|
|
,{array, tuple, rewards, "奖励数据", [
|
||
|
|
{uint32, bid, "基础ID"}
|
||
|
|
,{uint8, bind, "是否绑定"}
|
||
|
|
,{uint32, num, "数量"}
|
||
|
|
]}
|
||
|
|
]}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
,#rpc{
|
||
|
|
code = 24602
|
||
|
|
,log_title = "获取答卷题目信息"
|
||
|
|
,req_desc = "获取答卷题目信息"
|
||
|
|
,req = []
|
||
|
|
,reply_desc = "获取答卷题目信息结果"
|
||
|
|
,reply = [
|
||
|
|
{array, questionnaire, questionnaire_list, "题目列表", [
|
||
|
|
{uint32, id, "题目ID"}
|
||
|
|
,{string, title, "标题"}
|
||
|
|
,{uint16, sort, "顺序号"}
|
||
|
|
,{uint8, topic_type, "类型"}
|
||
|
|
,{uint8, specific_type, "具体类型"}
|
||
|
|
,{uint8, must, "是否必填(0:否 1:是)"}
|
||
|
|
,{uint8, jump, "跳转状态(0:否 1:是)"}
|
||
|
|
,{uint32, topic, "被跳转目标,题目ID"}
|
||
|
|
,{string, option, "选项"}
|
||
|
|
,{string, option_list, "目标选项,选项.描述"}
|
||
|
|
]}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
,#rpc{
|
||
|
|
code = 24603
|
||
|
|
,log_title = "答卷"
|
||
|
|
,req_desc = "答卷"
|
||
|
|
,req = [
|
||
|
|
{array, tuple, ret_list, "答卷结果", [
|
||
|
|
{uint32, id, "题目ID"}
|
||
|
|
,{uint8, topic_type, "类型"}
|
||
|
|
,{string, ret, "答案"}
|
||
|
|
]}
|
||
|
|
]
|
||
|
|
,reply_desc = "提交答卷结果"
|
||
|
|
,reply = [
|
||
|
|
{uint8, code, "结果(0:失败 1:成功)"}
|
||
|
|
,{string, msg, "结果信息"}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
,#rpc{
|
||
|
|
code = 24604
|
||
|
|
,log_title = "领取奖励"
|
||
|
|
,req_desc = "领取奖励"
|
||
|
|
,req = [
|
||
|
|
]
|
||
|
|
,reply_desc = "领取奖励"
|
||
|
|
,reply = [
|
||
|
|
{uint8, code, "结果(0:失败 1:成功)"}
|
||
|
|
,{string, msg, "结果信息"}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
].
|