Browse Source

修改优化代码造成的小bug

master
wangguixi 2 months ago
parent
commit
3d850e4603
  1. 10
      Knowledge_Test_Go/api/v1/questionBank.go
  2. 2
      Knowledge_Test_Go/internal/controller/questionBank.go

10
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

2
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)
}
Loading…
Cancel
Save