@@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"response_data": {
|
|
||||||
"has_unread_announce": false,
|
|
||||||
"server_timestamp": 1679236714
|
|
||||||
},
|
|
||||||
"release_info": [],
|
|
||||||
"status_code": 200
|
|
||||||
}
|
|
||||||
+1
-124089
File diff suppressed because one or more lines are too long
+5419
File diff suppressed because it is too large
Load Diff
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"response_data": [],
|
|
||||||
"release_info": [],
|
|
||||||
"status_code": 200
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"response_data": [],
|
|
||||||
"release_info": [],
|
|
||||||
"status_code": 200
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
{
|
|
||||||
"response_data": {
|
|
||||||
"target_list": [
|
|
||||||
{
|
|
||||||
"position": 1,
|
|
||||||
"is_displayable": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"position": 2,
|
|
||||||
"is_displayable": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"position": 3,
|
|
||||||
"is_displayable": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"position": 4,
|
|
||||||
"is_displayable": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"position": 5,
|
|
||||||
"is_displayable": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"position": 6,
|
|
||||||
"is_displayable": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"server_timestamp": 1679238229
|
|
||||||
},
|
|
||||||
"release_info": [],
|
|
||||||
"status_code": 200
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"response_data": [],
|
|
||||||
"release_info": [],
|
|
||||||
"status_code": 200
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"response_data": {
|
|
||||||
"enable_gdpr": true,
|
|
||||||
"is_eea": false,
|
|
||||||
"server_timestamp": 1679360063
|
|
||||||
},
|
|
||||||
"release_info": [],
|
|
||||||
"status_code": 200
|
|
||||||
}
|
|
||||||
+2185
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"response_data": [],
|
|
||||||
"release_info": [],
|
|
||||||
"status_code": 200
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"response_data": {
|
|
||||||
"has_notice": false,
|
|
||||||
"notice_id": 0,
|
|
||||||
"type": 0,
|
|
||||||
"title": "",
|
|
||||||
"contents": "",
|
|
||||||
"server_timestamp": 1679360063
|
|
||||||
},
|
|
||||||
"release_info": [],
|
|
||||||
"status_code": 200
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
"response_data": {
|
|
||||||
"restriction_info": {
|
|
||||||
"restricted": false
|
|
||||||
},
|
|
||||||
"under_age_info": {
|
|
||||||
"birth_set": true,
|
|
||||||
"has_limit": false,
|
|
||||||
"limit_amount": null,
|
|
||||||
"month_used": 0
|
|
||||||
},
|
|
||||||
"sns_product_list": [],
|
|
||||||
"product_list": [],
|
|
||||||
"subscription_list": [],
|
|
||||||
"show_point_shop": true,
|
|
||||||
"server_timestamp": 1679238244
|
|
||||||
},
|
|
||||||
"release_info": [],
|
|
||||||
"status_code": 200
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,708 @@
|
|||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"owning_stamp_ids": [
|
||||||
|
1001,
|
||||||
|
1002,
|
||||||
|
1003,
|
||||||
|
1004,
|
||||||
|
1005,
|
||||||
|
1006,
|
||||||
|
1007,
|
||||||
|
1008,
|
||||||
|
1009,
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
19,
|
||||||
|
28,
|
||||||
|
3,
|
||||||
|
4,
|
||||||
|
20,
|
||||||
|
29,
|
||||||
|
5,
|
||||||
|
6,
|
||||||
|
21,
|
||||||
|
30,
|
||||||
|
7,
|
||||||
|
8,
|
||||||
|
22,
|
||||||
|
31,
|
||||||
|
9,
|
||||||
|
10,
|
||||||
|
23,
|
||||||
|
32,
|
||||||
|
11,
|
||||||
|
12,
|
||||||
|
24,
|
||||||
|
33,
|
||||||
|
13,
|
||||||
|
14,
|
||||||
|
25,
|
||||||
|
34,
|
||||||
|
15,
|
||||||
|
16,
|
||||||
|
26,
|
||||||
|
35,
|
||||||
|
17,
|
||||||
|
18,
|
||||||
|
27,
|
||||||
|
36,
|
||||||
|
201,
|
||||||
|
101,
|
||||||
|
102,
|
||||||
|
119,
|
||||||
|
128,
|
||||||
|
103,
|
||||||
|
104,
|
||||||
|
120,
|
||||||
|
129,
|
||||||
|
105,
|
||||||
|
106,
|
||||||
|
121,
|
||||||
|
130,
|
||||||
|
107,
|
||||||
|
108,
|
||||||
|
122,
|
||||||
|
131,
|
||||||
|
109,
|
||||||
|
110,
|
||||||
|
123,
|
||||||
|
132,
|
||||||
|
111,
|
||||||
|
112,
|
||||||
|
124,
|
||||||
|
133,
|
||||||
|
113,
|
||||||
|
114,
|
||||||
|
125,
|
||||||
|
134,
|
||||||
|
115,
|
||||||
|
116,
|
||||||
|
126,
|
||||||
|
135,
|
||||||
|
117,
|
||||||
|
118,
|
||||||
|
127,
|
||||||
|
136,
|
||||||
|
301,
|
||||||
|
401,
|
||||||
|
402,
|
||||||
|
10001,
|
||||||
|
10002
|
||||||
|
],
|
||||||
|
"stamp_setting": [
|
||||||
|
{
|
||||||
|
"stamp_type": 1,
|
||||||
|
"setting_list": [
|
||||||
|
{
|
||||||
|
"stamp_setting_id": 1,
|
||||||
|
"main_flag": 1,
|
||||||
|
"stamp_list": [
|
||||||
|
{
|
||||||
|
"position": 1,
|
||||||
|
"stamp_id": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 2,
|
||||||
|
"stamp_id": 17
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 3,
|
||||||
|
"stamp_id": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 4,
|
||||||
|
"stamp_id": 9
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 5,
|
||||||
|
"stamp_id": 19
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 6,
|
||||||
|
"stamp_id": 15
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 7,
|
||||||
|
"stamp_id": 28
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 8,
|
||||||
|
"stamp_id": 16
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 9,
|
||||||
|
"stamp_id": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 10,
|
||||||
|
"stamp_id": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 11,
|
||||||
|
"stamp_id": 6
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 12,
|
||||||
|
"stamp_id": 109
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 13,
|
||||||
|
"stamp_id": 21
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 14,
|
||||||
|
"stamp_id": 110
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 15,
|
||||||
|
"stamp_id": 30
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 16,
|
||||||
|
"stamp_id": 112
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 17,
|
||||||
|
"stamp_id": 128
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 18,
|
||||||
|
"stamp_id": 117
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stamp_setting_id": 2,
|
||||||
|
"main_flag": 0,
|
||||||
|
"stamp_list": [
|
||||||
|
{
|
||||||
|
"position": 1,
|
||||||
|
"stamp_id": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 2,
|
||||||
|
"stamp_id": 119
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 3,
|
||||||
|
"stamp_id": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 4,
|
||||||
|
"stamp_id": 103
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 5,
|
||||||
|
"stamp_id": 21
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 6,
|
||||||
|
"stamp_id": 121
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 7,
|
||||||
|
"stamp_id": 22
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 8,
|
||||||
|
"stamp_id": 108
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 9,
|
||||||
|
"stamp_id": 9
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 10,
|
||||||
|
"stamp_id": 110
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 11,
|
||||||
|
"stamp_id": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 12,
|
||||||
|
"stamp_id": 112
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 13,
|
||||||
|
"stamp_id": 14
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 14,
|
||||||
|
"stamp_id": 113
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 15,
|
||||||
|
"stamp_id": 16
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 16,
|
||||||
|
"stamp_id": 126
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 17,
|
||||||
|
"stamp_id": 17
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 18,
|
||||||
|
"stamp_id": 117
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stamp_setting_id": 3,
|
||||||
|
"main_flag": 0,
|
||||||
|
"stamp_list": [
|
||||||
|
{
|
||||||
|
"position": 1,
|
||||||
|
"stamp_id": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 2,
|
||||||
|
"stamp_id": 101
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 3,
|
||||||
|
"stamp_id": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 4,
|
||||||
|
"stamp_id": 103
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 5,
|
||||||
|
"stamp_id": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 6,
|
||||||
|
"stamp_id": 105
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 7,
|
||||||
|
"stamp_id": 7
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 8,
|
||||||
|
"stamp_id": 108
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 9,
|
||||||
|
"stamp_id": 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 10,
|
||||||
|
"stamp_id": 110
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 11,
|
||||||
|
"stamp_id": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 12,
|
||||||
|
"stamp_id": 112
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 13,
|
||||||
|
"stamp_id": 13
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 14,
|
||||||
|
"stamp_id": 114
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 15,
|
||||||
|
"stamp_id": 16
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 16,
|
||||||
|
"stamp_id": 116
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 17,
|
||||||
|
"stamp_id": 17
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 18,
|
||||||
|
"stamp_id": 117
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stamp_setting_id": 4,
|
||||||
|
"main_flag": 0,
|
||||||
|
"stamp_list": [
|
||||||
|
{
|
||||||
|
"position": 1,
|
||||||
|
"stamp_id": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 2,
|
||||||
|
"stamp_id": 101
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 3,
|
||||||
|
"stamp_id": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 4,
|
||||||
|
"stamp_id": 103
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 5,
|
||||||
|
"stamp_id": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 6,
|
||||||
|
"stamp_id": 105
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 7,
|
||||||
|
"stamp_id": 7
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 8,
|
||||||
|
"stamp_id": 108
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 9,
|
||||||
|
"stamp_id": 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 10,
|
||||||
|
"stamp_id": 110
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 11,
|
||||||
|
"stamp_id": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 12,
|
||||||
|
"stamp_id": 112
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 13,
|
||||||
|
"stamp_id": 13
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 14,
|
||||||
|
"stamp_id": 114
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 15,
|
||||||
|
"stamp_id": 16
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 16,
|
||||||
|
"stamp_id": 116
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 17,
|
||||||
|
"stamp_id": 17
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 18,
|
||||||
|
"stamp_id": 117
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stamp_setting_id": 5,
|
||||||
|
"main_flag": 0,
|
||||||
|
"stamp_list": [
|
||||||
|
{
|
||||||
|
"position": 1,
|
||||||
|
"stamp_id": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 2,
|
||||||
|
"stamp_id": 101
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 3,
|
||||||
|
"stamp_id": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 4,
|
||||||
|
"stamp_id": 103
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 5,
|
||||||
|
"stamp_id": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 6,
|
||||||
|
"stamp_id": 105
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 7,
|
||||||
|
"stamp_id": 7
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 8,
|
||||||
|
"stamp_id": 108
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 9,
|
||||||
|
"stamp_id": 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 10,
|
||||||
|
"stamp_id": 110
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 11,
|
||||||
|
"stamp_id": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 12,
|
||||||
|
"stamp_id": 112
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 13,
|
||||||
|
"stamp_id": 13
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 14,
|
||||||
|
"stamp_id": 114
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 15,
|
||||||
|
"stamp_id": 16
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 16,
|
||||||
|
"stamp_id": 116
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 17,
|
||||||
|
"stamp_id": 17
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 18,
|
||||||
|
"stamp_id": 117
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stamp_type": 2,
|
||||||
|
"setting_list": [
|
||||||
|
{
|
||||||
|
"stamp_setting_id": 1,
|
||||||
|
"main_flag": 1,
|
||||||
|
"stamp_list": [
|
||||||
|
{
|
||||||
|
"position": 1,
|
||||||
|
"stamp_id": 1001
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 2,
|
||||||
|
"stamp_id": 1002
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 3,
|
||||||
|
"stamp_id": 1003
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 4,
|
||||||
|
"stamp_id": 1004
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 5,
|
||||||
|
"stamp_id": 1005
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 6,
|
||||||
|
"stamp_id": 1006
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 7,
|
||||||
|
"stamp_id": 1007
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 8,
|
||||||
|
"stamp_id": 1008
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 9,
|
||||||
|
"stamp_id": 1009
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stamp_setting_id": 2,
|
||||||
|
"main_flag": 0,
|
||||||
|
"stamp_list": [
|
||||||
|
{
|
||||||
|
"position": 1,
|
||||||
|
"stamp_id": 1001
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 2,
|
||||||
|
"stamp_id": 1002
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 3,
|
||||||
|
"stamp_id": 1003
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 4,
|
||||||
|
"stamp_id": 1004
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 5,
|
||||||
|
"stamp_id": 1005
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 6,
|
||||||
|
"stamp_id": 1006
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 7,
|
||||||
|
"stamp_id": 1007
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 8,
|
||||||
|
"stamp_id": 1008
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 9,
|
||||||
|
"stamp_id": 1009
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stamp_setting_id": 3,
|
||||||
|
"main_flag": 0,
|
||||||
|
"stamp_list": [
|
||||||
|
{
|
||||||
|
"position": 1,
|
||||||
|
"stamp_id": 1001
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 2,
|
||||||
|
"stamp_id": 1002
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 3,
|
||||||
|
"stamp_id": 1003
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 4,
|
||||||
|
"stamp_id": 1004
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 5,
|
||||||
|
"stamp_id": 1005
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 6,
|
||||||
|
"stamp_id": 1006
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 7,
|
||||||
|
"stamp_id": 1007
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 8,
|
||||||
|
"stamp_id": 1008
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 9,
|
||||||
|
"stamp_id": 1009
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stamp_setting_id": 4,
|
||||||
|
"main_flag": 0,
|
||||||
|
"stamp_list": [
|
||||||
|
{
|
||||||
|
"position": 1,
|
||||||
|
"stamp_id": 1001
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 2,
|
||||||
|
"stamp_id": 1002
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 3,
|
||||||
|
"stamp_id": 1003
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 4,
|
||||||
|
"stamp_id": 1004
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 5,
|
||||||
|
"stamp_id": 1005
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 6,
|
||||||
|
"stamp_id": 1006
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 7,
|
||||||
|
"stamp_id": 1007
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 8,
|
||||||
|
"stamp_id": 1008
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 9,
|
||||||
|
"stamp_id": 1009
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stamp_setting_id": 5,
|
||||||
|
"main_flag": 0,
|
||||||
|
"stamp_list": [
|
||||||
|
{
|
||||||
|
"position": 1,
|
||||||
|
"stamp_id": 1001
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 2,
|
||||||
|
"stamp_id": 1002
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 3,
|
||||||
|
"stamp_id": 1003
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 4,
|
||||||
|
"stamp_id": 1004
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 5,
|
||||||
|
"stamp_id": 1005
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 6,
|
||||||
|
"stamp_id": 1006
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 7,
|
||||||
|
"stamp_id": 1007
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 8,
|
||||||
|
"stamp_id": 1008
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"position": 9,
|
||||||
|
"stamp_id": 1009
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"status": 200,
|
||||||
|
"commandNum": false,
|
||||||
|
"timeStamp": 1680244575
|
||||||
|
}
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"response_data": {
|
|
||||||
"tos_id": 1,
|
|
||||||
"tos_type": 1,
|
|
||||||
"is_agreed": true,
|
|
||||||
"server_timestamp": 1679360063
|
|
||||||
},
|
|
||||||
"release_info": [],
|
|
||||||
"status_code": 200
|
|
||||||
}
|
|
||||||
Binary file not shown.
@@ -1,90 +0,0 @@
|
|||||||
{
|
|
||||||
"response_data": {
|
|
||||||
"user": {
|
|
||||||
"user_id": 3241988,
|
|
||||||
"name": "\u68a6\u8def @\u65c5\u7acb\u3061\u306e\u65e5\u306b",
|
|
||||||
"level": 1028,
|
|
||||||
"exp": 28824396,
|
|
||||||
"previous_exp": 27734700,
|
|
||||||
"next_exp": 28941885,
|
|
||||||
"game_coin": 112124104,
|
|
||||||
"sns_coin": 0,
|
|
||||||
"free_sns_coin": 0,
|
|
||||||
"paid_sns_coin": 0,
|
|
||||||
"social_point": 1438395,
|
|
||||||
"unit_max": 5000,
|
|
||||||
"waiting_unit_max": 1000,
|
|
||||||
"energy_max": 417,
|
|
||||||
"energy_full_time": "2023-03-20 03:58:55",
|
|
||||||
"license_live_energy_recoverly_time": 60,
|
|
||||||
"energy_full_need_time": 0,
|
|
||||||
"over_max_energy": 0,
|
|
||||||
"training_energy": 10,
|
|
||||||
"training_energy_max": 10,
|
|
||||||
"friend_max": 99,
|
|
||||||
"invite_code": "377385143",
|
|
||||||
"insert_date": "2015-08-10 18:58:30",
|
|
||||||
"update_date": "2018-08-09 18:13:12",
|
|
||||||
"tutorial_state": -1,
|
|
||||||
"diamond_coin": 0,
|
|
||||||
"crystal_coin": 0,
|
|
||||||
"lp_recovery_item": [
|
|
||||||
{
|
|
||||||
"item_id": 1,
|
|
||||||
"amount": 16
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item_id": 2,
|
|
||||||
"amount": 308
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item_id": 3,
|
|
||||||
"amount": 662
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item_id": 4,
|
|
||||||
"amount": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item_id": 7,
|
|
||||||
"amount": 24
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item_id": 10,
|
|
||||||
"amount": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item_id": 13,
|
|
||||||
"amount": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item_id": 14,
|
|
||||||
"amount": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item_id": 801,
|
|
||||||
"amount": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item_id": 802,
|
|
||||||
"amount": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item_id": 803,
|
|
||||||
"amount": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item_id": 805,
|
|
||||||
"amount": 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"birth": {
|
|
||||||
"birth_month": 5,
|
|
||||||
"birth_day": 22
|
|
||||||
},
|
|
||||||
"server_timestamp": 1679360062
|
|
||||||
},
|
|
||||||
"release_info": [],
|
|
||||||
"status_code": 200
|
|
||||||
}
|
|
||||||
+5
-5
@@ -18,7 +18,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func AlbumSeriesAllHandler(ctx *gin.Context) {
|
func AlbumSeriesAllHandler(ctx *gin.Context) {
|
||||||
db, err := sql.Open("sqlite3", "assets/unit.db")
|
db, err := sql.Open("sqlite3", "assets/main.db")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
@@ -61,7 +61,7 @@ func AlbumSeriesAllHandler(ctx *gin.Context) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
albumSeriesAllResp := []model.AlbumResponseData{}
|
albumSeriesAllResp := []model.AlbumSeriesResp{}
|
||||||
for seriesRows.Next() {
|
for seriesRows.Next() {
|
||||||
var series int
|
var series int
|
||||||
err = seriesRows.Scan(&series)
|
err = seriesRows.Scan(&series)
|
||||||
@@ -69,7 +69,7 @@ func AlbumSeriesAllHandler(ctx *gin.Context) {
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
albumSeriesAll := []model.AlbumUnitList{}
|
albumSeriesAll := []model.AlbumResult{}
|
||||||
stmt, err := db.Prepare("SELECT unit_id,rarity FROM unit_m WHERE album_series_id = ?")
|
stmt, err := db.Prepare("SELECT unit_id,rarity FROM unit_m WHERE album_series_id = ?")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
@@ -87,7 +87,7 @@ func AlbumSeriesAllHandler(ctx *gin.Context) {
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
albumSeries := model.AlbumUnitList{
|
albumSeries := model.AlbumResult{
|
||||||
UnitID: unitId,
|
UnitID: unitId,
|
||||||
RankMaxFlag: true,
|
RankMaxFlag: true,
|
||||||
LoveMaxFlag: true,
|
LoveMaxFlag: true,
|
||||||
@@ -142,7 +142,7 @@ func AlbumSeriesAllHandler(ctx *gin.Context) {
|
|||||||
|
|
||||||
albumSeriesAll = append(albumSeriesAll, albumSeries)
|
albumSeriesAll = append(albumSeriesAll, albumSeries)
|
||||||
}
|
}
|
||||||
albumSeriesAllResp = append(albumSeriesAllResp, model.AlbumResponseData{
|
albumSeriesAllResp = append(albumSeriesAllResp, model.AlbumSeriesResp{
|
||||||
SeriesID: series,
|
SeriesID: series,
|
||||||
UnitList: albumSeriesAll,
|
UnitList: albumSeriesAll,
|
||||||
})
|
})
|
||||||
|
|||||||
+25
-3
@@ -2,11 +2,11 @@ package handler
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"honoka-chan/config"
|
"honoka-chan/config"
|
||||||
"honoka-chan/database"
|
"honoka-chan/database"
|
||||||
"honoka-chan/encrypt"
|
"honoka-chan/encrypt"
|
||||||
"honoka-chan/resp"
|
|
||||||
"honoka-chan/utils"
|
"honoka-chan/utils"
|
||||||
"html/template"
|
"html/template"
|
||||||
"net/http"
|
"net/http"
|
||||||
@@ -15,6 +15,16 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type AnnounceResp struct {
|
||||||
|
ResponseData AnnounceData `json:"response_data"`
|
||||||
|
ReleaseInfo []interface{} `json:"release_info"`
|
||||||
|
StatusCode int `json:"status_code"`
|
||||||
|
}
|
||||||
|
type AnnounceData struct {
|
||||||
|
HasUnreadAnnounce bool `json:"has_unread_announce"`
|
||||||
|
ServerTimestamp int64 `json:"server_timestamp"`
|
||||||
|
}
|
||||||
|
|
||||||
func AnnounceIndexHandler(ctx *gin.Context) {
|
func AnnounceIndexHandler(ctx *gin.Context) {
|
||||||
ctx.HTML(http.StatusOK, "announce.tmpl", gin.H{
|
ctx.HTML(http.StatusOK, "announce.tmpl", gin.H{
|
||||||
"title": "Love Live! 学园偶像祭 非官方服务器",
|
"title": "Love Live! 学园偶像祭 非官方服务器",
|
||||||
@@ -54,12 +64,24 @@ func AnnounceCheckStateHandler(ctx *gin.Context) {
|
|||||||
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
||||||
// fmt.Println(newAuthorizeStr)
|
// fmt.Println(newAuthorizeStr)
|
||||||
|
|
||||||
xms := encrypt.RSA_Sign_SHA1([]byte(resp.AnnounceState), "privatekey.pem")
|
announceResp := AnnounceResp{
|
||||||
|
ResponseData: AnnounceData{
|
||||||
|
HasUnreadAnnounce: false,
|
||||||
|
ServerTimestamp: time.Now().Unix(),
|
||||||
|
},
|
||||||
|
ReleaseInfo: []interface{}{},
|
||||||
|
StatusCode: 200,
|
||||||
|
}
|
||||||
|
resp, err := json.Marshal(announceResp)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
xms := encrypt.RSA_Sign_SHA1(resp, "privatekey.pem")
|
||||||
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
||||||
|
|
||||||
ctx.Header("Server-Version", config.Conf.Server.VersionNumber)
|
ctx.Header("Server-Version", config.Conf.Server.VersionNumber)
|
||||||
ctx.Header("user_id", userId[0])
|
ctx.Header("user_id", userId[0])
|
||||||
ctx.Header("authorize", newAuthorizeStr)
|
ctx.Header("authorize", newAuthorizeStr)
|
||||||
ctx.Header("X-Message-Sign", xms64)
|
ctx.Header("X-Message-Sign", xms64)
|
||||||
ctx.String(http.StatusOK, resp.AnnounceState)
|
ctx.String(http.StatusOK, string(resp))
|
||||||
}
|
}
|
||||||
|
|||||||
+29
-6
@@ -2,6 +2,7 @@ package handler
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"honoka-chan/database"
|
"honoka-chan/database"
|
||||||
"honoka-chan/encrypt"
|
"honoka-chan/encrypt"
|
||||||
@@ -12,6 +13,12 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type DownloadResp struct {
|
||||||
|
ResponseData []interface{} `json:"response_data"`
|
||||||
|
ReleaseInfo []interface{} `json:"release_info"`
|
||||||
|
StatusCode int `json:"status_code"`
|
||||||
|
}
|
||||||
|
|
||||||
func DownloadBatchHandler(ctx *gin.Context) {
|
func DownloadBatchHandler(ctx *gin.Context) {
|
||||||
reqTime := time.Now().Unix()
|
reqTime := time.Now().Unix()
|
||||||
|
|
||||||
@@ -44,14 +51,22 @@ func DownloadBatchHandler(ctx *gin.Context) {
|
|||||||
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
||||||
// fmt.Println(newAuthorizeStr)
|
// fmt.Println(newAuthorizeStr)
|
||||||
|
|
||||||
resp := utils.ReadAllText("assets/batch.json")
|
batchResp := DownloadResp{
|
||||||
xms := encrypt.RSA_Sign_SHA1([]byte(resp), "privatekey.pem")
|
ResponseData: []interface{}{},
|
||||||
|
ReleaseInfo: []interface{}{},
|
||||||
|
StatusCode: 200,
|
||||||
|
}
|
||||||
|
resp, err := json.Marshal(batchResp)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
xms := encrypt.RSA_Sign_SHA1(resp, "privatekey.pem")
|
||||||
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
||||||
|
|
||||||
ctx.Header("user_id", userId[0])
|
ctx.Header("user_id", userId[0])
|
||||||
ctx.Header("authorize", newAuthorizeStr)
|
ctx.Header("authorize", newAuthorizeStr)
|
||||||
ctx.Header("X-Message-Sign", xms64)
|
ctx.Header("X-Message-Sign", xms64)
|
||||||
ctx.String(http.StatusOK, resp)
|
ctx.String(http.StatusOK, string(resp))
|
||||||
}
|
}
|
||||||
|
|
||||||
func DownloadEventHandler(ctx *gin.Context) {
|
func DownloadEventHandler(ctx *gin.Context) {
|
||||||
@@ -86,12 +101,20 @@ func DownloadEventHandler(ctx *gin.Context) {
|
|||||||
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
||||||
// fmt.Println(newAuthorizeStr)
|
// fmt.Println(newAuthorizeStr)
|
||||||
|
|
||||||
resp := utils.ReadAllText("assets/event.json")
|
eventResp := DownloadResp{
|
||||||
xms := encrypt.RSA_Sign_SHA1([]byte(resp), "privatekey.pem")
|
ResponseData: []interface{}{},
|
||||||
|
ReleaseInfo: []interface{}{},
|
||||||
|
StatusCode: 200,
|
||||||
|
}
|
||||||
|
resp, err := json.Marshal(eventResp)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
xms := encrypt.RSA_Sign_SHA1(resp, "privatekey.pem")
|
||||||
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
||||||
|
|
||||||
ctx.Header("user_id", userId[0])
|
ctx.Header("user_id", userId[0])
|
||||||
ctx.Header("authorize", newAuthorizeStr)
|
ctx.Header("authorize", newAuthorizeStr)
|
||||||
ctx.Header("X-Message-Sign", xms64)
|
ctx.Header("X-Message-Sign", xms64)
|
||||||
ctx.String(http.StatusOK, resp)
|
ctx.String(http.StatusOK, string(resp))
|
||||||
}
|
}
|
||||||
|
|||||||
+38
-3
@@ -2,6 +2,7 @@ package handler
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"honoka-chan/config"
|
"honoka-chan/config"
|
||||||
"honoka-chan/database"
|
"honoka-chan/database"
|
||||||
@@ -13,6 +14,22 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type EventsResp struct {
|
||||||
|
ResponseData EventsData `json:"response_data"`
|
||||||
|
ReleaseInfo []interface{} `json:"release_info"`
|
||||||
|
StatusCode int `json:"status_code"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type TargetList struct {
|
||||||
|
Position int `json:"position"`
|
||||||
|
IsDisplayable bool `json:"is_displayable"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type EventsData struct {
|
||||||
|
TargetList []TargetList `json:"target_list"`
|
||||||
|
ServerTimestamp int64 `json:"server_timestamp"`
|
||||||
|
}
|
||||||
|
|
||||||
func EventListHandler(ctx *gin.Context) {
|
func EventListHandler(ctx *gin.Context) {
|
||||||
reqTime := time.Now().Unix()
|
reqTime := time.Now().Unix()
|
||||||
|
|
||||||
@@ -45,13 +62,31 @@ func EventListHandler(ctx *gin.Context) {
|
|||||||
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
||||||
// fmt.Println(newAuthorizeStr)
|
// fmt.Println(newAuthorizeStr)
|
||||||
|
|
||||||
resp := utils.ReadAllText("assets/eventlist.json")
|
targets := []TargetList{}
|
||||||
xms := encrypt.RSA_Sign_SHA1([]byte(resp), "privatekey.pem")
|
for i := 0; i < 6; i++ {
|
||||||
|
targets = append(targets, TargetList{
|
||||||
|
Position: i + 1,
|
||||||
|
IsDisplayable: false,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
eventsResp := EventsResp{
|
||||||
|
ResponseData: EventsData{
|
||||||
|
TargetList: targets,
|
||||||
|
ServerTimestamp: time.Now().Unix(),
|
||||||
|
},
|
||||||
|
ReleaseInfo: []interface{}{},
|
||||||
|
StatusCode: 200,
|
||||||
|
}
|
||||||
|
resp, err := json.Marshal(eventsResp)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
xms := encrypt.RSA_Sign_SHA1(resp, "privatekey.pem")
|
||||||
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
||||||
|
|
||||||
ctx.Header("Server-Version", config.Conf.Server.VersionNumber)
|
ctx.Header("Server-Version", config.Conf.Server.VersionNumber)
|
||||||
ctx.Header("user_id", userId[0])
|
ctx.Header("user_id", userId[0])
|
||||||
ctx.Header("authorize", newAuthorizeStr)
|
ctx.Header("authorize", newAuthorizeStr)
|
||||||
ctx.Header("X-Message-Sign", xms64)
|
ctx.Header("X-Message-Sign", xms64)
|
||||||
ctx.String(http.StatusOK, resp)
|
ctx.String(http.StatusOK, string(resp))
|
||||||
}
|
}
|
||||||
|
|||||||
+28
-3
@@ -2,6 +2,7 @@ package handler
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"honoka-chan/config"
|
"honoka-chan/config"
|
||||||
"honoka-chan/database"
|
"honoka-chan/database"
|
||||||
@@ -13,6 +14,18 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type GdprResp struct {
|
||||||
|
ResponseData GdprData `json:"response_data"`
|
||||||
|
ReleaseInfo []interface{} `json:"release_info"`
|
||||||
|
StatusCode int `json:"status_code"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type GdprData struct {
|
||||||
|
EnableGdpr bool `json:"enable_gdpr"`
|
||||||
|
IsEea bool `json:"is_eea"`
|
||||||
|
ServerTimestamp int64 `json:"server_timestamp"`
|
||||||
|
}
|
||||||
|
|
||||||
func GdprHandler(ctx *gin.Context) {
|
func GdprHandler(ctx *gin.Context) {
|
||||||
reqTime := time.Now().Unix()
|
reqTime := time.Now().Unix()
|
||||||
|
|
||||||
@@ -45,13 +58,25 @@ func GdprHandler(ctx *gin.Context) {
|
|||||||
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
||||||
// fmt.Println(newAuthorizeStr)
|
// fmt.Println(newAuthorizeStr)
|
||||||
|
|
||||||
resp := utils.ReadAllText("assets/gdpr.json")
|
gdprResp := GdprResp{
|
||||||
xms := encrypt.RSA_Sign_SHA1([]byte(resp), "privatekey.pem")
|
ResponseData: GdprData{
|
||||||
|
EnableGdpr: true,
|
||||||
|
IsEea: false,
|
||||||
|
ServerTimestamp: time.Now().Unix(),
|
||||||
|
},
|
||||||
|
ReleaseInfo: []interface{}{},
|
||||||
|
StatusCode: 200,
|
||||||
|
}
|
||||||
|
resp, err := json.Marshal(gdprResp)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
xms := encrypt.RSA_Sign_SHA1(resp, "privatekey.pem")
|
||||||
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
||||||
|
|
||||||
ctx.Header("Server-Version", config.Conf.Server.VersionNumber)
|
ctx.Header("Server-Version", config.Conf.Server.VersionNumber)
|
||||||
ctx.Header("user_id", userId[0])
|
ctx.Header("user_id", userId[0])
|
||||||
ctx.Header("authorize", newAuthorizeStr)
|
ctx.Header("authorize", newAuthorizeStr)
|
||||||
ctx.Header("X-Message-Sign", xms64)
|
ctx.Header("X-Message-Sign", xms64)
|
||||||
ctx.String(http.StatusOK, resp)
|
ctx.String(http.StatusOK, string(resp))
|
||||||
}
|
}
|
||||||
|
|||||||
+20
-9
@@ -18,6 +18,12 @@ import (
|
|||||||
_ "github.com/mattn/go-sqlite3"
|
_ "github.com/mattn/go-sqlite3"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type GameOverResp struct {
|
||||||
|
ResponseData []interface{} `json:"response_data"`
|
||||||
|
ReleaseInfo []interface{} `json:"release_info"`
|
||||||
|
StatusCode int `json:"status_code"`
|
||||||
|
}
|
||||||
|
|
||||||
func PartyListHandler(ctx *gin.Context) {
|
func PartyListHandler(ctx *gin.Context) {
|
||||||
reqTime := time.Now().Unix()
|
reqTime := time.Now().Unix()
|
||||||
|
|
||||||
@@ -99,8 +105,7 @@ func PlayLiveHandler(ctx *gin.Context) {
|
|||||||
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
||||||
// fmt.Println(newAuthorizeStr)
|
// fmt.Println(newAuthorizeStr)
|
||||||
|
|
||||||
// resp := utils.ReadAllText("assets/playsong.json")
|
db, err := sql.Open("sqlite3", "assets/main.db")
|
||||||
db, err := sql.Open("sqlite3", "assets/live.db")
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
@@ -263,15 +268,23 @@ func GameOverHandler(ctx *gin.Context) {
|
|||||||
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
||||||
// fmt.Println(newAuthorizeStr)
|
// fmt.Println(newAuthorizeStr)
|
||||||
|
|
||||||
resp := utils.ReadAllText("assets/gameover.json")
|
overResp := GameOverResp{
|
||||||
xms := encrypt.RSA_Sign_SHA1([]byte(resp), "privatekey.pem")
|
ResponseData: []interface{}{},
|
||||||
|
ReleaseInfo: []interface{}{},
|
||||||
|
StatusCode: 200,
|
||||||
|
}
|
||||||
|
resp, err := json.Marshal(overResp)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
xms := encrypt.RSA_Sign_SHA1(resp, "privatekey.pem")
|
||||||
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
||||||
|
|
||||||
ctx.Header("Server-Version", config.Conf.Server.VersionNumber)
|
ctx.Header("Server-Version", config.Conf.Server.VersionNumber)
|
||||||
ctx.Header("user_id", userId[0])
|
ctx.Header("user_id", userId[0])
|
||||||
ctx.Header("authorize", newAuthorizeStr)
|
ctx.Header("authorize", newAuthorizeStr)
|
||||||
ctx.Header("X-Message-Sign", xms64)
|
ctx.Header("X-Message-Sign", xms64)
|
||||||
ctx.String(http.StatusOK, resp)
|
ctx.String(http.StatusOK, string(resp))
|
||||||
}
|
}
|
||||||
|
|
||||||
func PlayScoreHandler(ctx *gin.Context) {
|
func PlayScoreHandler(ctx *gin.Context) {
|
||||||
@@ -312,8 +325,7 @@ func PlayScoreHandler(ctx *gin.Context) {
|
|||||||
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
||||||
// fmt.Println(newAuthorizeStr)
|
// fmt.Println(newAuthorizeStr)
|
||||||
|
|
||||||
// resp := utils.ReadAllText("assets/playsong.json")
|
db, err := sql.Open("sqlite3", "assets/main.db")
|
||||||
db, err := sql.Open("sqlite3", "assets/live.db")
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
@@ -466,8 +478,7 @@ func PlayRewardHandler(ctx *gin.Context) {
|
|||||||
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
||||||
// fmt.Println(newAuthorizeStr)
|
// fmt.Println(newAuthorizeStr)
|
||||||
|
|
||||||
// resp := utils.ReadAllText("assets/playsong.json")
|
db, err := sql.Open("sqlite3", "assets/main.db")
|
||||||
db, err := sql.Open("sqlite3", "assets/live.db")
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|||||||
+51
-3
@@ -2,6 +2,7 @@ package handler
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"honoka-chan/config"
|
"honoka-chan/config"
|
||||||
"honoka-chan/database"
|
"honoka-chan/database"
|
||||||
@@ -13,6 +14,30 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type ProductResp struct {
|
||||||
|
ResponseData ProductData `json:"response_data"`
|
||||||
|
ReleaseInfo []interface{} `json:"release_info"`
|
||||||
|
StatusCode int `json:"status_code"`
|
||||||
|
}
|
||||||
|
type RestrictionInfo struct {
|
||||||
|
Restricted bool `json:"restricted"`
|
||||||
|
}
|
||||||
|
type UnderAgeInfo struct {
|
||||||
|
BirthSet bool `json:"birth_set"`
|
||||||
|
HasLimit bool `json:"has_limit"`
|
||||||
|
LimitAmount interface{} `json:"limit_amount"`
|
||||||
|
MonthUsed int `json:"month_used"`
|
||||||
|
}
|
||||||
|
type ProductData struct {
|
||||||
|
RestrictionInfo RestrictionInfo `json:"restriction_info"`
|
||||||
|
UnderAgeInfo UnderAgeInfo `json:"under_age_info"`
|
||||||
|
SnsProductList []interface{} `json:"sns_product_list"`
|
||||||
|
ProductList []interface{} `json:"product_list"`
|
||||||
|
SubscriptionList []interface{} `json:"subscription_list"`
|
||||||
|
ShowPointShop bool `json:"show_point_shop"`
|
||||||
|
ServerTimestamp int64 `json:"server_timestamp"`
|
||||||
|
}
|
||||||
|
|
||||||
func ProductListHandler(ctx *gin.Context) {
|
func ProductListHandler(ctx *gin.Context) {
|
||||||
reqTime := time.Now().Unix()
|
reqTime := time.Now().Unix()
|
||||||
|
|
||||||
@@ -45,13 +70,36 @@ func ProductListHandler(ctx *gin.Context) {
|
|||||||
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
||||||
// fmt.Println(newAuthorizeStr)
|
// fmt.Println(newAuthorizeStr)
|
||||||
|
|
||||||
resp := utils.ReadAllText("assets/products.json")
|
prodReesp := ProductResp{
|
||||||
xms := encrypt.RSA_Sign_SHA1([]byte(resp), "privatekey.pem")
|
ResponseData: ProductData{
|
||||||
|
RestrictionInfo: RestrictionInfo{
|
||||||
|
Restricted: false,
|
||||||
|
},
|
||||||
|
UnderAgeInfo: UnderAgeInfo{
|
||||||
|
BirthSet: true,
|
||||||
|
HasLimit: false,
|
||||||
|
LimitAmount: nil,
|
||||||
|
MonthUsed: 0,
|
||||||
|
},
|
||||||
|
SnsProductList: []interface{}{},
|
||||||
|
ProductList: []interface{}{},
|
||||||
|
SubscriptionList: []interface{}{},
|
||||||
|
ShowPointShop: true,
|
||||||
|
ServerTimestamp: time.Now().Unix(),
|
||||||
|
},
|
||||||
|
ReleaseInfo: []interface{}{},
|
||||||
|
StatusCode: 200,
|
||||||
|
}
|
||||||
|
resp, err := json.Marshal(prodReesp)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
xms := encrypt.RSA_Sign_SHA1(resp, "privatekey.pem")
|
||||||
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
||||||
|
|
||||||
ctx.Header("Server-Version", config.Conf.Server.VersionNumber)
|
ctx.Header("Server-Version", config.Conf.Server.VersionNumber)
|
||||||
ctx.Header("user_id", userId[0])
|
ctx.Header("user_id", userId[0])
|
||||||
ctx.Header("authorize", newAuthorizeStr)
|
ctx.Header("authorize", newAuthorizeStr)
|
||||||
ctx.Header("X-Message-Sign", xms64)
|
ctx.Header("X-Message-Sign", xms64)
|
||||||
ctx.String(http.StatusOK, resp)
|
ctx.String(http.StatusOK, string(resp))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package handler
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"honoka-chan/config"
|
"honoka-chan/config"
|
||||||
"honoka-chan/database"
|
"honoka-chan/database"
|
||||||
@@ -13,6 +14,21 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type PersonalNoticeResp struct {
|
||||||
|
ResponseData PersonalNoticeData `json:"response_data"`
|
||||||
|
ReleaseInfo []interface{} `json:"release_info"`
|
||||||
|
StatusCode int `json:"status_code"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type PersonalNoticeData struct {
|
||||||
|
HasNotice bool `json:"has_notice"`
|
||||||
|
NoticeID int `json:"notice_id"`
|
||||||
|
Type int `json:"type"`
|
||||||
|
Title string `json:"title"`
|
||||||
|
Contents string `json:"contents"`
|
||||||
|
ServerTimestamp int64 `json:"server_timestamp"`
|
||||||
|
}
|
||||||
|
|
||||||
func PersonalNoticeHandler(ctx *gin.Context) {
|
func PersonalNoticeHandler(ctx *gin.Context) {
|
||||||
reqTime := time.Now().Unix()
|
reqTime := time.Now().Unix()
|
||||||
|
|
||||||
@@ -45,13 +61,28 @@ func PersonalNoticeHandler(ctx *gin.Context) {
|
|||||||
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
||||||
// fmt.Println(newAuthorizeStr)
|
// fmt.Println(newAuthorizeStr)
|
||||||
|
|
||||||
resp := utils.ReadAllText("assets/personalnotice.json")
|
noticeResp := PersonalNoticeResp{
|
||||||
xms := encrypt.RSA_Sign_SHA1([]byte(resp), "privatekey.pem")
|
ResponseData: PersonalNoticeData{
|
||||||
|
HasNotice: false,
|
||||||
|
NoticeID: 0,
|
||||||
|
Type: 0,
|
||||||
|
Title: "",
|
||||||
|
Contents: "",
|
||||||
|
ServerTimestamp: time.Now().Unix(),
|
||||||
|
},
|
||||||
|
ReleaseInfo: []interface{}{},
|
||||||
|
StatusCode: 200,
|
||||||
|
}
|
||||||
|
resp, err := json.Marshal(noticeResp)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
xms := encrypt.RSA_Sign_SHA1(resp, "privatekey.pem")
|
||||||
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
||||||
|
|
||||||
ctx.Header("Server-Version", config.Conf.Server.VersionNumber)
|
ctx.Header("Server-Version", config.Conf.Server.VersionNumber)
|
||||||
ctx.Header("user_id", userId[0])
|
ctx.Header("user_id", userId[0])
|
||||||
ctx.Header("authorize", newAuthorizeStr)
|
ctx.Header("authorize", newAuthorizeStr)
|
||||||
ctx.Header("X-Message-Sign", xms64)
|
ctx.Header("X-Message-Sign", xms64)
|
||||||
ctx.String(http.StatusOK, resp)
|
ctx.String(http.StatusOK, string(resp))
|
||||||
}
|
}
|
||||||
|
|||||||
+43
-3
@@ -2,11 +2,11 @@ package handler
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"honoka-chan/config"
|
"honoka-chan/config"
|
||||||
"honoka-chan/database"
|
"honoka-chan/database"
|
||||||
"honoka-chan/encrypt"
|
"honoka-chan/encrypt"
|
||||||
"honoka-chan/resp"
|
|
||||||
"honoka-chan/utils"
|
"honoka-chan/utils"
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
@@ -14,9 +14,36 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type ScenarioResp struct {
|
||||||
|
ResponseData ScenarioData `json:"response_data"`
|
||||||
|
ReleaseInfo []interface{} `json:"release_info"`
|
||||||
|
StatusCode int `json:"status_code"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type ScenarioData struct {
|
||||||
|
ScenarioID int `json:"scenario_id"`
|
||||||
|
ScenarioAdjustment int `json:"scenario_adjustment"`
|
||||||
|
ServerTimestamp int64 `json:"server_timestamp"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type ScenarioReq struct {
|
||||||
|
Module string `json:"module"`
|
||||||
|
Action string `json:"action"`
|
||||||
|
TimeStamp int `json:"timeStamp"`
|
||||||
|
Mgd int `json:"mgd"`
|
||||||
|
CommandNum string `json:"commandNum"`
|
||||||
|
ScenarioID int `json:"scenario_id"`
|
||||||
|
}
|
||||||
|
|
||||||
func ScenarioStartupHandler(ctx *gin.Context) {
|
func ScenarioStartupHandler(ctx *gin.Context) {
|
||||||
reqTime := time.Now().Unix()
|
reqTime := time.Now().Unix()
|
||||||
|
|
||||||
|
startReq := ScenarioReq{}
|
||||||
|
err := json.Unmarshal([]byte(ctx.PostForm("request_data")), &startReq)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
authorizeStr := ctx.Request.Header["Authorize"]
|
authorizeStr := ctx.Request.Header["Authorize"]
|
||||||
authToken, err := utils.GetAuthorizeToken(authorizeStr)
|
authToken, err := utils.GetAuthorizeToken(authorizeStr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -46,7 +73,20 @@ func ScenarioStartupHandler(ctx *gin.Context) {
|
|||||||
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
||||||
// fmt.Println(newAuthorizeStr)
|
// fmt.Println(newAuthorizeStr)
|
||||||
|
|
||||||
xms := encrypt.RSA_Sign_SHA1([]byte(resp.ScenarioStartup), "privatekey.pem")
|
startResp := ScenarioResp{
|
||||||
|
ResponseData: ScenarioData{
|
||||||
|
ScenarioID: startReq.ScenarioID,
|
||||||
|
ScenarioAdjustment: 50,
|
||||||
|
ServerTimestamp: time.Now().Unix(),
|
||||||
|
},
|
||||||
|
ReleaseInfo: []interface{}{},
|
||||||
|
StatusCode: 200,
|
||||||
|
}
|
||||||
|
resp, err := json.Marshal(startResp)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
xms := encrypt.RSA_Sign_SHA1(resp, "privatekey.pem")
|
||||||
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
||||||
|
|
||||||
ctx.Header("Server-Version", config.Conf.Server.VersionNumber)
|
ctx.Header("Server-Version", config.Conf.Server.VersionNumber)
|
||||||
@@ -54,7 +94,7 @@ func ScenarioStartupHandler(ctx *gin.Context) {
|
|||||||
ctx.Header("authorize", newAuthorizeStr)
|
ctx.Header("authorize", newAuthorizeStr)
|
||||||
ctx.Header("X-Message-Sign", xms64)
|
ctx.Header("X-Message-Sign", xms64)
|
||||||
|
|
||||||
ctx.String(http.StatusOK, resp.ScenarioStartup)
|
ctx.String(http.StatusOK, string(resp))
|
||||||
}
|
}
|
||||||
|
|
||||||
func ScenarioRewardHandler(ctx *gin.Context) {
|
func ScenarioRewardHandler(ctx *gin.Context) {
|
||||||
|
|||||||
+43
-3
@@ -2,11 +2,11 @@ package handler
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"honoka-chan/config"
|
"honoka-chan/config"
|
||||||
"honoka-chan/database"
|
"honoka-chan/database"
|
||||||
"honoka-chan/encrypt"
|
"honoka-chan/encrypt"
|
||||||
"honoka-chan/resp"
|
|
||||||
"honoka-chan/utils"
|
"honoka-chan/utils"
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
@@ -14,9 +14,36 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type SubScenarioResp struct {
|
||||||
|
ResponseData SubScenarioData `json:"response_data"`
|
||||||
|
ReleaseInfo []interface{} `json:"release_info"`
|
||||||
|
StatusCode int `json:"status_code"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type SubScenarioData struct {
|
||||||
|
SubscenarioID int `json:"subscenario_id"`
|
||||||
|
ScenarioAdjustment int `json:"scenario_adjustment"`
|
||||||
|
ServerTimestamp int64 `json:"server_timestamp"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type SubScenarioReq struct {
|
||||||
|
Module string `json:"module"`
|
||||||
|
Action string `json:"action"`
|
||||||
|
TimeStamp int `json:"timeStamp"`
|
||||||
|
SubscenarioID int `json:"subscenario_id"`
|
||||||
|
Mgd int `json:"mgd"`
|
||||||
|
CommandNum string `json:"commandNum"`
|
||||||
|
}
|
||||||
|
|
||||||
func SubScenarioStartupHandler(ctx *gin.Context) {
|
func SubScenarioStartupHandler(ctx *gin.Context) {
|
||||||
reqTime := time.Now().Unix()
|
reqTime := time.Now().Unix()
|
||||||
|
|
||||||
|
startReq := SubScenarioReq{}
|
||||||
|
err := json.Unmarshal([]byte(ctx.PostForm("request_data")), &startReq)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
authorizeStr := ctx.Request.Header["Authorize"]
|
authorizeStr := ctx.Request.Header["Authorize"]
|
||||||
authToken, err := utils.GetAuthorizeToken(authorizeStr)
|
authToken, err := utils.GetAuthorizeToken(authorizeStr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -46,7 +73,20 @@ func SubScenarioStartupHandler(ctx *gin.Context) {
|
|||||||
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
||||||
// fmt.Println(newAuthorizeStr)
|
// fmt.Println(newAuthorizeStr)
|
||||||
|
|
||||||
xms := encrypt.RSA_Sign_SHA1([]byte(resp.ScenarioStartup), "privatekey.pem")
|
startResp := SubScenarioResp{
|
||||||
|
ResponseData: SubScenarioData{
|
||||||
|
SubscenarioID: startReq.SubscenarioID,
|
||||||
|
ScenarioAdjustment: 50,
|
||||||
|
ServerTimestamp: time.Now().Unix(),
|
||||||
|
},
|
||||||
|
ReleaseInfo: []interface{}{},
|
||||||
|
StatusCode: 200,
|
||||||
|
}
|
||||||
|
resp, err := json.Marshal(startResp)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
xms := encrypt.RSA_Sign_SHA1(resp, "privatekey.pem")
|
||||||
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
||||||
|
|
||||||
ctx.Header("Server-Version", config.Conf.Server.VersionNumber)
|
ctx.Header("Server-Version", config.Conf.Server.VersionNumber)
|
||||||
@@ -54,7 +94,7 @@ func SubScenarioStartupHandler(ctx *gin.Context) {
|
|||||||
ctx.Header("authorize", newAuthorizeStr)
|
ctx.Header("authorize", newAuthorizeStr)
|
||||||
ctx.Header("X-Message-Sign", xms64)
|
ctx.Header("X-Message-Sign", xms64)
|
||||||
|
|
||||||
ctx.String(http.StatusOK, resp.SubScenarioStartup)
|
ctx.String(http.StatusOK, string(resp))
|
||||||
}
|
}
|
||||||
|
|
||||||
func SubScenarioRewardHandler(ctx *gin.Context) {
|
func SubScenarioRewardHandler(ctx *gin.Context) {
|
||||||
|
|||||||
+30
-3
@@ -2,6 +2,7 @@ package handler
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"honoka-chan/database"
|
"honoka-chan/database"
|
||||||
"honoka-chan/encrypt"
|
"honoka-chan/encrypt"
|
||||||
@@ -12,6 +13,19 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type TosResp struct {
|
||||||
|
ResponseData TosData `json:"response_data"`
|
||||||
|
ReleaseInfo []interface{} `json:"release_info"`
|
||||||
|
StatusCode int `json:"status_code"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type TosData struct {
|
||||||
|
TosID int `json:"tos_id"`
|
||||||
|
TosType int `json:"tos_type"`
|
||||||
|
IsAgreed bool `json:"is_agreed"`
|
||||||
|
ServerTimestamp int64 `json:"server_timestamp"`
|
||||||
|
}
|
||||||
|
|
||||||
func TosCheckHandler(ctx *gin.Context) {
|
func TosCheckHandler(ctx *gin.Context) {
|
||||||
reqTime := time.Now().Unix()
|
reqTime := time.Now().Unix()
|
||||||
|
|
||||||
@@ -44,12 +58,25 @@ func TosCheckHandler(ctx *gin.Context) {
|
|||||||
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
||||||
// fmt.Println(newAuthorizeStr)
|
// fmt.Println(newAuthorizeStr)
|
||||||
|
|
||||||
resp := utils.ReadAllText("assets/toscheck.json")
|
tosResp := TosResp{
|
||||||
xms := encrypt.RSA_Sign_SHA1([]byte(resp), "privatekey.pem")
|
ResponseData: TosData{
|
||||||
|
TosID: 1,
|
||||||
|
TosType: 1,
|
||||||
|
IsAgreed: true,
|
||||||
|
ServerTimestamp: time.Now().Unix(),
|
||||||
|
},
|
||||||
|
ReleaseInfo: []interface{}{},
|
||||||
|
StatusCode: 200,
|
||||||
|
}
|
||||||
|
resp, err := json.Marshal(tosResp)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
xms := encrypt.RSA_Sign_SHA1(resp, "privatekey.pem")
|
||||||
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
||||||
|
|
||||||
ctx.Header("user_id", userId[0])
|
ctx.Header("user_id", userId[0])
|
||||||
ctx.Header("authorize", newAuthorizeStr)
|
ctx.Header("authorize", newAuthorizeStr)
|
||||||
ctx.Header("X-Message-Sign", xms64)
|
ctx.Header("X-Message-Sign", xms64)
|
||||||
ctx.String(http.StatusOK, resp)
|
ctx.String(http.StatusOK, string(resp))
|
||||||
}
|
}
|
||||||
|
|||||||
+18
-4
@@ -2,11 +2,11 @@ package handler
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"honoka-chan/config"
|
"honoka-chan/config"
|
||||||
"honoka-chan/database"
|
"honoka-chan/database"
|
||||||
"honoka-chan/encrypt"
|
"honoka-chan/encrypt"
|
||||||
"honoka-chan/resp"
|
|
||||||
"honoka-chan/utils"
|
"honoka-chan/utils"
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
@@ -14,6 +14,12 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type SetDisplayRankResp struct {
|
||||||
|
ResponseData []interface{} `json:"response_data"`
|
||||||
|
ReleaseInfo []interface{} `json:"release_info"`
|
||||||
|
StatusCode int `json:"status_code"`
|
||||||
|
}
|
||||||
|
|
||||||
func SetDisplayRankHandler(ctx *gin.Context) {
|
func SetDisplayRankHandler(ctx *gin.Context) {
|
||||||
reqTime := time.Now().Unix()
|
reqTime := time.Now().Unix()
|
||||||
|
|
||||||
@@ -46,13 +52,21 @@ func SetDisplayRankHandler(ctx *gin.Context) {
|
|||||||
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
||||||
// fmt.Println(newAuthorizeStr)
|
// fmt.Println(newAuthorizeStr)
|
||||||
|
|
||||||
resp := resp.NotificationToken
|
dispResp := SetDisplayRankResp{
|
||||||
xms := encrypt.RSA_Sign_SHA1([]byte(resp), "privatekey.pem")
|
ResponseData: []interface{}{},
|
||||||
|
ReleaseInfo: []interface{}{},
|
||||||
|
StatusCode: 200,
|
||||||
|
}
|
||||||
|
resp, err := json.Marshal(dispResp)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
xms := encrypt.RSA_Sign_SHA1(resp, "privatekey.pem")
|
||||||
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
||||||
|
|
||||||
ctx.Header("Server-Version", config.Conf.Server.VersionNumber)
|
ctx.Header("Server-Version", config.Conf.Server.VersionNumber)
|
||||||
ctx.Header("user_id", userId[0])
|
ctx.Header("user_id", userId[0])
|
||||||
ctx.Header("authorize", newAuthorizeStr)
|
ctx.Header("authorize", newAuthorizeStr)
|
||||||
ctx.Header("X-Message-Sign", xms64)
|
ctx.Header("X-Message-Sign", xms64)
|
||||||
ctx.String(http.StatusOK, resp)
|
ctx.String(http.StatusOK, string(resp))
|
||||||
}
|
}
|
||||||
|
|||||||
+29
-5
@@ -2,11 +2,11 @@ package handler
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"honoka-chan/config"
|
"honoka-chan/config"
|
||||||
"honoka-chan/database"
|
"honoka-chan/database"
|
||||||
"honoka-chan/encrypt"
|
"honoka-chan/encrypt"
|
||||||
"honoka-chan/resp"
|
|
||||||
"honoka-chan/utils"
|
"honoka-chan/utils"
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
@@ -14,6 +14,12 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type NotificationResp struct {
|
||||||
|
ResponseData []interface{} `json:"response_data"`
|
||||||
|
ReleaseInfo []interface{} `json:"release_info"`
|
||||||
|
StatusCode int `json:"status_code"`
|
||||||
|
}
|
||||||
|
|
||||||
func SetNotificationTokenHandler(ctx *gin.Context) {
|
func SetNotificationTokenHandler(ctx *gin.Context) {
|
||||||
reqTime := time.Now().Unix()
|
reqTime := time.Now().Unix()
|
||||||
|
|
||||||
@@ -46,14 +52,23 @@ func SetNotificationTokenHandler(ctx *gin.Context) {
|
|||||||
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
||||||
// fmt.Println(newAuthorizeStr)
|
// fmt.Println(newAuthorizeStr)
|
||||||
|
|
||||||
xms := encrypt.RSA_Sign_SHA1([]byte(resp.NotificationToken), "privatekey.pem")
|
notifResp := NotificationResp{
|
||||||
|
ResponseData: []interface{}{},
|
||||||
|
ReleaseInfo: []interface{}{},
|
||||||
|
StatusCode: 200,
|
||||||
|
}
|
||||||
|
resp, err := json.Marshal(notifResp)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
xms := encrypt.RSA_Sign_SHA1(resp, "privatekey.pem")
|
||||||
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
||||||
|
|
||||||
ctx.Header("Server-Version", config.Conf.Server.VersionNumber)
|
ctx.Header("Server-Version", config.Conf.Server.VersionNumber)
|
||||||
ctx.Header("user_id", userId[0])
|
ctx.Header("user_id", userId[0])
|
||||||
ctx.Header("authorize", newAuthorizeStr)
|
ctx.Header("authorize", newAuthorizeStr)
|
||||||
ctx.Header("X-Message-Sign", xms64)
|
ctx.Header("X-Message-Sign", xms64)
|
||||||
ctx.String(http.StatusOK, resp.NotificationToken)
|
ctx.String(http.StatusOK, string(resp))
|
||||||
}
|
}
|
||||||
|
|
||||||
func ChangeNaviHandler(ctx *gin.Context) {
|
func ChangeNaviHandler(ctx *gin.Context) {
|
||||||
@@ -88,12 +103,21 @@ func ChangeNaviHandler(ctx *gin.Context) {
|
|||||||
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
||||||
// fmt.Println(newAuthorizeStr)
|
// fmt.Println(newAuthorizeStr)
|
||||||
|
|
||||||
xms := encrypt.RSA_Sign_SHA1([]byte(resp.NotificationToken), "privatekey.pem")
|
notifResp := NotificationResp{
|
||||||
|
ResponseData: []interface{}{},
|
||||||
|
ReleaseInfo: []interface{}{},
|
||||||
|
StatusCode: 200,
|
||||||
|
}
|
||||||
|
resp, err := json.Marshal(notifResp)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
xms := encrypt.RSA_Sign_SHA1(resp, "privatekey.pem")
|
||||||
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
||||||
|
|
||||||
ctx.Header("Server-Version", config.Conf.Server.VersionNumber)
|
ctx.Header("Server-Version", config.Conf.Server.VersionNumber)
|
||||||
ctx.Header("user_id", userId[0])
|
ctx.Header("user_id", userId[0])
|
||||||
ctx.Header("authorize", newAuthorizeStr)
|
ctx.Header("authorize", newAuthorizeStr)
|
||||||
ctx.Header("X-Message-Sign", xms64)
|
ctx.Header("X-Message-Sign", xms64)
|
||||||
ctx.String(http.StatusOK, resp.NotificationToken)
|
ctx.String(http.StatusOK, string(resp))
|
||||||
}
|
}
|
||||||
|
|||||||
+101
-3
@@ -2,6 +2,7 @@ package handler
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"honoka-chan/config"
|
"honoka-chan/config"
|
||||||
"honoka-chan/database"
|
"honoka-chan/database"
|
||||||
@@ -13,6 +14,59 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type UserInfoResp struct {
|
||||||
|
ResponseData UserInfoData `json:"response_data"`
|
||||||
|
ReleaseInfo []interface{} `json:"release_info"`
|
||||||
|
StatusCode int `json:"status_code"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type LpRecoveryItem struct {
|
||||||
|
ItemID int `json:"item_id"`
|
||||||
|
Amount int `json:"amount"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type User struct {
|
||||||
|
UserID int `json:"user_id"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
Level int `json:"level"`
|
||||||
|
Exp int `json:"exp"`
|
||||||
|
PreviousExp int `json:"previous_exp"`
|
||||||
|
NextExp int `json:"next_exp"`
|
||||||
|
GameCoin int `json:"game_coin"`
|
||||||
|
SnsCoin int `json:"sns_coin"`
|
||||||
|
FreeSnsCoin int `json:"free_sns_coin"`
|
||||||
|
PaidSnsCoin int `json:"paid_sns_coin"`
|
||||||
|
SocialPoint int `json:"social_point"`
|
||||||
|
UnitMax int `json:"unit_max"`
|
||||||
|
WaitingUnitMax int `json:"waiting_unit_max"`
|
||||||
|
EnergyMax int `json:"energy_max"`
|
||||||
|
EnergyFullTime string `json:"energy_full_time"`
|
||||||
|
LicenseLiveEnergyRecoverlyTime int `json:"license_live_energy_recoverly_time"`
|
||||||
|
EnergyFullNeedTime int `json:"energy_full_need_time"`
|
||||||
|
OverMaxEnergy int `json:"over_max_energy"`
|
||||||
|
TrainingEnergy int `json:"training_energy"`
|
||||||
|
TrainingEnergyMax int `json:"training_energy_max"`
|
||||||
|
FriendMax int `json:"friend_max"`
|
||||||
|
InviteCode string `json:"invite_code"`
|
||||||
|
InsertDate string `json:"insert_date"`
|
||||||
|
UpdateDate string `json:"update_date"`
|
||||||
|
TutorialState int `json:"tutorial_state"`
|
||||||
|
DiamondCoin int `json:"diamond_coin"`
|
||||||
|
CrystalCoin int `json:"crystal_coin"`
|
||||||
|
LpRecoveryItem []LpRecoveryItem `json:"lp_recovery_item"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Birth struct {
|
||||||
|
BirthMonth int `json:"birth_month"`
|
||||||
|
BirthDay int `json:"birth_day"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type UserInfoData struct {
|
||||||
|
User User `json:"user"`
|
||||||
|
Birth Birth `json:"birth"`
|
||||||
|
ServerTimestamp int64 `json:"server_timestamp"`
|
||||||
|
}
|
||||||
|
|
||||||
func UserInfoHandler(ctx *gin.Context) {
|
func UserInfoHandler(ctx *gin.Context) {
|
||||||
reqTime := time.Now().Unix()
|
reqTime := time.Now().Unix()
|
||||||
|
|
||||||
@@ -45,13 +99,57 @@ func UserInfoHandler(ctx *gin.Context) {
|
|||||||
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
newAuthorizeStr := fmt.Sprintf("consumerKey=lovelive_test&timeStamp=%d&version=1.1&token=%s&nonce=%d&user_id=%s&requestTimeStamp=%d", respTime, authToken, nonce, userId[0], reqTime)
|
||||||
// fmt.Println(newAuthorizeStr)
|
// fmt.Println(newAuthorizeStr)
|
||||||
|
|
||||||
resp := utils.ReadAllText("assets/userinfo.json")
|
userResp := UserInfoResp{
|
||||||
xms := encrypt.RSA_Sign_SHA1([]byte(resp), "privatekey.pem")
|
ResponseData: UserInfoData{
|
||||||
|
User: User{
|
||||||
|
UserID: 9999999,
|
||||||
|
Name: "\u68a6\u8def @\u65c5\u7acb\u3061\u306e\u65e5\u306b",
|
||||||
|
Level: 1028,
|
||||||
|
Exp: 28824396,
|
||||||
|
PreviousExp: 27734700,
|
||||||
|
NextExp: 28941885,
|
||||||
|
GameCoin: 112124104,
|
||||||
|
SnsCoin: 0,
|
||||||
|
FreeSnsCoin: 0,
|
||||||
|
PaidSnsCoin: 0,
|
||||||
|
SocialPoint: 1438395,
|
||||||
|
UnitMax: 5000,
|
||||||
|
WaitingUnitMax: 1000,
|
||||||
|
EnergyMax: 417,
|
||||||
|
EnergyFullTime: "2023-03-20 03:58:55",
|
||||||
|
LicenseLiveEnergyRecoverlyTime: 60,
|
||||||
|
EnergyFullNeedTime: 0,
|
||||||
|
OverMaxEnergy: 0,
|
||||||
|
TrainingEnergy: 100,
|
||||||
|
TrainingEnergyMax: 100,
|
||||||
|
FriendMax: 99,
|
||||||
|
InviteCode: "377385143",
|
||||||
|
InsertDate: "2015-08-10 18:58:30",
|
||||||
|
UpdateDate: "2018-08-09 18:13:12",
|
||||||
|
TutorialState: -1,
|
||||||
|
DiamondCoin: 0,
|
||||||
|
CrystalCoin: 0,
|
||||||
|
LpRecoveryItem: []LpRecoveryItem{},
|
||||||
|
},
|
||||||
|
Birth: Birth{
|
||||||
|
BirthMonth: 10,
|
||||||
|
BirthDay: 18,
|
||||||
|
},
|
||||||
|
ServerTimestamp: time.Now().Unix(),
|
||||||
|
},
|
||||||
|
ReleaseInfo: []interface{}{},
|
||||||
|
StatusCode: 200,
|
||||||
|
}
|
||||||
|
resp, err := json.Marshal(userResp)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
xms := encrypt.RSA_Sign_SHA1(resp, "privatekey.pem")
|
||||||
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
xms64 := base64.RawStdEncoding.EncodeToString(xms)
|
||||||
|
|
||||||
ctx.Header("Server-Version", config.Conf.Server.VersionNumber)
|
ctx.Header("Server-Version", config.Conf.Server.VersionNumber)
|
||||||
ctx.Header("user_id", userId[0])
|
ctx.Header("user_id", userId[0])
|
||||||
ctx.Header("authorize", newAuthorizeStr)
|
ctx.Header("authorize", newAuthorizeStr)
|
||||||
ctx.Header("X-Message-Sign", xms64)
|
ctx.Header("X-Message-Sign", xms64)
|
||||||
ctx.String(http.StatusOK, resp)
|
ctx.String(http.StatusOK, string(resp))
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-4
@@ -1,7 +1,7 @@
|
|||||||
package model
|
package model
|
||||||
|
|
||||||
// module: album, action: albumAll
|
// module: album, action: albumAll
|
||||||
type AlbumUnitList struct {
|
type AlbumResult struct {
|
||||||
UnitID int `json:"unit_id"`
|
UnitID int `json:"unit_id"`
|
||||||
RankMaxFlag bool `json:"rank_max_flag"`
|
RankMaxFlag bool `json:"rank_max_flag"`
|
||||||
LoveMaxFlag bool `json:"love_max_flag"`
|
LoveMaxFlag bool `json:"love_max_flag"`
|
||||||
@@ -13,7 +13,15 @@ type AlbumUnitList struct {
|
|||||||
SignFlag bool `json:"sign_flag"`
|
SignFlag bool `json:"sign_flag"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type AlbumResponseData struct {
|
type AlbumResp struct {
|
||||||
SeriesID int `json:"series_id"`
|
Result []AlbumResult `json:"result"`
|
||||||
UnitList []AlbumUnitList `json:"unit_list"`
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// albumSeries
|
||||||
|
type AlbumSeriesResp struct {
|
||||||
|
SeriesID int `json:"series_id"`
|
||||||
|
UnitList []AlbumResult `json:"unit_list"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,3 +18,10 @@ type BannerListResult struct {
|
|||||||
TimeLimit string `json:"time_limit"`
|
TimeLimit string `json:"time_limit"`
|
||||||
BannerList []BannerList `json:"banner_list"`
|
BannerList []BannerList `json:"banner_list"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type BannerListResp struct {
|
||||||
|
Result BannerListResult `json:"result"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
|
}
|
||||||
|
|||||||
@@ -10,3 +10,10 @@ type CostumeList struct {
|
|||||||
type CostumeListResult struct {
|
type CostumeListResult struct {
|
||||||
CostumeList []CostumeList `json:"costume_list"`
|
CostumeList []CostumeList `json:"costume_list"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type CostumeListResp struct {
|
||||||
|
Result CostumeListResult `json:"result"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
|
}
|
||||||
|
|||||||
@@ -19,3 +19,10 @@ type MultiUnitScenarioStatusResult struct {
|
|||||||
MultiUnitScenarioStatusList []MultiUnitScenarioStatusList `json:"multi_unit_scenario_status_list"`
|
MultiUnitScenarioStatusList []MultiUnitScenarioStatusList `json:"multi_unit_scenario_status_list"`
|
||||||
UnlockedMultiUnitScenarioIds []interface{} `json:"unlocked_multi_unit_scenario_ids"`
|
UnlockedMultiUnitScenarioIds []interface{} `json:"unlocked_multi_unit_scenario_ids"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type MultiUnitScenarioStatusResp struct {
|
||||||
|
Result MultiUnitScenarioStatusResult `json:"result"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
|
}
|
||||||
|
|||||||
+105
-3
@@ -6,21 +6,42 @@ type NoticeMarqueeResult struct {
|
|||||||
MarqueeList []interface{} `json:"marquee_list"`
|
MarqueeList []interface{} `json:"marquee_list"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type NoticeMarqueeResp struct {
|
||||||
|
Result NoticeMarqueeResult `json:"result"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
|
}
|
||||||
|
|
||||||
// module: user, action: getNavi
|
// module: user, action: getNavi
|
||||||
type User struct {
|
type User struct {
|
||||||
UserID int `json:"user_id"`
|
UserID int `json:"user_id"`
|
||||||
UnitOwningUserID int64 `json:"unit_owning_user_id"`
|
UnitOwningUserID int `json:"unit_owning_user_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type UserNaviResult struct {
|
type UserNaviResult struct {
|
||||||
User User `json:"user"`
|
User User `json:"user"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type UserNaviResp struct {
|
||||||
|
Result UserNaviResult `json:"result"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
|
}
|
||||||
|
|
||||||
// module: navigation, action: specialCutin
|
// module: navigation, action: specialCutin
|
||||||
type SpecialCutinResult struct {
|
type SpecialCutinResult struct {
|
||||||
SpecialCutinList []interface{} `json:"special_cutin_list"`
|
SpecialCutinList []interface{} `json:"special_cutin_list"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SpecialCutinResp struct {
|
||||||
|
Result SpecialCutinResult `json:"result"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
|
}
|
||||||
|
|
||||||
// module: award, action: awardInfo
|
// module: award, action: awardInfo
|
||||||
type AwardInfo struct {
|
type AwardInfo struct {
|
||||||
AwardID int `json:"award_id"`
|
AwardID int `json:"award_id"`
|
||||||
@@ -32,6 +53,13 @@ type AwardInfoResult struct {
|
|||||||
AwardInfo []AwardInfo `json:"award_info"`
|
AwardInfo []AwardInfo `json:"award_info"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type AwardInfoResp struct {
|
||||||
|
Result AwardInfoResult `json:"result"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
|
}
|
||||||
|
|
||||||
// module: background, action: backgroundInfo
|
// module: background, action: backgroundInfo
|
||||||
type BackgroundInfo struct {
|
type BackgroundInfo struct {
|
||||||
BackgroundID int `json:"background_id"`
|
BackgroundID int `json:"background_id"`
|
||||||
@@ -43,28 +71,102 @@ type BackgroundInfoResult struct {
|
|||||||
BackgroundInfo []BackgroundInfo `json:"background_info"`
|
BackgroundInfo []BackgroundInfo `json:"background_info"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type BackgroundInfoResp struct {
|
||||||
|
Result BackgroundInfoResult `json:"result"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
|
}
|
||||||
|
|
||||||
// module: exchange, action: owningPoint
|
// module: exchange, action: owningPoint
|
||||||
type ExchangePointList struct {
|
type ExchangePointList struct {
|
||||||
Rarity int `json:"rarity"`
|
Rarity int `json:"rarity"`
|
||||||
ExchangePoint int `json:"exchange_point"`
|
ExchangePoint int `json:"exchange_point"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type OwningPointResult struct {
|
type ExchangePointResult struct {
|
||||||
ExchangePointList []ExchangePointList `json:"exchange_point_list"`
|
ExchangePointList []ExchangePointList `json:"exchange_point_list"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ExchangePointResp struct {
|
||||||
|
Result ExchangePointResult `json:"result"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
|
}
|
||||||
|
|
||||||
// module: livese, action: liveseInfo
|
// module: livese, action: liveseInfo
|
||||||
type LiveSeInfoResult struct {
|
type LiveSeInfoResult struct {
|
||||||
LiveSeList []int `json:"live_se_list"`
|
LiveSeList []int `json:"live_se_list"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type LiveSeInfoResp struct {
|
||||||
|
Result LiveSeInfoResult `json:"result"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
|
}
|
||||||
|
|
||||||
// module: liveicon, action: liveiconInfo
|
// module: liveicon, action: liveiconInfo
|
||||||
type LiveIconInfoResult struct {
|
type LiveIconInfoResult struct {
|
||||||
LiveNotesIconList []int `json:"live_notes_icon_list"`
|
LiveNotesIconList []int `json:"live_notes_icon_list"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type LiveIconInfoResp struct {
|
||||||
|
Result LiveIconInfoResult `json:"result"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
|
}
|
||||||
|
|
||||||
// module: item, action: list
|
// module: item, action: list
|
||||||
|
type GeneralItemList struct {
|
||||||
|
ItemID int `json:"item_id"`
|
||||||
|
Amount int `json:"amount"`
|
||||||
|
UseButtonFlag bool `json:"use_button_flag"`
|
||||||
|
GeneralItemType int `json:"general_item_type"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type BuffItemList struct {
|
||||||
|
ItemID int `json:"item_id"`
|
||||||
|
Amount int `json:"amount"`
|
||||||
|
BuffType int `json:"buff_type"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type ReinforceItemList struct {
|
||||||
|
ItemID int `json:"item_id"`
|
||||||
|
ReinforceType int `json:"reinforce_type"`
|
||||||
|
AdditionValue int `json:"addition_value"`
|
||||||
|
Amount int `json:"amount"`
|
||||||
|
EventID int `json:"event_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type ItemResult struct {
|
||||||
|
GeneralItemList []GeneralItemList `json:"general_item_list"`
|
||||||
|
BuffItemList []BuffItemList `json:"buff_item_list"`
|
||||||
|
ReinforceItemList []ReinforceItemList `json:"reinforce_item_list"`
|
||||||
|
ReinforceInfo interface{} `json:"reinforce_info"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type ItemResp struct {
|
||||||
|
Result ItemResult `json:"result"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
|
}
|
||||||
|
|
||||||
// module: marathon, action: marathonInfo
|
// module: marathon, action: marathonInfo
|
||||||
|
type MarathonInfoResp struct {
|
||||||
|
Result []interface{} `json:"result"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
|
}
|
||||||
|
|
||||||
// module: challenge, action: challengeInfo
|
// module: challenge, action: challengeInfo
|
||||||
|
type ChallengeInfoResp struct {
|
||||||
|
Result []interface{} `json:"result"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
|
}
|
||||||
|
|||||||
@@ -112,3 +112,10 @@ type ProductListResult struct {
|
|||||||
SubscriptionList []SubscriptionList `json:"subscription_list"`
|
SubscriptionList []SubscriptionList `json:"subscription_list"`
|
||||||
ShowPointShop bool `json:"show_point_shop"`
|
ShowPointShop bool `json:"show_point_shop"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ProductListResp struct {
|
||||||
|
Result ProductListResult `json:"result"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
|
}
|
||||||
|
|||||||
+22
-1
@@ -10,6 +10,13 @@ type ScenarioStatusResult struct {
|
|||||||
ScenarioStatusList []ScenarioStatusList `json:"scenario_status_list"`
|
ScenarioStatusList []ScenarioStatusList `json:"scenario_status_list"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ScenarioStatusResp struct {
|
||||||
|
Result ScenarioStatusResult `json:"result"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
|
}
|
||||||
|
|
||||||
// module: subscenario, action: subscenarioStatus
|
// module: subscenario, action: subscenarioStatus
|
||||||
type SubscenarioStatusList struct {
|
type SubscenarioStatusList struct {
|
||||||
SubscenarioID int `json:"subscenario_id"`
|
SubscenarioID int `json:"subscenario_id"`
|
||||||
@@ -21,11 +28,18 @@ type SubscenarioStatusResult struct {
|
|||||||
UnlockedSubscenarioIds []interface{} `json:"unlocked_subscenario_ids"`
|
UnlockedSubscenarioIds []interface{} `json:"unlocked_subscenario_ids"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SubscenarioStatusResp struct {
|
||||||
|
Result SubscenarioStatusResult `json:"result"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
|
}
|
||||||
|
|
||||||
// module: eventscenario, action: status
|
// module: eventscenario, action: status
|
||||||
type EventScenarioChapterList struct {
|
type EventScenarioChapterList struct {
|
||||||
EventScenarioID int `json:"event_scenario_id"`
|
EventScenarioID int `json:"event_scenario_id"`
|
||||||
Chapter int `json:"chapter"`
|
Chapter int `json:"chapter"`
|
||||||
ChapterAsset string `json:"chapter_asset"`
|
ChapterAsset string `json:"chapter_asset,omitempty"`
|
||||||
Status int `json:"status"`
|
Status int `json:"status"`
|
||||||
OpenFlashFlag int `json:"open_flash_flag"`
|
OpenFlashFlag int `json:"open_flash_flag"`
|
||||||
IsReward bool `json:"is_reward"`
|
IsReward bool `json:"is_reward"`
|
||||||
@@ -44,3 +58,10 @@ type EventScenarioList struct {
|
|||||||
type EventScenarioStatusResult struct {
|
type EventScenarioStatusResult struct {
|
||||||
EventScenarioList []EventScenarioList `json:"event_scenario_list"`
|
EventScenarioList []EventScenarioList `json:"event_scenario_list"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type EventScenarioStatusResp struct {
|
||||||
|
Result EventScenarioStatusResult `json:"result"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
|
}
|
||||||
|
|||||||
+33
-5
@@ -82,8 +82,8 @@ type UnitAllResp struct {
|
|||||||
|
|
||||||
// module: unit, action: deckInfo
|
// module: unit, action: deckInfo
|
||||||
type UnitOwningUserIds struct {
|
type UnitOwningUserIds struct {
|
||||||
Position int `json:"position"`
|
Position int `json:"position"`
|
||||||
UnitOwningUserID int64 `json:"unit_owning_user_id"`
|
UnitOwningUserID int `json:"unit_owning_user_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type UnitDeckInfo struct {
|
type UnitDeckInfo struct {
|
||||||
@@ -93,8 +93,11 @@ type UnitDeckInfo struct {
|
|||||||
UnitOwningUserIds []UnitOwningUserIds `json:"unit_owning_user_ids"`
|
UnitOwningUserIds []UnitOwningUserIds `json:"unit_owning_user_ids"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type UnitDeckInfoResult struct {
|
type UnitDeckInfoResp struct {
|
||||||
UnitDeckInfo []UnitDeckInfo
|
Result []UnitDeckInfo `json:"result"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// module: unit, action: supporterAll
|
// module: unit, action: supporterAll
|
||||||
@@ -103,8 +106,33 @@ type UnitSupportList struct {
|
|||||||
Amount int `json:"amount"`
|
Amount int `json:"amount"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type UnitSupporterAllResult struct {
|
type UnitSupportResult struct {
|
||||||
UnitSupportList []UnitSupportList `json:"unit_support_list"`
|
UnitSupportList []UnitSupportList `json:"unit_support_list"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type UnitSupportResp struct {
|
||||||
|
Result UnitSupportResult `json:"result"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
|
}
|
||||||
|
|
||||||
// module: unit, action: removableSkillInfo
|
// module: unit, action: removableSkillInfo
|
||||||
|
type OwningInfo struct {
|
||||||
|
UnitRemovableSkillID int `json:"unit_removable_skill_id"`
|
||||||
|
TotalAmount int `json:"total_amount"`
|
||||||
|
EquippedAmount int `json:"equipped_amount"`
|
||||||
|
InsertDate string `json:"insert_date"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type RemovableSkillResult struct {
|
||||||
|
OwningInfo []OwningInfo `json:"owning_info"`
|
||||||
|
EquipmentInfo []interface{} `json:"equipment_info"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type RemovableSkillResp struct {
|
||||||
|
Result RemovableSkillResult `json:"result"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
package resp
|
|
||||||
|
|
||||||
var (
|
|
||||||
AnnounceState = `{"response_data":{"has_unread_announce":false,"server_timestamp":1679360075},"release_info":[],"status_code":200}`
|
|
||||||
NotificationToken = `{"response_data":[],"release_info":[],"status_code":200}`
|
|
||||||
ScenarioStartup = `{"response_data":{"scenario_id":1,"scenario_adjustment":50,"server_timestamp":1678785161},"release_info":[],"status_code":200}`
|
|
||||||
SubScenarioStartup = `{"response_data":{"subscenario_id":3337,"scenario_adjustment":50,"server_timestamp":1680118081},"release_info":[],"status_code":200}`
|
|
||||||
)
|
|
||||||
+858
@@ -0,0 +1,858 @@
|
|||||||
|
package tools
|
||||||
|
|
||||||
|
import (
|
||||||
|
"database/sql"
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
"honoka-chan/model"
|
||||||
|
"honoka-chan/utils"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
_ "github.com/mattn/go-sqlite3"
|
||||||
|
)
|
||||||
|
|
||||||
|
func GenApi1Data() {
|
||||||
|
db, err := sql.Open("sqlite3", "assets/main.db")
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
defer db.Close()
|
||||||
|
|
||||||
|
// global
|
||||||
|
var centerId int
|
||||||
|
var respAll []interface{}
|
||||||
|
|
||||||
|
// live_status_result
|
||||||
|
var liveDifficultyId int
|
||||||
|
normalLives := []model.NormalLiveStatusList{}
|
||||||
|
sql := `SELECT live_difficulty_id FROM normal_live_m ORDER BY live_difficulty_id ASC`
|
||||||
|
rows, err := db.Query(sql)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
for rows.Next() {
|
||||||
|
err = rows.Scan(&liveDifficultyId)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
normalLive := model.NormalLiveStatusList{
|
||||||
|
LiveDifficultyID: liveDifficultyId,
|
||||||
|
Status: 1,
|
||||||
|
HiScore: 0,
|
||||||
|
HiComboCount: 0,
|
||||||
|
ClearCnt: 0,
|
||||||
|
AchievedGoalIDList: []int{},
|
||||||
|
}
|
||||||
|
|
||||||
|
normalLives = append(normalLives, normalLive)
|
||||||
|
}
|
||||||
|
|
||||||
|
specialLives := []model.SpecialLiveStatusList{}
|
||||||
|
sql = `SELECT live_difficulty_id FROM special_live_m ORDER BY live_difficulty_id ASC`
|
||||||
|
rows, err = db.Query(sql)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
for rows.Next() {
|
||||||
|
err = rows.Scan(&liveDifficultyId)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
specialLive := model.SpecialLiveStatusList{
|
||||||
|
LiveDifficultyID: liveDifficultyId,
|
||||||
|
Status: 1,
|
||||||
|
HiScore: 0,
|
||||||
|
HiComboCount: 0,
|
||||||
|
ClearCnt: 0,
|
||||||
|
AchievedGoalIDList: []int{},
|
||||||
|
}
|
||||||
|
|
||||||
|
specialLives = append(specialLives, specialLive)
|
||||||
|
}
|
||||||
|
|
||||||
|
LiveStatusResp := model.LiveStatusResp{
|
||||||
|
// _ = model.LiveStatusResp{
|
||||||
|
Result: model.LiveStatusResult{
|
||||||
|
NormalLiveStatusList: normalLives,
|
||||||
|
SpecialLiveStatusList: specialLives,
|
||||||
|
TrainingLiveStatusList: []model.TrainingLiveStatusList{},
|
||||||
|
MarathonLiveStatusList: []interface{}{},
|
||||||
|
FreeLiveStatusList: []interface{}{},
|
||||||
|
CanResumeLive: false,
|
||||||
|
},
|
||||||
|
Status: 200,
|
||||||
|
CommandNum: false,
|
||||||
|
TimeStamp: time.Now().Unix(),
|
||||||
|
}
|
||||||
|
respAll = append(respAll, LiveStatusResp)
|
||||||
|
|
||||||
|
// live_list_result
|
||||||
|
livesList := []model.LiveList{}
|
||||||
|
for _, v := range specialLives {
|
||||||
|
livesList = append(livesList, model.LiveList{
|
||||||
|
LiveDifficultyID: v.LiveDifficultyID,
|
||||||
|
StartDate: "2023-01-01 00:00:00",
|
||||||
|
EndDate: "2037-01-01 00:00:00",
|
||||||
|
IsRandom: false,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
liveListResp := model.LiveScheduleResp{
|
||||||
|
// _ = model.LiveScheduleResp{
|
||||||
|
Result: model.LiveScheduleResult{
|
||||||
|
EventList: []interface{}{},
|
||||||
|
LiveList: livesList,
|
||||||
|
LimitedBonusList: []interface{}{},
|
||||||
|
LimitedBonusCommonList: []model.LimitedBonusCommonList{}, // 特效道具
|
||||||
|
RandomLiveList: []model.RandomLiveList{}, // 随机歌曲
|
||||||
|
FreeLiveList: []interface{}{},
|
||||||
|
TrainingLiveList: []model.TrainingLiveList{}, // 挑战歌曲
|
||||||
|
},
|
||||||
|
Status: 200,
|
||||||
|
CommandNum: false,
|
||||||
|
TimeStamp: time.Now().Unix(),
|
||||||
|
}
|
||||||
|
respAll = append(respAll, liveListResp)
|
||||||
|
|
||||||
|
// unit_list_result
|
||||||
|
sql = `SELECT unit_id,album_series_id,rarity,rank_min,rank_max,hp_max,default_removable_skill_capacity FROM unit_m WHERE unit_id NOT IN (SELECT unit_id FROM unit_m WHERE unit_type_id IN (SELECT unit_type_id FROM unit_type_m WHERE image_button_asset IS NULL AND (background_color = 'dcdbe3' AND original_attribute_id IS NULL) OR (unit_type_id IN (10,110,127,128,129) OR unit_type_id BETWEEN 131 AND 140))) ORDER BY unit_number ASC;`
|
||||||
|
rows, err = db.Query(sql)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
unitsData := []model.Active{}
|
||||||
|
oId := 3000000000 // 起始卡片 ID,随意设置
|
||||||
|
sdt := time.Now().Add(-time.Hour * 24 * 30)
|
||||||
|
|
||||||
|
defaultDeckUnits := []int{}
|
||||||
|
|
||||||
|
for rows.Next() {
|
||||||
|
unitData := model.Active{}
|
||||||
|
var uid, rit, rank, max_rank, hp_max, skill_capacity int
|
||||||
|
var album_series_id interface{}
|
||||||
|
err = rows.Scan(&uid, &album_series_id, &rit, &rank, &max_rank, &hp_max, &skill_capacity)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
oId++
|
||||||
|
sdt = sdt.Add(time.Second * 3)
|
||||||
|
|
||||||
|
unitData.UnitOwningUserID = oId
|
||||||
|
unitData.UnitID = uid
|
||||||
|
unitData.NextExp = 0
|
||||||
|
unitData.Rank = rank
|
||||||
|
unitData.MaxRank = max_rank
|
||||||
|
unitData.MaxHp = hp_max
|
||||||
|
unitData.DisplayRank = 2
|
||||||
|
unitData.UnitSkillLevel = 8
|
||||||
|
unitData.FavoriteFlag = true
|
||||||
|
unitData.IsRankMax = true
|
||||||
|
unitData.IsLevelMax = true
|
||||||
|
unitData.IsLoveMax = true
|
||||||
|
unitData.IsSkillLevelMax = true
|
||||||
|
unitData.IsRemovableSkillCapacityMax = true
|
||||||
|
unitData.InsertDate = sdt.Local().Format("2006-01-02 03:04:05")
|
||||||
|
if rit != 4 {
|
||||||
|
unitData.LevelLimitID = 0
|
||||||
|
unitData.UnitRemovableSkillCapacity = skill_capacity
|
||||||
|
unitData.IsSigned = false
|
||||||
|
switch rit {
|
||||||
|
case 1:
|
||||||
|
// N
|
||||||
|
unitData.Exp = 8000
|
||||||
|
unitData.Level = 40
|
||||||
|
unitData.MaxLevel = 40
|
||||||
|
unitData.Love = 50
|
||||||
|
unitData.MaxLove = 50
|
||||||
|
unitData.UnitSkillExp = 0
|
||||||
|
unitData.UnitSkillLevel = 0
|
||||||
|
unitData.FavoriteFlag = false
|
||||||
|
unitData.IsRankMax = false
|
||||||
|
unitData.IsLevelMax = false
|
||||||
|
unitData.IsLoveMax = false
|
||||||
|
unitData.IsSkillLevelMax = false
|
||||||
|
unitData.IsRemovableSkillCapacityMax = false
|
||||||
|
case 2:
|
||||||
|
// R
|
||||||
|
unitData.Exp = 13500
|
||||||
|
unitData.Level = 60
|
||||||
|
unitData.MaxLevel = 60
|
||||||
|
unitData.Love = 200
|
||||||
|
unitData.MaxLove = 200
|
||||||
|
unitData.UnitSkillExp = 490
|
||||||
|
case 3:
|
||||||
|
// SR
|
||||||
|
unitData.Exp = 36800
|
||||||
|
unitData.Level = 80
|
||||||
|
unitData.MaxLevel = 80
|
||||||
|
unitData.Love = 500
|
||||||
|
unitData.MaxLove = 500
|
||||||
|
unitData.UnitSkillExp = 4900
|
||||||
|
case 5:
|
||||||
|
// SSR
|
||||||
|
unitData.Exp = 56657
|
||||||
|
unitData.Level = 90
|
||||||
|
unitData.MaxLevel = 90
|
||||||
|
unitData.Love = 750
|
||||||
|
unitData.MaxLove = 750
|
||||||
|
unitData.UnitSkillExp = 12700
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// UR
|
||||||
|
unitData.Exp = 79700
|
||||||
|
unitData.Level = 100
|
||||||
|
unitData.MaxLevel = 100
|
||||||
|
unitData.LevelLimitID = 2
|
||||||
|
unitData.Love = 1000
|
||||||
|
unitData.MaxLove = 1000
|
||||||
|
unitData.UnitSkillExp = 29900
|
||||||
|
unitData.UnitRemovableSkillCapacity = 8
|
||||||
|
|
||||||
|
rs, err := db.Query("SELECT COUNT(*) AS ct FROM unit_sign_asset_m WHERE unit_id = ?", uid)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
ct := 0
|
||||||
|
for rs.Next() {
|
||||||
|
err = rs.Scan(&ct)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ct > 0 {
|
||||||
|
unitData.IsSigned = true
|
||||||
|
} else {
|
||||||
|
unitData.IsSigned = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
unitsData = append(unitsData, unitData)
|
||||||
|
|
||||||
|
// 中心位成员
|
||||||
|
if uid == 3927 { // AC15 果
|
||||||
|
centerId = oId
|
||||||
|
}
|
||||||
|
|
||||||
|
switch album_series_id := album_series_id.(type) {
|
||||||
|
case int64:
|
||||||
|
if album_series_id == 615 {
|
||||||
|
// 仆光套
|
||||||
|
defaultDeckUnits = append(defaultDeckUnits, oId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
unitListResp := model.UnitAllResp{
|
||||||
|
// _ = model.UnitAllResp{
|
||||||
|
Result: model.UnitAllResult{
|
||||||
|
Active: unitsData,
|
||||||
|
Waiting: []model.Waiting{},
|
||||||
|
},
|
||||||
|
Status: 200,
|
||||||
|
CommandNum: false,
|
||||||
|
TimeStamp: time.Now().Unix(),
|
||||||
|
}
|
||||||
|
respAll = append(respAll, unitListResp)
|
||||||
|
|
||||||
|
// unit_deck_result
|
||||||
|
oUids := []model.UnitOwningUserIds{}
|
||||||
|
for k, v := range defaultDeckUnits[0:9] {
|
||||||
|
oUids = append(oUids, model.UnitOwningUserIds{
|
||||||
|
Position: k + 1,
|
||||||
|
UnitOwningUserID: v,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
unitDeckResp := model.UnitDeckInfoResp{
|
||||||
|
// _ = model.UnitDeckInfoResp{
|
||||||
|
Result: []model.UnitDeckInfo{
|
||||||
|
{
|
||||||
|
UnitDeckID: 1,
|
||||||
|
MainFlag: true,
|
||||||
|
DeckName: "Future style",
|
||||||
|
UnitOwningUserIds: oUids,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Status: 200,
|
||||||
|
CommandNum: false,
|
||||||
|
TimeStamp: time.Now().Unix(),
|
||||||
|
}
|
||||||
|
respAll = append(respAll, unitDeckResp)
|
||||||
|
|
||||||
|
// unit_support_result
|
||||||
|
unitSupportResp := model.UnitSupportResp{
|
||||||
|
// _ = model.UnitSupportResp{
|
||||||
|
Result: model.UnitSupportResult{
|
||||||
|
UnitSupportList: []model.UnitSupportList{},
|
||||||
|
}, // 练习道具
|
||||||
|
Status: 200,
|
||||||
|
CommandNum: false,
|
||||||
|
TimeStamp: time.Now().Unix(),
|
||||||
|
}
|
||||||
|
respAll = append(respAll, unitSupportResp)
|
||||||
|
|
||||||
|
// owning_equip_result
|
||||||
|
rmSkillResp := model.RemovableSkillResp{
|
||||||
|
// _ = model.RemovableSkillResp{
|
||||||
|
Result: model.RemovableSkillResult{
|
||||||
|
OwningInfo: []model.OwningInfo{},
|
||||||
|
EquipmentInfo: []interface{}{},
|
||||||
|
}, // 宝石
|
||||||
|
Status: 200,
|
||||||
|
CommandNum: false,
|
||||||
|
TimeStamp: time.Now().Unix(),
|
||||||
|
}
|
||||||
|
respAll = append(respAll, rmSkillResp)
|
||||||
|
|
||||||
|
// costume_list_result
|
||||||
|
costumeListResp := model.CostumeListResp{
|
||||||
|
// _ = model.CostumeListResp{
|
||||||
|
Result: model.CostumeListResult{
|
||||||
|
CostumeList: []model.CostumeList{},
|
||||||
|
},
|
||||||
|
Status: 200,
|
||||||
|
CommandNum: false,
|
||||||
|
TimeStamp: time.Now().Unix(),
|
||||||
|
}
|
||||||
|
respAll = append(respAll, costumeListResp)
|
||||||
|
|
||||||
|
// album_unit_result
|
||||||
|
albumLists := []model.AlbumResult{}
|
||||||
|
sql = `SELECT unit_id,rarity FROM unit_m ORDER BY unit_id ASC`
|
||||||
|
rows, err = db.Query(sql)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
for rows.Next() {
|
||||||
|
albumList := model.AlbumResult{
|
||||||
|
RankMaxFlag: true,
|
||||||
|
LoveMaxFlag: true,
|
||||||
|
RankLevelMaxFlag: true,
|
||||||
|
AllMaxFlag: true,
|
||||||
|
FavoritePoint: 1000,
|
||||||
|
}
|
||||||
|
var uid, rit int
|
||||||
|
err = rows.Scan(&uid, &rit)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
albumList.UnitID = uid
|
||||||
|
if rit != 4 {
|
||||||
|
albumList.SignFlag = false
|
||||||
|
if rit == 1 {
|
||||||
|
albumList.HighestLovePerUnit = 50
|
||||||
|
albumList.TotalLove = 50
|
||||||
|
} else if rit == 2 {
|
||||||
|
albumList.HighestLovePerUnit = 200
|
||||||
|
albumList.TotalLove = 200
|
||||||
|
} else if rit == 3 {
|
||||||
|
albumList.HighestLovePerUnit = 500
|
||||||
|
albumList.TotalLove = 500
|
||||||
|
} else if rit == 5 {
|
||||||
|
albumList.HighestLovePerUnit = 750
|
||||||
|
albumList.TotalLove = 750
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
albumList.HighestLovePerUnit = 1000
|
||||||
|
albumList.TotalLove = 1000
|
||||||
|
|
||||||
|
rs, err := db.Query("SELECT COUNT(*) AS ct FROM unit_sign_asset_m WHERE unit_id = ?", uid)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
ct := 0
|
||||||
|
for rs.Next() {
|
||||||
|
err = rs.Scan(&ct)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ct > 0 {
|
||||||
|
albumList.SignFlag = true
|
||||||
|
} else {
|
||||||
|
albumList.SignFlag = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
albumLists = append(albumLists, albumList)
|
||||||
|
}
|
||||||
|
|
||||||
|
albumResp := model.AlbumResp{
|
||||||
|
// _ = model.AlbumResp{
|
||||||
|
Result: albumLists,
|
||||||
|
Status: 200,
|
||||||
|
CommandNum: false,
|
||||||
|
TimeStamp: time.Now().Unix(),
|
||||||
|
}
|
||||||
|
respAll = append(respAll, albumResp)
|
||||||
|
|
||||||
|
// scenario_status_result
|
||||||
|
sql = `SELECT scenario_id FROM scenario_m ORDER BY scenario_id ASC`
|
||||||
|
rows, err = db.Query(sql)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
scenarioLists := []model.ScenarioStatusList{}
|
||||||
|
for rows.Next() {
|
||||||
|
var sid int
|
||||||
|
err = rows.Scan(&sid)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
scenarioLists = append(scenarioLists, model.ScenarioStatusList{
|
||||||
|
ScenarioID: sid,
|
||||||
|
Status: 2,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
scenarioResp := model.ScenarioStatusResp{
|
||||||
|
// _ = model.ScenarioStatusResp{
|
||||||
|
Result: model.ScenarioStatusResult{
|
||||||
|
ScenarioStatusList: scenarioLists,
|
||||||
|
},
|
||||||
|
Status: 200,
|
||||||
|
CommandNum: false,
|
||||||
|
TimeStamp: time.Now().Unix(),
|
||||||
|
}
|
||||||
|
respAll = append(respAll, scenarioResp)
|
||||||
|
|
||||||
|
// subscenario_status_result
|
||||||
|
sql = `SELECT subscenario_id FROM subscenario_m ORDER BY subscenario_id ASC`
|
||||||
|
rows, err = db.Query(sql)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
subScenarioLists := []model.SubscenarioStatusList{}
|
||||||
|
for rows.Next() {
|
||||||
|
var sid int
|
||||||
|
err = rows.Scan(&sid)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
subScenarioLists = append(subScenarioLists, model.SubscenarioStatusList{
|
||||||
|
SubscenarioID: sid,
|
||||||
|
Status: 2,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
subScenarioResp := model.SubscenarioStatusResp{
|
||||||
|
// _ = model.SubscenarioStatusResp{
|
||||||
|
Result: model.SubscenarioStatusResult{
|
||||||
|
SubscenarioStatusList: subScenarioLists,
|
||||||
|
UnlockedSubscenarioIds: []interface{}{},
|
||||||
|
},
|
||||||
|
Status: 200,
|
||||||
|
CommandNum: false,
|
||||||
|
TimeStamp: time.Now().Unix(),
|
||||||
|
}
|
||||||
|
respAll = append(respAll, subScenarioResp)
|
||||||
|
|
||||||
|
// event_scenario_result
|
||||||
|
eventsList := []model.EventScenarioList{}
|
||||||
|
sql = `SELECT event_id FROM event_scenario_m GROUP BY event_id ORDER BY event_id DESC`
|
||||||
|
rows, err = db.Query(sql)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
for rows.Next() {
|
||||||
|
var eventId int
|
||||||
|
err = rows.Scan(&eventId)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
sql = `SELECT event_scenario_id,chapter,chapter_asset,open_date FROM event_scenario_m WHERE event_id = ? ORDER BY chapter DESC`
|
||||||
|
chaps, err := db.Query(sql, eventId)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
chapsList := []model.EventScenarioChapterList{}
|
||||||
|
var open_date string
|
||||||
|
for chaps.Next() {
|
||||||
|
var event_scenario_id, chapter int
|
||||||
|
var chapter_asset interface{}
|
||||||
|
err = chaps.Scan(&event_scenario_id, &chapter, &chapter_asset, &open_date)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
chapList := model.EventScenarioChapterList{
|
||||||
|
EventScenarioID: event_scenario_id,
|
||||||
|
Chapter: chapter,
|
||||||
|
Status: 2,
|
||||||
|
OpenFlashFlag: 0,
|
||||||
|
IsReward: false,
|
||||||
|
CostType: 1000,
|
||||||
|
ItemID: 1200,
|
||||||
|
Amount: 1,
|
||||||
|
}
|
||||||
|
if chapter_asset != nil {
|
||||||
|
chapList.ChapterAsset = chapter_asset.(string)
|
||||||
|
}
|
||||||
|
|
||||||
|
chapsList = append(chapsList, chapList)
|
||||||
|
}
|
||||||
|
|
||||||
|
eventList := model.EventScenarioList{
|
||||||
|
EventID: eventId,
|
||||||
|
OpenDate: strings.ReplaceAll(open_date, "/", "-"),
|
||||||
|
ChapterList: chapsList,
|
||||||
|
}
|
||||||
|
|
||||||
|
// HACK event_scenario_btn_asset
|
||||||
|
if eventId == 10001 {
|
||||||
|
eventList.EventScenarioBtnAsset = "assets/image/ui/eventscenario/38_se_ba_t.png"
|
||||||
|
} else if eventId == 221 {
|
||||||
|
eventList.EventScenarioBtnAsset = "assets/image/ui/eventscenario/215_se_ba_t.png"
|
||||||
|
} else {
|
||||||
|
eventList.EventScenarioBtnAsset = fmt.Sprintf("assets/image/ui/eventscenario/%d_se_ba_t.png", eventId)
|
||||||
|
}
|
||||||
|
|
||||||
|
eventsList = append(eventsList, eventList)
|
||||||
|
}
|
||||||
|
eventScenarioResp := model.EventScenarioStatusResp{
|
||||||
|
// _ = model.EventScenarioStatusResp{
|
||||||
|
Result: model.EventScenarioStatusResult{
|
||||||
|
EventScenarioList: eventsList, //
|
||||||
|
},
|
||||||
|
Status: 200,
|
||||||
|
CommandNum: false,
|
||||||
|
TimeStamp: time.Now().Unix(),
|
||||||
|
}
|
||||||
|
respAll = append(respAll, eventScenarioResp)
|
||||||
|
|
||||||
|
// multi_unit_scenario_result
|
||||||
|
sql = `SELECT multi_unit_id FROM multi_unit_scenario_m GROUP BY multi_unit_id ORDER BY multi_unit_id ASC`
|
||||||
|
rows, err = db.Query(sql)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
var mId int
|
||||||
|
multiUnitsList := []model.MultiUnitScenarioStatusList{}
|
||||||
|
for rows.Next() {
|
||||||
|
err = rows.Scan(&mId)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
sql = `SELECT multi_unit_scenario_btn_asset,open_date,multi_unit_scenario_id,chapter FROM multi_unit_scenario_m a LEFT JOIN multi_unit_scenario_open_m b ON a.multi_unit_id = b.multi_unit_id WHERE a.multi_unit_id = ?`
|
||||||
|
units, err := db.Query(sql, mId)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
var multi_unit_scenario_id, chapter int
|
||||||
|
var multi_unit_scenario_btn_asset, open_date string
|
||||||
|
for units.Next() {
|
||||||
|
err = units.Scan(&multi_unit_scenario_btn_asset, &open_date, &multi_unit_scenario_id, &chapter)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
multiUnitsList = append(multiUnitsList, model.MultiUnitScenarioStatusList{
|
||||||
|
MultiUnitID: mId,
|
||||||
|
Status: 2,
|
||||||
|
MultiUnitScenarioBtnAsset: multi_unit_scenario_btn_asset,
|
||||||
|
OpenDate: strings.ReplaceAll(open_date, "/", "-"),
|
||||||
|
ChapterList: []model.MultiUnitScenarioChapterList{
|
||||||
|
{
|
||||||
|
MultiUnitScenarioID: multi_unit_scenario_id,
|
||||||
|
Chapter: chapter,
|
||||||
|
Status: 2,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
unitsResp := model.MultiUnitScenarioStatusResp{
|
||||||
|
// _ = model.MultiUnitScenarioStatusResp{
|
||||||
|
Result: model.MultiUnitScenarioStatusResult{
|
||||||
|
MultiUnitScenarioStatusList: multiUnitsList,
|
||||||
|
UnlockedMultiUnitScenarioIds: []interface{}{},
|
||||||
|
},
|
||||||
|
Status: 200,
|
||||||
|
CommandNum: false,
|
||||||
|
TimeStamp: time.Now().Unix(),
|
||||||
|
}
|
||||||
|
respAll = append(respAll, unitsResp)
|
||||||
|
|
||||||
|
// product_result
|
||||||
|
productResp := model.ProductListResp{
|
||||||
|
// _ = model.ProductListResp{
|
||||||
|
Result: model.ProductListResult{
|
||||||
|
RestrictionInfo: model.RestrictionInfo{
|
||||||
|
Restricted: false,
|
||||||
|
},
|
||||||
|
UnderAgeInfo: model.UnderAgeInfo{
|
||||||
|
BirthSet: false,
|
||||||
|
HasLimit: false,
|
||||||
|
LimitAmount: nil,
|
||||||
|
MonthUsed: 0,
|
||||||
|
},
|
||||||
|
SnsProductList: []model.SnsProductList{},
|
||||||
|
ProductList: []model.ProductList{},
|
||||||
|
SubscriptionList: []model.SubscriptionList{},
|
||||||
|
ShowPointShop: false,
|
||||||
|
},
|
||||||
|
Status: 200,
|
||||||
|
CommandNum: false,
|
||||||
|
TimeStamp: time.Now().Unix(),
|
||||||
|
}
|
||||||
|
respAll = append(respAll, productResp)
|
||||||
|
|
||||||
|
// banner_result
|
||||||
|
bannerResp := model.BannerListResp{
|
||||||
|
// _ = model.BannerListResp{
|
||||||
|
Result: model.BannerListResult{
|
||||||
|
TimeLimit: "2037-12-31 23:59:59",
|
||||||
|
BannerList: []model.BannerList{
|
||||||
|
{
|
||||||
|
BannerType: 1,
|
||||||
|
TargetID: 1743,
|
||||||
|
AssetPath: "assets/image/secretbox/icon/s_ba_1743_1.png",
|
||||||
|
FixedFlag: false,
|
||||||
|
BackSide: false,
|
||||||
|
BannerID: 101151,
|
||||||
|
StartDate: "2013-04-15 00:00:00",
|
||||||
|
EndDate: "2037-12-31 23:59:59",
|
||||||
|
AddUnitStartDate: "2022-01-01 00:00:00",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
BannerType: 2,
|
||||||
|
TargetID: 1,
|
||||||
|
AssetPath: "assets/image/webview/wv_ba_01.png",
|
||||||
|
WebviewURL: "/manga",
|
||||||
|
FixedFlag: false,
|
||||||
|
BackSide: true,
|
||||||
|
BannerID: 200001,
|
||||||
|
StartDate: "2016-10-15 15:00:00",
|
||||||
|
EndDate: "2037-12-31 23:59:59",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Status: 200,
|
||||||
|
CommandNum: false,
|
||||||
|
TimeStamp: time.Now().Unix(),
|
||||||
|
}
|
||||||
|
respAll = append(respAll, bannerResp)
|
||||||
|
|
||||||
|
// item_marquee_result
|
||||||
|
marqueeResp := model.NoticeMarqueeResp{
|
||||||
|
// _ = model.NoticeMarqueeResp{
|
||||||
|
Result: model.NoticeMarqueeResult{
|
||||||
|
ItemCount: 0,
|
||||||
|
MarqueeList: []interface{}{},
|
||||||
|
},
|
||||||
|
Status: 200,
|
||||||
|
CommandNum: false,
|
||||||
|
TimeStamp: time.Now().Unix(),
|
||||||
|
}
|
||||||
|
respAll = append(respAll, marqueeResp)
|
||||||
|
|
||||||
|
// user_intro_result
|
||||||
|
userIntroResp := model.UserNaviResp{
|
||||||
|
// _ = model.UserNaviResp{
|
||||||
|
Result: model.UserNaviResult{
|
||||||
|
User: model.User{
|
||||||
|
UserID: 9999999,
|
||||||
|
UnitOwningUserID: centerId,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Status: 200,
|
||||||
|
CommandNum: false,
|
||||||
|
TimeStamp: time.Now().Unix(),
|
||||||
|
}
|
||||||
|
respAll = append(respAll, userIntroResp)
|
||||||
|
|
||||||
|
// special_cutin_result
|
||||||
|
cutinResp := model.SpecialCutinResp{
|
||||||
|
// _ = model.SpecialCutinResp{
|
||||||
|
Result: model.SpecialCutinResult{
|
||||||
|
SpecialCutinList: []interface{}{},
|
||||||
|
},
|
||||||
|
Status: 200,
|
||||||
|
CommandNum: false,
|
||||||
|
TimeStamp: time.Now().Unix(),
|
||||||
|
}
|
||||||
|
respAll = append(respAll, cutinResp)
|
||||||
|
|
||||||
|
// award_result
|
||||||
|
sql = `SELECT award_id FROM award_m ORDER BY award_id ASC`
|
||||||
|
rows, err = db.Query(sql)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
awardsList := []model.AwardInfo{}
|
||||||
|
for rows.Next() {
|
||||||
|
var aId int
|
||||||
|
err = rows.Scan(&aId)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
isSet := false
|
||||||
|
if aId == 113 { // 极推穗乃果
|
||||||
|
isSet = true
|
||||||
|
}
|
||||||
|
awardsList = append(awardsList, model.AwardInfo{
|
||||||
|
AwardID: aId,
|
||||||
|
IsSet: isSet,
|
||||||
|
InsertDate: time.Now().Format("2006-01-02 03:04:05"),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
awardResp := model.AwardInfoResp{
|
||||||
|
// _ = model.AwardInfoResp{
|
||||||
|
Result: model.AwardInfoResult{
|
||||||
|
AwardInfo: awardsList,
|
||||||
|
},
|
||||||
|
Status: 200,
|
||||||
|
CommandNum: false,
|
||||||
|
TimeStamp: time.Now().Unix(),
|
||||||
|
}
|
||||||
|
respAll = append(respAll, awardResp)
|
||||||
|
|
||||||
|
// background_result
|
||||||
|
sql = `SELECT background_id FROM background_m ORDER BY background_id ASC`
|
||||||
|
rows, err = db.Query(sql)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
backgroundsList := []model.BackgroundInfo{}
|
||||||
|
for rows.Next() {
|
||||||
|
var bId int
|
||||||
|
err = rows.Scan(&bId)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
isSet := false
|
||||||
|
if bId == 143 { // 穗乃果的房间[情人节]
|
||||||
|
isSet = true
|
||||||
|
}
|
||||||
|
backgroundsList = append(backgroundsList, model.BackgroundInfo{
|
||||||
|
BackgroundID: bId,
|
||||||
|
IsSet: isSet,
|
||||||
|
InsertDate: time.Now().Format("2006-01-02 03:04:05"),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
backgroundResp := model.BackgroundInfoResp{
|
||||||
|
// _ = model.BackgroundInfoResp{
|
||||||
|
Result: model.BackgroundInfoResult{
|
||||||
|
BackgroundInfo: backgroundsList,
|
||||||
|
},
|
||||||
|
Status: 200,
|
||||||
|
CommandNum: false,
|
||||||
|
TimeStamp: time.Now().Unix(),
|
||||||
|
}
|
||||||
|
respAll = append(respAll, backgroundResp)
|
||||||
|
|
||||||
|
// stamp_result 使用不到的功能就不弄了
|
||||||
|
stampResp := utils.ReadAllText("assets/stamp.json")
|
||||||
|
var mStampResp interface{}
|
||||||
|
err = json.Unmarshal([]byte(stampResp), &mStampResp)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
// _ = utils.ReadAllText("assets/stamp.json")
|
||||||
|
respAll = append(respAll, mStampResp)
|
||||||
|
|
||||||
|
// exchange_point_result
|
||||||
|
sql = `SELECT exchange_point_id FROM exchange_point_m ORDER BY exchange_point_id ASC`
|
||||||
|
rows, err = db.Query(sql)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
exPointsList := []model.ExchangePointList{}
|
||||||
|
for rows.Next() {
|
||||||
|
var eId int
|
||||||
|
err = rows.Scan(&eId)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
exPointsList = append(exPointsList, model.ExchangePointList{
|
||||||
|
Rarity: eId,
|
||||||
|
ExchangePoint: 9999,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
exPointsResp := model.ExchangePointResp{
|
||||||
|
// _ = model.ExchangePointResp{
|
||||||
|
Result: model.ExchangePointResult{
|
||||||
|
ExchangePointList: exPointsList,
|
||||||
|
},
|
||||||
|
Status: 200,
|
||||||
|
CommandNum: false,
|
||||||
|
TimeStamp: time.Now().Unix(),
|
||||||
|
}
|
||||||
|
respAll = append(respAll, exPointsResp)
|
||||||
|
|
||||||
|
// live_se_result
|
||||||
|
liveSeResp := model.LiveSeInfoResp{
|
||||||
|
// _ = model.LiveSeInfoResp{
|
||||||
|
Result: model.LiveSeInfoResult{
|
||||||
|
LiveSeList: []int{1, 2, 3},
|
||||||
|
},
|
||||||
|
Status: 200,
|
||||||
|
CommandNum: false,
|
||||||
|
TimeStamp: time.Now().Unix(),
|
||||||
|
}
|
||||||
|
respAll = append(respAll, liveSeResp)
|
||||||
|
|
||||||
|
// live_icon_result
|
||||||
|
liveIconResp := model.LiveIconInfoResp{
|
||||||
|
// _ = model.LiveIconInfoResp{
|
||||||
|
Result: model.LiveIconInfoResult{
|
||||||
|
LiveNotesIconList: []int{1, 2, 3},
|
||||||
|
},
|
||||||
|
Status: 200,
|
||||||
|
CommandNum: false,
|
||||||
|
TimeStamp: time.Now().Unix(),
|
||||||
|
}
|
||||||
|
respAll = append(respAll, liveIconResp)
|
||||||
|
|
||||||
|
// item_list_result 暂时不知道部分字段啥逻辑
|
||||||
|
itemResp := utils.ReadAllText("assets/item.json")
|
||||||
|
// _ = utils.ReadAllText("assets/item.json")
|
||||||
|
var mItemResp interface{}
|
||||||
|
err = json.Unmarshal([]byte(itemResp), &mItemResp)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
respAll = append(respAll, mItemResp)
|
||||||
|
|
||||||
|
// marathon_result
|
||||||
|
marathonResp := model.MarathonInfoResp{
|
||||||
|
// _ = model.MarathonInfoResp{
|
||||||
|
Result: []interface{}{},
|
||||||
|
Status: 200,
|
||||||
|
CommandNum: false,
|
||||||
|
TimeStamp: time.Now().Unix(),
|
||||||
|
}
|
||||||
|
respAll = append(respAll, marathonResp)
|
||||||
|
|
||||||
|
// challenge_result
|
||||||
|
challengeResp := model.ChallengeInfoResp{
|
||||||
|
// _ = model.ChallengeInfoResp{
|
||||||
|
Result: []interface{}{},
|
||||||
|
Status: 200,
|
||||||
|
CommandNum: false,
|
||||||
|
TimeStamp: time.Now().Unix(),
|
||||||
|
}
|
||||||
|
respAll = append(respAll, challengeResp)
|
||||||
|
|
||||||
|
// Final
|
||||||
|
k, err := json.Marshal(respAll)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
resp := model.Response{
|
||||||
|
ResponseData: k,
|
||||||
|
ReleaseInfo: []interface{}{},
|
||||||
|
StatusCode: 200,
|
||||||
|
}
|
||||||
|
k, err = json.Marshal(resp)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
// fmt.Println(string(k))
|
||||||
|
|
||||||
|
utils.WriteAllText("assets/api1.json", string(k))
|
||||||
|
}
|
||||||
+1
-1
@@ -14,7 +14,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func SyncNotesList() {
|
func SyncNotesList() {
|
||||||
db, err := sql.Open("sqlite3", "assets/live.db")
|
db, err := sql.Open("sqlite3", "assets/main.db")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package tools
|
package tools
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
GenApi1Data()
|
||||||
AnalysisApi1Data("assets/api1.json")
|
AnalysisApi1Data("assets/api1.json")
|
||||||
AnalysisApi2Data("assets/api2.json")
|
AnalysisApi2Data("assets/api2.json")
|
||||||
AnalysisApi3Data("assets/api3.json")
|
AnalysisApi3Data("assets/api3.json")
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func ListUnitData() {
|
func ListUnitData() {
|
||||||
db, err := sql.Open("sqlite3", "assets/unit.db")
|
db, err := sql.Open("sqlite3", "assets/main.db")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user