Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-common
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujiebin
hilo-common
Commits
acd46b01
Commit
acd46b01
authored
Aug 23, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
script update
parent
38c09a9d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
fruit_day_award.go
script/fruit_day_award.go
+2
-2
test_game_banner.go
script/test_game_banner.go
+12
-8
No files found.
script/fruit_day_award.go
View file @
acd46b01
...
...
@@ -41,7 +41,7 @@ func ats32(a interface{}) string {
}
func
main
()
{
url
:=
"https://apiv2.faceline.live/v1/fruitMachine/rank/award?lang=zh-cn&pageIndex=1&pageSize=5000
0&beginDate=2023-08-20&endDate=2023-08-20
&userCode=&timezone=1"
url
:=
"https://apiv2.faceline.live/v1/fruitMachine/rank/award?lang=zh-cn&pageIndex=1&pageSize=5000
&beginDate=2023-08-21&endDate=2023-08-21
&userCode=&timezone=1"
method
:=
"GET"
client
:=
&
http
.
Client
{}
...
...
@@ -95,7 +95,7 @@ func main() {
for
_
,
v
:=
range
svips
{
svipMap
[
v
.
Code
]
=
v
.
Level
}
excelFileName
:=
fmt
.
Sprintf
(
"./082
0
水果机中奖榜.xlsx"
)
excelFileName
:=
fmt
.
Sprintf
(
"./082
1
水果机中奖榜.xlsx"
)
xlFile
:=
xlsx
.
NewFile
()
sheet
,
_
:=
xlFile
.
AddSheet
(
"charge"
)
row
:=
sheet
.
AddRow
()
...
...
script/test_game_banner.go
View file @
acd46b01
...
...
@@ -5,6 +5,8 @@ import (
"git.hilo.cn/hilo-common/script/mysql"
)
// cat 146.json | grep 'gameId\\"\:17' | wc -l
// 如果mysql navicate中导出json,可以用上面的命令,是准确的。
type
RpcLog
struct
{
Type
int
Msg
string
...
...
@@ -12,18 +14,20 @@ type RpcLog struct {
type
Msg
struct
{
GameType
int
`json:"gameType"`
GameId
int
`json:"gameId"`
}
var
GameTypeMap
=
map
[
int
]
string
{
0
:
"slot"
,
5
:
"幸运盒子"
,
6
:
"水果机"
,
//0: "slot",
//5: "幸运盒子",
//6: "水果机",
17
:
"赛车"
,
}
func
main
()
{
var
rpcLogs
[]
RpcLog
if
err
:=
mysql
.
ProdReadOnlyDB
.
Table
(
"rpc_log_20230
3
"
)
.
Where
(
"`type` = 146"
)
.
Where
(
"created_time >= ?
and created_time < ?"
,
"2023-03-09"
,
"2023-03-13
"
)
.
Find
(
&
rpcLogs
)
.
Error
;
err
!=
nil
{
if
err
:=
mysql
.
ProdReadOnlyDB
.
Table
(
"rpc_log_20230
8
"
)
.
Where
(
"`type` = 146"
)
.
Where
(
"created_time >= ?
"
,
"2023-08-22 15:57:49
"
)
.
Find
(
&
rpcLogs
)
.
Error
;
err
!=
nil
{
panic
(
err
)
}
var
data
=
make
(
map
[
int
]
int
)
...
...
@@ -32,9 +36,9 @@ func main() {
if
err
:=
json
.
Unmarshal
([]
byte
(
log
.
Msg
),
msg
);
err
!=
nil
{
panic
(
err
)
}
data
[
msg
.
Game
Type
]
++
data
[
msg
.
Game
Id
]
++
}
for
game
Type
,
count
:=
range
data
{
println
(
GameTypeMap
[
game
Type
],
count
)
for
game
Id
,
count
:=
range
data
{
println
(
GameTypeMap
[
game
Id
],
count
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment