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
0cac1efc
Commit
0cac1efc
authored
Feb 17, 2023
by
彭芳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[minor]: fix customer id is 0
parent
be9f8aac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
data.go
internal/data/data.go
+1
-1
report.go
internal/service/report.go
+9
-2
No files found.
internal/data/data.go
View file @
0cac1efc
...
...
@@ -43,6 +43,6 @@ func NewGormLogger() logger.Interface {
return
logger
.
New
(
logrus
.
StandardLogger
(),
logger
.
Config
{
SlowThreshold
:
time
.
Second
,
IgnoreRecordNotFoundError
:
true
,
LogLevel
:
logger
.
Warn
,
LogLevel
:
logger
.
Info
,
})
}
internal/service/report.go
View file @
0cac1efc
package
service
import
(
"strconv"
"github.com/gin-gonic/gin"
"github.com/go-kratos/kratos/v2/log"
...
...
@@ -25,8 +27,13 @@ func (p *ReportService) ListCampaignData(ctx *gin.Context) {
ResponseError
(
ctx
,
err
)
return
}
customerId
:=
ctx
.
GetInt64
(
util
.
CustomerId
)
data
,
err
:=
p
.
uc
.
ListCampaignData
(
ctx
,
customerId
,
&
req
)
customerIdStr
:=
ctx
.
GetString
(
util
.
CustomerId
)
customerId
,
err
:=
strconv
.
Atoi
(
customerIdStr
)
if
err
!=
nil
{
ResponseError
(
ctx
,
err
)
return
}
data
,
err
:=
p
.
uc
.
ListCampaignData
(
ctx
,
int64
(
customerId
),
&
req
)
if
err
!=
nil
{
ResponseError
(
ctx
,
err
)
return
...
...
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