LingxinMeng hace 1 año
padre
commit
36c9c8ed5f
Se han modificado 2 ficheros con 13 adiciones y 12 borrados
  1. 12 11
      amd64/score_server/entity/e_exam.go
  2. 1 1
      amd64/score_server/handler/h_exam.go

+ 12 - 11
amd64/score_server/entity/e_exam.go

@@ -1,6 +1,7 @@
 package entity
 
 import (
+	"database/sql"
 	"time"
 )
 
@@ -12,17 +13,17 @@ type ExamPao struct {
 }
 
 type ExamPo struct {
-	Id              int       `json:"id" db:"id"` // 自增id
-	TeamName        string    `json:"teamName" db:"team_name"`
-	Topic           string    `json:"topic" db:"topic"`
-	BeginTime       time.Time `json:"beginTime" db:"begin_time"`
-	EndTime         time.Time `json:"endTime" db:"end_time"`
-	ScoreOnline     float64   `json:"scoreOnline" db:"score_online"`
-	ScoreOffline    float64   `json:"scoreOffline" db:"score_offline"`
-	ScoreFinal      float64   `json:"scoreFinal" db:"score_final"`
-	Details         string    `json:"details" db:"details"`
-	ScoreReportPath string    `json:"ScoreReportPath" db:"score_report_path"`
-	EquipmentNo     string    `json:"equipmentNo" db:"equipment_no"`
+	Id              int            `json:"id" db:"id"` // 自增id
+	TeamName        string         `json:"teamName" db:"team_name"`
+	Topic           string         `json:"topic" db:"topic"`
+	BeginTime       time.Time      `json:"beginTime" db:"begin_time"`
+	EndTime         time.Time      `json:"endTime" db:"end_time"`
+	ScoreOnline     float64        `json:"scoreOnline" db:"score_online"`
+	ScoreOffline    float64        `json:"scoreOffline" db:"score_offline"`
+	ScoreFinal      float64        `json:"scoreFinal" db:"score_final"`
+	Details         sql.NullString `json:"details" db:"details"`
+	ScoreReportPath string         `json:"ScoreReportPath" db:"score_report_path"`
+	EquipmentNo     string         `json:"equipmentNo" db:"equipment_no"`
 }
 
 type ExamVo struct {

+ 1 - 1
amd64/score_server/handler/h_exam.go

@@ -260,7 +260,7 @@ func Page(c *gin.Context) {
 			ScoreOnline:     po.ScoreOnline,
 			ScoreOffline:    po.ScoreOffline,
 			ScoreFinal:      po.ScoreFinal,
-			Details:         po.Details,
+			Details:         po.Details.String,
 			ScoreReportPath: po.ScoreReportPath,
 		})
 	}