From 3d850e460375adfa6b9cf29b6a9602fd60705011 Mon Sep 17 00:00:00 2001 From: wangguixi Date: Fri, 21 Nov 2025 10:57:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BC=98=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E9=80=A0=E6=88=90=E7=9A=84=E5=B0=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Knowledge_Test_Go/api/v1/questionBank.go | 10 +++++----- Knowledge_Test_Go/internal/controller/questionBank.go | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Knowledge_Test_Go/api/v1/questionBank.go b/Knowledge_Test_Go/api/v1/questionBank.go index fffdf11..d9cd1ea 100644 --- a/Knowledge_Test_Go/api/v1/questionBank.go +++ b/Knowledge_Test_Go/api/v1/questionBank.go @@ -127,11 +127,11 @@ type UserScoreOutputRes struct { // UserScoreOutputReq 获取用户成绩列表请求 type UserScoreOutputReq struct { - UserName string `json:"user_name"` // 用户名(精准查询) - UserIdentity string `json:"user_identity"` // 用户身份(过滤) - Jwcode string `json:"jwcode" v:"integer|length:8"` // 精网号(精准查询) - StartTime string `json:"start_time"` // 开始时间(提交时间范围) - EndTime string `json:"end_time"` // 结束时间(提交时间范围) + UserName string `json:"user_name"` // 用户名(精准查询) + UserIdentity string `json:"user_identity"` // 用户身份(过滤) + Jwcode string `json:"jwcode" v:"integer|length:8,8"` // 精网号(精准查询) + StartTime string `json:"start_time"` // 开始时间(提交时间范围) + EndTime string `json:"end_time"` // 结束时间(提交时间范围) Page int `json:"page"` PageSize int `json:"page_size"` SortField string `json:"sort_field"` // 排序字段:score, created_at diff --git a/Knowledge_Test_Go/internal/controller/questionBank.go b/Knowledge_Test_Go/internal/controller/questionBank.go index 4c9ec21..4b7bf7a 100644 --- a/Knowledge_Test_Go/internal/controller/questionBank.go +++ b/Knowledge_Test_Go/internal/controller/questionBank.go @@ -104,6 +104,7 @@ func (c *CQuestionBank) ExportQuestion(r *ghttp.Request) { var req *v1.QuestionOutputReq if err := r.Parse(&req); err != nil { response.JsonExit(r, 400, err.Error()) + return } service.QuestionBank().ExportQuestion(r, ctx, req) } @@ -116,7 +117,6 @@ func (c *CQuestionBank) ExportUserScore(r *ghttp.Request) { response.JsonExit(r, 400, err.Error()) return } - // 调用服务层的导出方法 service.QuestionBank().ExportUserScore(r, ctx, req) }