Commit 0cac1efc by 彭芳

[minor]: fix customer id is 0

parent be9f8aac
......@@ -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,
})
}
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment