打印日志

This commit is contained in:
haomingming 2025-10-11 14:14:01 +08:00
parent 48a5141054
commit e261364482
3 changed files with 12 additions and 2 deletions

View File

@ -270,6 +270,10 @@ func (b *CaseComment) AddCaseCommentHighQuality(c *gin.Context) {
}
}()
println(user)
str := fmt.Sprintf("%+v", user) // %+v 会带上字段名
fmt.Println(str)
println("========")
// 发放积分-优质留言-1010 修改
userService := service.UserService{}
user,err = userService.ReportUserScore(tx, result.ProjectId, caseComment.CaseId, caseComment.PlatformId, scoreType, user)
@ -280,8 +284,8 @@ func (b *CaseComment) AddCaseCommentHighQuality(c *gin.Context) {
}
println(user)
str := fmt.Sprintf("%+v", user) // %+v 会带上字段名
fmt.Println(str)
str2 := fmt.Sprintf("%+v", user) // %+v 会带上字段名
fmt.Println(str2)
// 上报用户参与情况-只上报优质留言-佳动力
if caseComment.PlatformId == 2 {

View File

@ -108,6 +108,9 @@ func ReportUserScore(bonuspointsNote, userUuid string, bonuspoints int) (g *Repo
utils.LogJsonInfo("获取app数据返回", g)
println("获取app数据返回")
println(g)
if g.Code != 200 {
if g.Msg != "" {
return g, errors.New(g.Msg)

View File

@ -160,6 +160,9 @@ func ReportCaseRecord(requestData ReportCaseRecordRequest) (g *ReportCaseRecordR
utils.LogJsonInfo("获取超级袋鼠数据返回", g)
println("获取超级袋鼠数据返回")
println(g)
if g.Code != 1 && g.Code != "1" && g.Code != float64(1) {
if g.Msg != "" {
return g, errors.New(g.Msg)