2
This commit is contained in:
@@ -333,7 +333,6 @@ func (r *QuestionQaService) PutQuestionQa(qaId int64, req requests.PutQuestionQa
|
||||
return false, err
|
||||
}
|
||||
|
||||
fmt.Println(1111)
|
||||
// 题目数量
|
||||
if qaQuantity != questionQa.QaQuantity {
|
||||
if req.Action == 1 {
|
||||
@@ -342,6 +341,15 @@ func (r *QuestionQaService) PutQuestionQa(qaId int64, req requests.PutQuestionQa
|
||||
}
|
||||
|
||||
questionQaData["qa_quantity"] = req.QaQuantity
|
||||
|
||||
if req.QaType == 2 {
|
||||
questionQaData["token_num"] = req.TokenNum
|
||||
}
|
||||
|
||||
if req.QaType == 3 {
|
||||
questionQaData["token_num"] = req.TokenNum
|
||||
questionQaData["round_num"] = req.RoundNum
|
||||
}
|
||||
}
|
||||
|
||||
// 处理题库明细-需重新生成时才会检测明细
|
||||
@@ -802,10 +810,6 @@ func (r *QuestionQaService) CheckPutQaQuestionQuantity(req requests.PutQuestionQ
|
||||
|
||||
quantity := content.Quantity * *req.TokenNum * *req.RoundNum
|
||||
|
||||
fmt.Println(utils.QuestionType(content.QuestionType))
|
||||
fmt.Println(quantity)
|
||||
fmt.Println(req.QuestionQaItem)
|
||||
fmt.Println(itemQuantity)
|
||||
if quantity > itemQuantity {
|
||||
return qaQuantity, errors.New(utils.QuestionType(content.QuestionType) + "数量不足")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user