|
@@ -2,16 +2,16 @@ package dao
|
|
|
|
|
|
import (
|
|
|
"database/sql"
|
|
|
- "encoding/json"
|
|
|
"exam_system/config"
|
|
|
"exam_system/entity"
|
|
|
|
|
|
"exam_system/result"
|
|
|
"exam_system/utils"
|
|
|
"exam_system/vo"
|
|
|
- "github.com/jmoiron/sqlx"
|
|
|
"strings"
|
|
|
"time"
|
|
|
+
|
|
|
+ "github.com/jmoiron/sqlx"
|
|
|
)
|
|
|
|
|
|
func ExamInfoList(page, size int, sort string, query map[string]interface{}, uid int) *result.Result {
|
|
@@ -215,13 +215,13 @@ func AddExam(e *entity.Exam) *result.Result {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- var data []byte
|
|
|
- data, err = json.Marshal(&e)
|
|
|
- if err != nil {
|
|
|
- return result.UNKNOW_ERROR.SetMsg(err.Error())
|
|
|
- }
|
|
|
+ // var data []byte
|
|
|
+ // data, err = json.Marshal(&e)
|
|
|
+ // if err != nil {
|
|
|
+ // return result.UNKNOW_ERROR.SetMsg(err.Error())
|
|
|
+ // }
|
|
|
// 用来判断考试过期的
|
|
|
- config.JS.PublishAsync("EXAMS.info", data)
|
|
|
+ // config.JS.PublishAsync("EXAMS.info", data)
|
|
|
|
|
|
return result.SuccessResult(examId)
|
|
|
})
|
|
@@ -426,13 +426,13 @@ func UpdateExam(e *entity.Exam) *result.Result {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- var data []byte
|
|
|
- data, err = json.Marshal(&e)
|
|
|
- if err != nil {
|
|
|
- return result.UNKNOW_ERROR.SetMsg(err.Error())
|
|
|
- }
|
|
|
- // 用来判断考试过期的
|
|
|
- config.JS.PublishAsync("EXAMS.info", data)
|
|
|
+ // var data []byte
|
|
|
+ // data, err = json.Marshal(&e)
|
|
|
+ // if err != nil {
|
|
|
+ // return result.UNKNOW_ERROR.SetMsg(err.Error())
|
|
|
+ // }
|
|
|
+ // // 用来判断考试过期的
|
|
|
+ // config.JS.PublishAsync("EXAMS.info", data)
|
|
|
|
|
|
return result.SuccessResult(result.NewResultChange(affected))
|
|
|
})
|