Commit 137e6c9f385b96e034ce9101ef2df3cdea4b7ac7
Merge branch 'master' of 120.26.43.151:zhangqijia/Pro2dProtoBuffers
Showing
2 changed files
with
12 additions
and
6 deletions
Show diff stats
doc/gm.md
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | ### 简单说明 |
9 | 9 | 地址示例, 增加经验接口: |
10 | 10 | ```shell |
11 | -http://192.168.0.206:8881/addexp | |
11 | +http://192.168.0.206:8880/addexp | |
12 | 12 | ``` |
13 | 13 | 返回值 |
14 | 14 | ```shell |
... | ... | @@ -26,13 +26,14 @@ http://192.168.0.206:8881/addexp |
26 | 26 | |0|成功| |
27 | 27 | |其他|错误| |
28 | 28 | |-100|程序内部函数调用返回值错误| |
29 | -|-101|角色id未填写| | |
30 | -|-102|角色不存在| | |
29 | +|-101|使用的请求方法不支持,请使用get或者post| | |
30 | +|-102|角色id未填写| | |
31 | +|-103|角色不存在| | |
31 | 32 | |
32 | 33 | 下面接口中共同的请求参数和错误码我就不列出来了。 |
33 | 34 | |
34 | 35 | ## 增加经验 [/addexp] |
35 | -1. 请求方式:POST 提交表单。 | |
36 | +1. 请求方式: GET。 | |
36 | 37 | 3. 请求参数:(有参数就传) |
37 | 38 | |
38 | 39 | | 参数 | 类型 | 是否必须 | 备注 | |
... | ... | @@ -42,8 +43,7 @@ http://192.168.0.206:8881/addexp |
42 | 43 | |
43 | 44 | 请求示例: |
44 | 45 | ```shell |
45 | -$ curl --request POST 'http://192.168.0.206:8881/addexp' \ | |
46 | ---data 'role_id=1&exp=111' | |
46 | +$ curl -i 'http://192.168.0.206:8880/addexp?role_id=150140287594270720&exp=111' | |
47 | 47 | ``` |
48 | 48 | 返回结果: |
49 | 49 | ```shell | ... | ... |
models.proto
... | ... | @@ -41,6 +41,11 @@ message Team { |
41 | 41 | string hero_id3 = 5; |
42 | 42 | } |
43 | 43 | |
44 | +message Increment { | |
45 | + string key = 1; //@inject_tag: index:"unique" pri:"1" | |
46 | + int64 val = 2; | |
47 | +} | |
48 | + | |
44 | 49 | message Role { |
45 | 50 | string id = 1; // @inject_tag: index:"unique" pri:"1" |
46 | 51 | string uid = 2; // @inject_tag: index:"unique" |
... | ... | @@ -54,4 +59,5 @@ message Role { |
54 | 59 | string buy_r = 11; |
55 | 60 | string pay_r = 12; |
56 | 61 | bool del = 13; |
62 | + map<string, int64> incres = 14; | |
57 | 63 | } | ... | ... |