增加 记录问答题库打开次数
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/goccy/go-json"
|
||||
"gorm.io/gorm"
|
||||
"knowledge/api/dao"
|
||||
"knowledge/api/model"
|
||||
"knowledge/api/requests"
|
||||
@@ -556,3 +557,14 @@ func (r *QuestionQaService) PutQuestionQaRule(qaId int64, req requests.PutQuesti
|
||||
tx.Commit()
|
||||
return true, nil
|
||||
}
|
||||
|
||||
// RecordQuestionQaOpenNum 记录问答题库打开次数
|
||||
func (r *QuestionQaService) RecordQuestionQaOpenNum(tx *gorm.DB, qaId int64) error {
|
||||
questionQaDao := dao.QuestionQaDao{}
|
||||
err := questionQaDao.Inc(tx, qaId, "open_number", 1)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user