|
|
|
@ -9,14 +9,14 @@ import ( |
|
|
|
"github.com/gogf/gf/v2/net/ghttp" |
|
|
|
) |
|
|
|
|
|
|
|
type cQuestionBank struct{} |
|
|
|
type CQuestionBank struct{} |
|
|
|
|
|
|
|
func NewQuestionBank() *cQuestionBank { |
|
|
|
return &cQuestionBank{} |
|
|
|
func NewQuestionBank() *CQuestionBank { |
|
|
|
return &CQuestionBank{} |
|
|
|
} |
|
|
|
|
|
|
|
// GetQuestions 获取题目列表
|
|
|
|
func (c *cQuestionBank) GetQuestions(r *ghttp.Request) { |
|
|
|
func (c *CQuestionBank) GetQuestions(r *ghttp.Request) { |
|
|
|
ctx := r.GetCtx() |
|
|
|
var req *v1.QuestionOutputReq |
|
|
|
if err := r.Parse(&req); err != nil { |
|
|
|
@ -33,7 +33,7 @@ func (c *cQuestionBank) GetQuestions(r *ghttp.Request) { |
|
|
|
} |
|
|
|
|
|
|
|
// QuestionUpdate 获取题目列表
|
|
|
|
func (c *cQuestionBank) QuestionUpdate(r *ghttp.Request) { |
|
|
|
func (c *CQuestionBank) QuestionUpdate(r *ghttp.Request) { |
|
|
|
ctx := r.GetCtx() |
|
|
|
var req *v1.QuestionUpdateReq |
|
|
|
if err := r.Parse(&req); err != nil { |
|
|
|
@ -49,7 +49,7 @@ func (c *cQuestionBank) QuestionUpdate(r *ghttp.Request) { |
|
|
|
} |
|
|
|
|
|
|
|
// QuestionDel 删除题目
|
|
|
|
func (c *cQuestionBank) QuestionDel(r *ghttp.Request) { |
|
|
|
func (c *CQuestionBank) QuestionDel(r *ghttp.Request) { |
|
|
|
ctx := r.GetCtx() |
|
|
|
var req *v1.QuestionDelReq |
|
|
|
if err := r.Parse(&req); err != nil { |
|
|
|
@ -65,7 +65,7 @@ func (c *cQuestionBank) QuestionDel(r *ghttp.Request) { |
|
|
|
} |
|
|
|
|
|
|
|
// UserScoreOutput 获取用户成绩列表
|
|
|
|
func (c *cQuestionBank) UserScoreOutput(r *ghttp.Request) { |
|
|
|
func (c *CQuestionBank) UserScoreOutput(r *ghttp.Request) { |
|
|
|
ctx := r.GetCtx() |
|
|
|
var req *v1.UserScoreOutputReq |
|
|
|
if err := r.Parse(&req); err != nil { |
|
|
|
@ -82,7 +82,7 @@ func (c *cQuestionBank) UserScoreOutput(r *ghttp.Request) { |
|
|
|
} |
|
|
|
|
|
|
|
// ErrorOutPutUser 错题统计出错用户
|
|
|
|
func (c *cQuestionBank) ErrorOutPutUser(r *ghttp.Request) { |
|
|
|
func (c *CQuestionBank) ErrorOutPutUser(r *ghttp.Request) { |
|
|
|
ctx := r.GetCtx() |
|
|
|
var req *v1.ErrorOutPutUserReq |
|
|
|
if err := r.Parse(&req); err != nil { |
|
|
|
@ -99,7 +99,7 @@ func (c *cQuestionBank) ErrorOutPutUser(r *ghttp.Request) { |
|
|
|
} |
|
|
|
|
|
|
|
// ExportQuestion 导出题目数据到 Excel
|
|
|
|
func (c *cQuestionBank) ExportQuestion(r *ghttp.Request) { |
|
|
|
func (c *CQuestionBank) ExportQuestion(r *ghttp.Request) { |
|
|
|
ctx := r.GetCtx() |
|
|
|
var req *v1.QuestionOutputReq |
|
|
|
if err := r.Parse(&req); err != nil { |
|
|
|
@ -109,7 +109,7 @@ func (c *cQuestionBank) ExportQuestion(r *ghttp.Request) { |
|
|
|
} |
|
|
|
|
|
|
|
// ExportUserScore 导出用户成绩到 Excel
|
|
|
|
func (c *cQuestionBank) ExportUserScore(r *ghttp.Request) { |
|
|
|
func (c *CQuestionBank) ExportUserScore(r *ghttp.Request) { |
|
|
|
ctx := r.GetCtx() |
|
|
|
var req *v1.UserScoreOutputReq |
|
|
|
if err := r.Parse(&req); err != nil { |
|
|
|
|