Commit 5d31dedad5c14c83f041cac074a25cef510ec78f
1 parent
13e42868
Exists in
master
提交
Showing
9 changed files
with
114 additions
and
116 deletions
Show diff stats
src/HttpServer/jsonconf/AchievementConfig.json
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | "id": 1, |
5 | 5 | "desc": "累计消除分数达到10000分", |
6 | 6 | "aim": 10000, |
7 | - "coin": 100, | |
7 | + "coin": 10000, | |
8 | 8 | "is_video": 0 |
9 | 9 | }, |
10 | 10 | { |
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | "id": 2, |
13 | 13 | "desc": "累计消除分数达到20000分", |
14 | 14 | "aim": 20000, |
15 | - "coin": 150, | |
15 | + "coin": 5000, | |
16 | 16 | "is_video": 0 |
17 | 17 | }, |
18 | 18 | { |
... | ... | @@ -20,7 +20,7 @@ |
20 | 20 | "id": 3, |
21 | 21 | "desc": "累计消除分数达到30000分", |
22 | 22 | "aim": 30000, |
23 | - "coin": 200, | |
23 | + "coin": 400, | |
24 | 24 | "is_video": 1 |
25 | 25 | }, |
26 | 26 | { |
... | ... | @@ -100,7 +100,7 @@ |
100 | 100 | "id": 13, |
101 | 101 | "desc": "累计登录4天", |
102 | 102 | "aim": 4, |
103 | - "coin": 100, | |
103 | + "coin": 10000, | |
104 | 104 | "is_video": 0 |
105 | 105 | }, |
106 | 106 | { |
... | ... | @@ -108,7 +108,7 @@ |
108 | 108 | "id": 14, |
109 | 109 | "desc": "累计登录6天", |
110 | 110 | "aim": 6, |
111 | - "coin": 200, | |
111 | + "coin": 8000, | |
112 | 112 | "is_video": 0 |
113 | 113 | }, |
114 | 114 | { |
... | ... | @@ -116,7 +116,7 @@ |
116 | 116 | "id": 15, |
117 | 117 | "desc": "累计登录8天", |
118 | 118 | "aim": 8, |
119 | - "coin": 300, | |
119 | + "coin": 6000, | |
120 | 120 | "is_video": 1 |
121 | 121 | }, |
122 | 122 | { |
... | ... | @@ -164,7 +164,7 @@ |
164 | 164 | "id": 21, |
165 | 165 | "desc": "累计观看视频40次", |
166 | 166 | "aim": 40, |
167 | - "coin": 100, | |
167 | + "coin": 10000, | |
168 | 168 | "is_video": 0 |
169 | 169 | }, |
170 | 170 | { |
... | ... | @@ -172,7 +172,7 @@ |
172 | 172 | "id": 22, |
173 | 173 | "desc": "累计观看视频80次", |
174 | 174 | "aim": 80, |
175 | - "coin": 150, | |
175 | + "coin":8000, | |
176 | 176 | "is_video": 0 |
177 | 177 | }, |
178 | 178 | { |
... | ... | @@ -180,7 +180,7 @@ |
180 | 180 | "id": 23, |
181 | 181 | "desc": "累计观看视频120次", |
182 | 182 | "aim": 120, |
183 | - "coin": 200, | |
183 | + "coin": 6000, | |
184 | 184 | "is_video": 0 |
185 | 185 | }, |
186 | 186 | { |
... | ... | @@ -244,7 +244,7 @@ |
244 | 244 | "id": 31, |
245 | 245 | "desc": "累计消除400行", |
246 | 246 | "aim": 400, |
247 | - "coin": 100, | |
247 | + "coin": 10000, | |
248 | 248 | "is_video": 0 |
249 | 249 | }, |
250 | 250 | { |
... | ... | @@ -252,7 +252,7 @@ |
252 | 252 | "id": 32, |
253 | 253 | "desc": "累计消除800行", |
254 | 254 | "aim": 800, |
255 | - "coin": 100, | |
255 | + "coin": 8000, | |
256 | 256 | "is_video": 0 |
257 | 257 | }, |
258 | 258 | { |
... | ... | @@ -260,7 +260,7 @@ |
260 | 260 | "id": 33, |
261 | 261 | "desc": "累计消除1600行", |
262 | 262 | "aim": 1600, |
263 | - "coin": 200, | |
263 | + "coin": 5000, | |
264 | 264 | "is_video": 0 |
265 | 265 | }, |
266 | 266 | { |
... | ... | @@ -324,7 +324,7 @@ |
324 | 324 | "id": 41, |
325 | 325 | "desc": "累计消除200列", |
326 | 326 | "aim": 200, |
327 | - "coin": 100, | |
327 | + "coin": 10000, | |
328 | 328 | "is_video": 0 |
329 | 329 | }, |
330 | 330 | { |
... | ... | @@ -332,7 +332,7 @@ |
332 | 332 | "id": 42, |
333 | 333 | "desc": "累计消除400列", |
334 | 334 | "aim": 400, |
335 | - "coin": 100, | |
335 | + "coin": 8000, | |
336 | 336 | "is_video": 0 |
337 | 337 | }, |
338 | 338 | { |
... | ... | @@ -340,7 +340,7 @@ |
340 | 340 | "id": 43, |
341 | 341 | "desc": "累计消除800列", |
342 | 342 | "aim": 800, |
343 | - "coin": 200, | |
343 | + "coin": 5000, | |
344 | 344 | "is_video": 0 |
345 | 345 | }, |
346 | 346 | { | ... | ... |
src/HttpServer/jsonconf/LuckyBagConfig.json
1 | 1 | [ |
2 | 2 | { |
3 | 3 | "id": 1, |
4 | - "coin": 88, | |
4 | + "coin": 8800, | |
5 | 5 | "rate": 5 |
6 | 6 | }, |
7 | 7 | { |
8 | 8 | "id": 2, |
9 | - "coin": 108, | |
9 | + "coin": 10800, | |
10 | 10 | "rate": 15 |
11 | 11 | }, |
12 | 12 | { |
13 | 13 | "id": 3, |
14 | - "coin": 148, | |
14 | + "coin": 14800, | |
15 | 15 | "rate": 25 |
16 | 16 | }, |
17 | 17 | { |
18 | 18 | "id": 4, |
19 | - "coin": 168, | |
19 | + "coin": 16800, | |
20 | 20 | "rate": 25 |
21 | 21 | }, |
22 | 22 | { |
23 | 23 | "id": 5, |
24 | - "coin": 188, | |
24 | + "coin": 18800, | |
25 | 25 | "rate": 15 |
26 | 26 | }, |
27 | 27 | { |
28 | 28 | "id": 6, |
29 | - "coin": 228, | |
29 | + "coin": 19800, | |
30 | 30 | "rate": 10 |
31 | 31 | }, |
32 | 32 | { |
33 | 33 | "id": 7, |
34 | - "coin": 268, | |
34 | + "coin": 26800, | |
35 | 35 | "rate": 5 |
36 | 36 | } |
37 | 37 | ] |
38 | 38 | \ No newline at end of file | ... | ... |
src/HttpServer/jsonconf/RedPackageConfig.json
... | ... | @@ -2,151 +2,151 @@ |
2 | 2 | { |
3 | 3 | "id": 1, |
4 | 4 | "point": 200, |
5 | - "free_coin": 60, | |
5 | + "free_coin": 11000, | |
6 | 6 | "video_coin": 150 |
7 | 7 | }, |
8 | 8 | { |
9 | 9 | "id": 2, |
10 | 10 | "point": 500, |
11 | - "free_coin": 60, | |
11 | + "free_coin": 6000, | |
12 | 12 | "video_coin": 150 |
13 | 13 | }, |
14 | 14 | { |
15 | 15 | "id": 3, |
16 | 16 | "point": 800, |
17 | - "free_coin": 50, | |
17 | + "free_coin": 5000, | |
18 | 18 | "video_coin": 150 |
19 | 19 | }, |
20 | 20 | { |
21 | 21 | "id": 4, |
22 | 22 | "point": 1200, |
23 | - "free_coin": 50, | |
23 | + "free_coin": 5000, | |
24 | 24 | "video_coin": 150 |
25 | 25 | }, |
26 | 26 | { |
27 | 27 | "id": 5, |
28 | 28 | "point": 1600, |
29 | - "free_coin": 40, | |
29 | + "free_coin": 4000, | |
30 | 30 | "video_coin": 150 |
31 | 31 | }, |
32 | 32 | { |
33 | 33 | "id": 6, |
34 | 34 | "point": 2000, |
35 | - "free_coin": 40, | |
35 | + "free_coin": 4000, | |
36 | 36 | "video_coin": 150 |
37 | 37 | }, |
38 | 38 | { |
39 | 39 | "id": 7, |
40 | 40 | "point": 2400, |
41 | - "free_coin": 40, | |
41 | + "free_coin": 4000, | |
42 | 42 | "video_coin": 150 |
43 | 43 | }, |
44 | 44 | { |
45 | 45 | "id": 8, |
46 | 46 | "point": 2800, |
47 | - "free_coin": 40, | |
47 | + "free_coin": 4000, | |
48 | 48 | "video_coin": 150 |
49 | 49 | }, |
50 | 50 | { |
51 | 51 | "id": 9, |
52 | 52 | "point": 3200, |
53 | - "free_coin": 35, | |
53 | + "free_coin": 3500, | |
54 | 54 | "video_coin": 150 |
55 | 55 | }, |
56 | 56 | { |
57 | 57 | "id": 10, |
58 | 58 | "point": 3600, |
59 | - "free_coin": 35, | |
59 | + "free_coin": 3500, | |
60 | 60 | "video_coin": 150 |
61 | 61 | }, |
62 | 62 | { |
63 | 63 | "id": 11, |
64 | 64 | "point": 3800, |
65 | - "free_coin": 30, | |
65 | + "free_coin": 3000, | |
66 | 66 | "video_coin": 150 |
67 | 67 | }, |
68 | 68 | { |
69 | 69 | "id": 12, |
70 | 70 | "point": 4000, |
71 | - "free_coin": 30, | |
71 | + "free_coin": 3000, | |
72 | 72 | "video_coin": 150 |
73 | 73 | }, |
74 | 74 | { |
75 | 75 | "id": 13, |
76 | 76 | "point": 4200, |
77 | - "free_coin": 30, | |
77 | + "free_coin": 3000, | |
78 | 78 | "video_coin": 150 |
79 | 79 | }, |
80 | 80 | { |
81 | 81 | "id": 14, |
82 | 82 | "point": 4400, |
83 | - "free_coin": 25, | |
83 | + "free_coin": 2500, | |
84 | 84 | "video_coin": 150 |
85 | 85 | }, |
86 | 86 | { |
87 | 87 | "id": 15, |
88 | 88 | "point": 4600, |
89 | - "free_coin": 25, | |
89 | + "free_coin": 2500, | |
90 | 90 | "video_coin": 150 |
91 | 91 | }, |
92 | 92 | { |
93 | 93 | "id": 16, |
94 | 94 | "point": 4800, |
95 | - "free_coin": 25, | |
95 | + "free_coin": 2500, | |
96 | 96 | "video_coin": 150 |
97 | 97 | }, |
98 | 98 | { |
99 | 99 | "id": 17, |
100 | 100 | "point": 5000, |
101 | - "free_coin": 25, | |
101 | + "free_coin": 2500, | |
102 | 102 | "video_coin": 150 |
103 | 103 | }, |
104 | 104 | { |
105 | 105 | "id": 18, |
106 | 106 | "point": 5200, |
107 | - "free_coin": 20, | |
107 | + "free_coin": 2000, | |
108 | 108 | "video_coin": 150 |
109 | 109 | }, |
110 | 110 | { |
111 | 111 | "id": 19, |
112 | 112 | "point": 5400, |
113 | - "free_coin": 20, | |
113 | + "free_coin": 2000, | |
114 | 114 | "video_coin": 150 |
115 | 115 | }, |
116 | 116 | { |
117 | 117 | "id": 20, |
118 | 118 | "point": 5600, |
119 | - "free_coin": 20, | |
119 | + "free_coin": 2000, | |
120 | 120 | "video_coin": 150 |
121 | 121 | }, |
122 | 122 | { |
123 | 123 | "id": 21, |
124 | 124 | "point": 5800, |
125 | - "free_coin": 20, | |
125 | + "free_coin": 2000, | |
126 | 126 | "video_coin": 150 |
127 | 127 | }, |
128 | 128 | { |
129 | 129 | "id": 22, |
130 | 130 | "point": 6000, |
131 | - "free_coin": 20, | |
131 | + "free_coin": 2000, | |
132 | 132 | "video_coin": 150 |
133 | 133 | }, |
134 | 134 | { |
135 | 135 | "id": 23, |
136 | 136 | "point": 6200, |
137 | - "free_coin": 20, | |
137 | + "free_coin": 2000, | |
138 | 138 | "video_coin": 150 |
139 | 139 | }, |
140 | 140 | { |
141 | 141 | "id": 24, |
142 | 142 | "point": 6400, |
143 | - "free_coin": 20, | |
143 | + "free_coin": 2000, | |
144 | 144 | "video_coin": 150 |
145 | 145 | }, |
146 | 146 | { |
147 | 147 | "id": 25, |
148 | 148 | "point": 6600, |
149 | - "free_coin": 20, | |
149 | + "free_coin": 2000, | |
150 | 150 | "video_coin": 150 |
151 | 151 | } |
152 | 152 | ] |
153 | 153 | \ No newline at end of file | ... | ... |
src/HttpServer/jsonconf/RmbConfig.json
1 | 1 | [ |
2 | 2 | { |
3 | 3 | "id": 1, |
4 | - "rmb_num": 0.5, | |
4 | + "rmb_num": 0.3, | |
5 | 5 | "time": 1, |
6 | - "login_day": 2 | |
6 | + "login_day": 1 | |
7 | 7 | }, |
8 | 8 | { |
9 | 9 | "id": 2, |
10 | - "rmb_num": 1, | |
10 | + "rmb_num": 100, | |
11 | 11 | "time": 1, |
12 | - "login_day": 5 | |
12 | + "login_day": 7 | |
13 | 13 | }, |
14 | 14 | { |
15 | 15 | "id": 3, |
16 | - "rmb_num": 1.5, | |
16 | + "rmb_num": 200, | |
17 | 17 | "time": 1, |
18 | - "login_day": 7 | |
18 | + "login_day": 14 | |
19 | 19 | }, |
20 | 20 | { |
21 | 21 | "id": 4, |
22 | - "rmb_num": 2, | |
22 | + "rmb_num": 300, | |
23 | 23 | "time": 1, |
24 | - "login_day": 10 | |
24 | + "login_day": 20 | |
25 | 25 | }, |
26 | 26 | { |
27 | 27 | "id": 5, |
28 | - "rmb_num": 3, | |
28 | + "rmb_num": 400, | |
29 | 29 | "time": 1, |
30 | - "login_day": 15 | |
30 | + "login_day": 30 | |
31 | 31 | }, |
32 | 32 | { |
33 | 33 | "id": 6, |
34 | - "rmb_num": 10, | |
35 | - "time": 1, | |
36 | - "login_day": 20 | |
37 | - }, | |
38 | - { | |
39 | - "id": 7, | |
40 | - "rmb_num": 20, | |
34 | + "rmb_num": 500, | |
41 | 35 | "time": 1, |
42 | - "login_day": 25 | |
43 | - }, | |
44 | - { | |
45 | - "id": 8, | |
46 | - "rmb_num": 30, | |
47 | - "time": 1, | |
48 | - "login_day": 30 | |
49 | - }, | |
50 | - { | |
51 | - "id": 9, | |
52 | - "rmb_num": 100, | |
53 | - "time": 999, | |
54 | - "login_day": 1 | |
36 | + "login_day": 45 | |
55 | 37 | } |
56 | 38 | ] |
57 | 39 | \ No newline at end of file | ... | ... |
src/HttpServer/jsonconf/TaskConfig.json
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | "day_type": 1, |
6 | 6 | "aims": 5, |
7 | 7 | "active": 5, |
8 | - "coin": 10, | |
8 | + "coin": 3000, | |
9 | 9 | "desc": "在线5min" |
10 | 10 | }, |
11 | 11 | { |
... | ... | @@ -14,7 +14,7 @@ |
14 | 14 | "day_type": 1, |
15 | 15 | "aims": 30, |
16 | 16 | "active": 10, |
17 | - "coin": 40, | |
17 | + "coin": 8000, | |
18 | 18 | "desc": "在线30mins" |
19 | 19 | }, |
20 | 20 | { |
... | ... | @@ -23,7 +23,7 @@ |
23 | 23 | "day_type": 2, |
24 | 24 | "aims": 5, |
25 | 25 | "active": 5, |
26 | - "coin": 30, | |
26 | + "coin": 3000, | |
27 | 27 | "desc": "游戏中消耗5次体力" |
28 | 28 | }, |
29 | 29 | { |
... | ... | @@ -32,7 +32,7 @@ |
32 | 32 | "day_type": 3, |
33 | 33 | "aims": 1, |
34 | 34 | "active": 10, |
35 | - "coin": 30, | |
35 | + "coin": 5000, | |
36 | 36 | "desc": "单局成绩超过2000分" |
37 | 37 | }, |
38 | 38 | { |
... | ... | @@ -41,7 +41,7 @@ |
41 | 41 | "day_type": 4, |
42 | 42 | "aims": 5, |
43 | 43 | "active": 20, |
44 | - "coin": 50, | |
44 | + "coin": 5000, | |
45 | 45 | "desc": "观看满5次视频" |
46 | 46 | }, |
47 | 47 | { |
... | ... | @@ -50,7 +50,7 @@ |
50 | 50 | "day_type": 5, |
51 | 51 | "aims": 5, |
52 | 52 | "active": 20, |
53 | - "coin": 40, | |
53 | + "coin": 3000, | |
54 | 54 | "desc": "进行转盘抽奖5次" |
55 | 55 | }, |
56 | 56 | { |
... | ... | @@ -59,7 +59,7 @@ |
59 | 59 | "day_type": 6, |
60 | 60 | "aims": 3, |
61 | 61 | "active": 30, |
62 | - "coin": 60, | |
62 | + "coin": 1000, | |
63 | 63 | "desc": "开福袋3次" |
64 | 64 | }, |
65 | 65 | { |
... | ... | @@ -68,7 +68,7 @@ |
68 | 68 | "day_type": 7, |
69 | 69 | "aims": 1, |
70 | 70 | "active": 15, |
71 | - "coin": 30, | |
71 | + "coin": 3000, | |
72 | 72 | "desc": "放飞火箭1次" |
73 | 73 | }, |
74 | 74 | { |
... | ... | @@ -77,7 +77,7 @@ |
77 | 77 | "day_type": 8, |
78 | 78 | "aims": 2, |
79 | 79 | "active": 20, |
80 | - "coin": 50, | |
80 | + "coin": 3000, | |
81 | 81 | "desc": "游戏内重生2次" |
82 | 82 | }, |
83 | 83 | { |
... | ... | @@ -86,7 +86,7 @@ |
86 | 86 | "day_type": 9, |
87 | 87 | "aims": 5, |
88 | 88 | "active": 15, |
89 | - "coin": 50, | |
89 | + "coin": 5000, | |
90 | 90 | "desc": "游戏中使用5次道具" |
91 | 91 | }, |
92 | 92 | { |
... | ... | @@ -95,7 +95,7 @@ |
95 | 95 | "day_type": 0, |
96 | 96 | "aims": 0, |
97 | 97 | "active": 30, |
98 | - "coin": 150, | |
98 | + "coin": 1500, | |
99 | 99 | "desc": "" |
100 | 100 | }, |
101 | 101 | { |
... | ... | @@ -104,7 +104,7 @@ |
104 | 104 | "day_type": 0, |
105 | 105 | "aims": 0, |
106 | 106 | "active": 80, |
107 | - "coin": 400, | |
107 | + "coin": 4000, | |
108 | 108 | "desc": "" |
109 | 109 | }, |
110 | 110 | { |
... | ... | @@ -113,7 +113,7 @@ |
113 | 113 | "day_type": 0, |
114 | 114 | "aims": 0, |
115 | 115 | "active": 150, |
116 | - "coin": 600, | |
116 | + "coin": 4000, | |
117 | 117 | "desc": "" |
118 | 118 | } |
119 | 119 | ] |
120 | 120 | \ No newline at end of file | ... | ... |
src/HttpServer/jsonconf/TurntableConfig.json
... | ... | @@ -3,35 +3,35 @@ |
3 | 3 | "id": 1, |
4 | 4 | "name": "金币", |
5 | 5 | "type": 101, |
6 | - "desc": 100, | |
6 | + "desc": 1000, | |
7 | 7 | "rate": 10 |
8 | 8 | }, |
9 | 9 | { |
10 | 10 | "id": 2, |
11 | 11 | "name": "金币", |
12 | 12 | "type": 101, |
13 | - "desc": 120, | |
13 | + "desc": 1200, | |
14 | 14 | "rate": 10 |
15 | 15 | }, |
16 | 16 | { |
17 | 17 | "id": 3, |
18 | 18 | "name": "金币", |
19 | 19 | "type": 101, |
20 | - "desc": 130, | |
20 | + "desc": 1300, | |
21 | 21 | "rate": 20 |
22 | 22 | }, |
23 | 23 | { |
24 | 24 | "id": 4, |
25 | 25 | "name": "金币", |
26 | 26 | "type": 101, |
27 | - "desc": 150, | |
27 | + "desc": 1500, | |
28 | 28 | "rate": 20 |
29 | 29 | }, |
30 | 30 | { |
31 | 31 | "id": 5, |
32 | 32 | "name": "金币", |
33 | 33 | "type": 101, |
34 | - "desc": 180, | |
34 | + "desc": 1800, | |
35 | 35 | "rate": 4 |
36 | 36 | }, |
37 | 37 | { | ... | ... |
src/HttpServer/logic/function.go
... | ... | @@ -248,7 +248,7 @@ func (uinfo *UserData) HandleGetTaskReward(req *GettaskrewardReq, resp *Gettaskr |
248 | 248 | //将状态置位已领取 |
249 | 249 | list.Taskdata[index].Taskstatus = 0 |
250 | 250 | //发奖励 |
251 | - realgold, err := AddCoinToSdk(uuid, addgold, gameid, channel, REDBAGTYPE_102) | |
251 | + realgold, realaddgold, err := AddCoinToSdk(uuid, addgold, gameid, channel, REDBAGTYPE_102) | |
252 | 252 | if err != nil { |
253 | 253 | logger.Info("GetUserInfo HandlerDrawguangold data failed:%v,for:%v", err) |
254 | 254 | resp.Message = "后台提现失败" |
... | ... | @@ -257,7 +257,7 @@ func (uinfo *UserData) HandleGetTaskReward(req *GettaskrewardReq, resp *Gettaskr |
257 | 257 | } |
258 | 258 | |
259 | 259 | uinfo.RealGold = realgold |
260 | - resp.Data.Goldnum = addgold | |
260 | + resp.Data.Goldnum = realaddgold | |
261 | 261 | resp.Data.Walletgold = uinfo.RealGold |
262 | 262 | |
263 | 263 | return nil |
... | ... | @@ -979,7 +979,23 @@ func GetCashFromSDK(uuid int, goldnum int, gameid, channel, openid, nickname, he |
979 | 979 | return newnum, nil |
980 | 980 | } |
981 | 981 | |
982 | -func AddCoinToSdk(uuid int, goldnum int, gameid string, channel string, atype int) (int, error) { | |
982 | +func AddCoinToSdk(uuid int, goldnum int, gameid string, channel string, atype int) (int, int, error) { | |
983 | + //需要处理一下金币数值 | |
984 | + realaddgoldnum := 0 | |
985 | + newnum, err := GetCoinFromSdk(uuid, gameid, channel) | |
986 | + if err != nil { | |
987 | + logger.Error("AddCoinToSdk failed=%v", err) | |
988 | + return 0, 0, err | |
989 | + } | |
990 | + | |
991 | + if newnum >= 950000 { | |
992 | + if newnum >= 990000 { | |
993 | + realaddgoldnum = 1 | |
994 | + } else { | |
995 | + realaddgoldnum = 100 | |
996 | + } | |
997 | + } | |
998 | + | |
983 | 999 | SERVERKEY := conf.GetCoinConf().Key |
984 | 1000 | if gameid == "1017" { |
985 | 1001 | SERVERKEY = XIAOXINGXING_SERVERKEYTEST_1017 |
... | ... | @@ -995,7 +1011,7 @@ func AddCoinToSdk(uuid int, goldnum int, gameid string, channel string, atype in |
995 | 1011 | paramlist = append(paramlist, pchannel) |
996 | 1012 | puid := "uid=" + strconv.Itoa(uuid) |
997 | 1013 | paramlist = append(paramlist, puid) |
998 | - pcoin := "coin=" + strconv.Itoa(goldnum) | |
1014 | + pcoin := "coin=" + strconv.Itoa(realaddgoldnum) | |
999 | 1015 | paramlist = append(paramlist, pcoin) |
1000 | 1016 | ptyp := "typ=" + strconv.Itoa(atype) |
1001 | 1017 | paramlist = append(paramlist, ptyp) |
... | ... | @@ -1011,7 +1027,7 @@ func AddCoinToSdk(uuid int, goldnum int, gameid string, channel string, atype in |
1011 | 1027 | var req AddCoinDesc |
1012 | 1028 | req.Channel = channel |
1013 | 1029 | req.Gameid = gameid |
1014 | - req.Coin = goldnum | |
1030 | + req.Coin = realaddgoldnum | |
1015 | 1031 | req.Sign = sign |
1016 | 1032 | req.Sign_type = "md5" |
1017 | 1033 | req.Time_stamp = strconv.Itoa(int(time.Now().Unix())) |
... | ... | @@ -1021,12 +1037,12 @@ func AddCoinToSdk(uuid int, goldnum int, gameid string, channel string, atype in |
1021 | 1037 | bys, err := json.Marshal(&req) |
1022 | 1038 | if err != nil { |
1023 | 1039 | logger.Error("AddCoinToSdk failed=%v", err) |
1024 | - return 0, err | |
1040 | + return 0, realaddgoldnum, err | |
1025 | 1041 | } |
1026 | 1042 | res, err := DoHttpPost(bys, "api/server/addcoin") |
1027 | 1043 | if err != nil { |
1028 | 1044 | logger.Error("AddCoinToSdk failed=%v", err) |
1029 | - return 0, err | |
1045 | + return 0, realaddgoldnum, err | |
1030 | 1046 | } |
1031 | 1047 | |
1032 | 1048 | logger.Info("AddCoinToSdk res=%v", res) |
... | ... | @@ -1034,15 +1050,15 @@ func AddCoinToSdk(uuid int, goldnum int, gameid string, channel string, atype in |
1034 | 1050 | err = json.Unmarshal([]byte(res), &resp) |
1035 | 1051 | if err != nil { |
1036 | 1052 | logger.Error("AddCoinToSdk failed=%v", err) |
1037 | - return 0, err | |
1053 | + return 0, realaddgoldnum, err | |
1038 | 1054 | } |
1039 | 1055 | |
1040 | 1056 | if resp.Code != "0" { |
1041 | 1057 | gold, _ := GetCoinFromSdk(uuid, gameid, channel) |
1042 | 1058 | logger.Error("AddCoinToSdk failed=%v", resp.Msg) |
1043 | - return gold, err | |
1059 | + return gold, realaddgoldnum, err | |
1044 | 1060 | } |
1045 | - return resp.Data.Mycoin, nil | |
1061 | + return resp.Data.Mycoin, realaddgoldnum, nil | |
1046 | 1062 | } |
1047 | 1063 | |
1048 | 1064 | //计算转盘抽奖 | ... | ... |
src/HttpServer/logic/httpserver.go
... | ... | @@ -249,7 +249,7 @@ func Addcoin(w http.ResponseWriter, r *http.Request) { |
249 | 249 | |
250 | 250 | func Testapi(w http.ResponseWriter, r *http.Request) { |
251 | 251 | logger.Info("Testapiddt") |
252 | - realgold, err := AddCoinToSdk(4983097, 100000, "1021", "test", 99) | |
252 | + realgold, _, err := AddCoinToSdk(4983097, 100000, "1021", "test", 99) | |
253 | 253 | if err != nil { |
254 | 254 | logger.Error("Testapi failed") |
255 | 255 | } | ... | ... |
src/HttpServer/logic/logic.go
... | ... | @@ -518,9 +518,8 @@ func HandlerQuerydrawreward(w http.ResponseWriter, data string, uniqueuuid, game |
518 | 518 | resp.Code = 1 |
519 | 519 | break |
520 | 520 | }*/ |
521 | - | |
522 | 521 | if addgold > 0 { |
523 | - realgold, err := AddCoinToSdk(uuid, addgold, gameid, channel, REDBAGTYPE_301) | |
522 | + realgold, realaddgolds, err := AddCoinToSdk(uuid, addgold, gameid, channel, REDBAGTYPE_301) | |
524 | 523 | if err != nil { |
525 | 524 | logger.Info("GetUserInfo HandlerQuerydrawreward data failed:%v,for:%v", err, data) |
526 | 525 | resp.Message = "后台加金币失败了" |
... | ... | @@ -529,6 +528,7 @@ func HandlerQuerydrawreward(w http.ResponseWriter, data string, uniqueuuid, game |
529 | 528 | } |
530 | 529 | |
531 | 530 | uinfo.RealGold = realgold |
531 | + resp.Data.Getgold = realaddgolds | |
532 | 532 | } |
533 | 533 | |
534 | 534 | if uinfo.FreeTicket > 0 { |
... | ... | @@ -538,7 +538,7 @@ func HandlerQuerydrawreward(w http.ResponseWriter, data string, uniqueuuid, game |
538 | 538 | } |
539 | 539 | |
540 | 540 | SaveUserInfo(uinfo, uniqueuuid) |
541 | - resp.Data.Getgold = addgold | |
541 | + | |
542 | 542 | resp.Data.Walletgold = uinfo.RealGold |
543 | 543 | resp.Data.Rewardid = rewardid |
544 | 544 | resp.Data.Leftfreeticket = uinfo.FreeTicket |
... | ... | @@ -711,7 +711,7 @@ func HandlerDosign(w http.ResponseWriter, data string, uniqueuuid, gameid, chann |
711 | 711 | } |
712 | 712 | |
713 | 713 | readgold := 0 |
714 | - readgold, err = AddCoinToSdk(uuid, cfg.Sign_coin, gameid, channel, REDBAGTYPE_107) | |
714 | + readgold, _, err = AddCoinToSdk(uuid, cfg.Sign_coin, gameid, channel, REDBAGTYPE_107) | |
715 | 715 | if err != nil { |
716 | 716 | logger.Info("GetUserInfo HandlerDosign data failed:%v,for:%v", err, data) |
717 | 717 | resp.Message = "后台失败!" |
... | ... | @@ -720,7 +720,7 @@ func HandlerDosign(w http.ResponseWriter, data string, uniqueuuid, gameid, chann |
720 | 720 | } |
721 | 721 | |
722 | 722 | if rdata.Ftype == 2 { |
723 | - readgold, err = AddCoinToSdk(uuid, cfg.Video_coin, gameid, channel, REDBAGTYPE_107) | |
723 | + readgold, _, err = AddCoinToSdk(uuid, cfg.Video_coin, gameid, channel, REDBAGTYPE_107) | |
724 | 724 | if err != nil { |
725 | 725 | logger.Info("GetUserInfo HandlerDosign data failed:%v,for:%v", err, data) |
726 | 726 | resp.Message = "后台失败!" |
... | ... | @@ -766,7 +766,7 @@ func HandlerFetchoffliengold(w http.ResponseWriter, data string, uniqueuuid, gam |
766 | 766 | break |
767 | 767 | } |
768 | 768 | |
769 | - readgold, err := AddCoinToSdk(uuid, uinfo.OfflineGold, gameid, channel, REDBAGTYPE_106) | |
769 | + readgold, _, err := AddCoinToSdk(uuid, uinfo.OfflineGold, gameid, channel, REDBAGTYPE_106) | |
770 | 770 | if err != nil { |
771 | 771 | logger.Info("GetUserInfo HandlerFetchoffliengold data failed:%v,for:%v", err, data) |
772 | 772 | resp.Message = "后台失败!" |
... | ... | @@ -849,7 +849,7 @@ func HandlerFetchluckybag(w http.ResponseWriter, data string, uniqueuuid, gameid |
849 | 849 | break |
850 | 850 | } |
851 | 851 | |
852 | - realgold, err := AddCoinToSdk(uuid, addcoin, gameid, channel, REDBAGTYPE_106) | |
852 | + realgold, _, err := AddCoinToSdk(uuid, addcoin, gameid, channel, REDBAGTYPE_106) | |
853 | 853 | if err != nil { |
854 | 854 | logger.Info("GetUserInfo HandlerFetchluckybag data failed:%v,for:%v", err, data) |
855 | 855 | resp.Message = "后台加金币失败了" |
... | ... | @@ -917,7 +917,7 @@ func HandlerFetchfenredbag(w http.ResponseWriter, data string, uniqueuuid, gamei |
917 | 917 | |
918 | 918 | addgold := cfg.Free_coin |
919 | 919 | readgold := 0 |
920 | - readgold, err = AddCoinToSdk(uuid, cfg.Free_coin, gameid, channel, REDBAGTYPE_103) | |
920 | + readgold, _, err = AddCoinToSdk(uuid, cfg.Free_coin, gameid, channel, REDBAGTYPE_103) | |
921 | 921 | if err != nil { |
922 | 922 | logger.Info("GetUserInfo HandlerFetchfenredbag data failed:%v,for:%v", err, data) |
923 | 923 | resp.Message = "后台失败!" |
... | ... | @@ -927,7 +927,7 @@ func HandlerFetchfenredbag(w http.ResponseWriter, data string, uniqueuuid, gamei |
927 | 927 | |
928 | 928 | if rdata.Ftype == 2 { |
929 | 929 | addgold += cfg.Video_coin |
930 | - readgold, err = AddCoinToSdk(uuid, cfg.Video_coin, gameid, channel, REDBAGTYPE_106) | |
930 | + readgold, _, err = AddCoinToSdk(uuid, cfg.Video_coin, gameid, channel, REDBAGTYPE_106) | |
931 | 931 | if err != nil { |
932 | 932 | logger.Info("GetUserInfo HandlerFetchfenredbag data failed:%v,for:%v", err, data) |
933 | 933 | resp.Message = "后台失败!" |
... | ... | @@ -983,7 +983,7 @@ func HandlerDrawguangold(w http.ResponseWriter, data string, uniqueuuid, gameid, |
983 | 983 | resp.Code = 1 |
984 | 984 | break |
985 | 985 | } |
986 | - realgold, err := AddCoinToSdk(uuid, rdata.Goldnum, gameid, channel, REDBAGTYPE_105) | |
986 | + realgold, _, err := AddCoinToSdk(uuid, rdata.Goldnum, gameid, channel, REDBAGTYPE_105) | |
987 | 987 | if err != nil { |
988 | 988 | logger.Info("GetUserInfo HandlerDrawguangold data failed:%v,for:%v", err, data) |
989 | 989 | resp.Message = "后台提现失败" | ... | ... |