From 73ada4aa6e189c2498d5ffb0637e756eb36195ae Mon Sep 17 00:00:00 2001 From: Leufolium Date: Wed, 31 Jul 2024 17:04:08 +0800 Subject: [PATCH] by Robin at 20240731 --- api/proto/Raven_IQ_test/proto/Raven_IQ_test_vo_api.go | 2 +- dbstruct/RavenIQTest.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/proto/Raven_IQ_test/proto/Raven_IQ_test_vo_api.go b/api/proto/Raven_IQ_test/proto/Raven_IQ_test_vo_api.go index 8f52a4ad..df072688 100644 --- a/api/proto/Raven_IQ_test/proto/Raven_IQ_test_vo_api.go +++ b/api/proto/Raven_IQ_test/proto/Raven_IQ_test_vo_api.go @@ -7,7 +7,7 @@ import ( type ApiListVO struct { Id int64 `json:"id"` // 瑞文智商测试表id - UserId int64 `json:"user_id"` // 用户id + UserId string `json:"user_id"` // 用户id Age int64 `json:"age"` // 年龄 TotalScore float64 `json:"total_score"` // 总得分 IQ int64 `json:"IQ"` // 智商值 diff --git a/dbstruct/RavenIQTest.go b/dbstruct/RavenIQTest.go index 27ea68bc..3c221061 100644 --- a/dbstruct/RavenIQTest.go +++ b/dbstruct/RavenIQTest.go @@ -2,7 +2,7 @@ package dbstruct type RavenIQTest struct { Id *int64 `json:"id" bson:"_id"` // 瑞文智商测试表id - UserId *int64 `json:"user_id" bson:"user_id"` // 用户id + UserId *string `json:"user_id" bson:"user_id"` // 用户id Age *int64 `json:"age" bson:"age"` // 年龄 TotalScore *float64 `json:"total_score" bson:"total_score"` // 总得分 IQBlockId *int64 `json:"IQ_block_id" bson:"IQ_block_id"` // 智商值key @@ -33,9 +33,9 @@ func (p *RavenIQTest) GetId() int64 { return *p.Id } -func (p *RavenIQTest) GetUserId() int64 { +func (p *RavenIQTest) GetUserId() string { if p == nil || p.UserId == nil { - return -1 + return "" } return *p.UserId }