Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
demo-go
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
彭芳
demo-go
Commits
0a1add5b
Commit
0a1add5b
authored
Feb 22, 2023
by
彭芳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[minor]: update config
parent
1e77500e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
config.yaml
configs/config.yaml
+2
-1
report.go
internal/biz/report.go
+1
-1
constant.go
internal/util/constant.go
+2
-2
No files found.
configs/config.yaml
View file @
0a1add5b
...
...
@@ -5,7 +5,7 @@ server:
data
:
database
:
driver
:
mysql
source
:
ads
test:Ey5M6GowXu!7@tcp(ads-mysql-test.adsdesk.cn:13316)/adsdesk_test2
?charset=utf8&parseTime=True&loc=Local
source
:
ads
desk:1QAZ2wsx@tcp(ads-mysql-online.adsdesk.cn:13307)/adsdesk
?charset=utf8&parseTime=True&loc=Local
max_idle
:
50
max_open
:
100
max_lifetime
:
30s
\ No newline at end of file
internal/biz/report.go
View file @
0a1add5b
...
...
@@ -277,7 +277,7 @@ func (p *Campaign) getValidPlayRate() util.Float64 {
}
func
(
p
*
Campaign
)
getAveragePlayTimePerPlay
()
util
.
Float64
{
return
calcRate
(
float64
(
p
.
PlayDurationSum
),
float64
(
p
.
TotalPlay
))
return
calcRate
(
float64
(
p
.
PlayDurationSum
),
float64
(
p
.
TotalPlay
))
/
1000
}
func
(
p
*
Campaign
)
getPlayOverRate
()
util
.
Float64
{
...
...
internal/util/constant.go
View file @
0a1add5b
...
...
@@ -3,8 +3,8 @@ package util
const
(
RequestKey
=
"request_id"
Token
=
"token"
DefaultToken
=
"
44444
"
DefaultToken
=
"
a878dbebc902328b41dbf02aa87abb58
"
CustomerId
=
"customer_id"
DefaultCustomerId
=
"10
025
"
DefaultCustomerId
=
"10
407
"
StatusOK
=
"ok"
)
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