Documentation
¶
Index ¶
- func AverageFinishScore(userId int64) (float64, error)
- func CountArbitramentFinishNumberByQuestionId(questionId int64) (count int64, err error)
- func CountArbitramentUnFinishNumberByQuestionId(questionId int64) (count int64, err error)
- func CountFailTestNumberByUserId(userId int64, questionId int64) (count int64, err error)
- func CountFinishScoreNumberByQuestionId(questionId int64) (count int64, err error)
- func CountFirstScoreNumberByQuestionId(questionId int64) (int64, error)
- func CountProblemFinishNumberByQuestionId(questionId int64) (count int64, err error)
- func CountProblemNumberByQuestionId(questionId int64) (count int64)
- func CountProblemUnFinishNumberByQuestionId(questionId int64) (count int64, err error)
- func CountRemainingTestNumberByUserId(questionId int64, userId int64) (count int64, err error)
- func CountSecondScoreNumberByQuestionId(questionId int64) (count int64, err error)
- func CountSelfScore(userId int64, questionId int64) (count int64, err error)
- func CountTestByScore(question int64, score int64) (count int64, err1 error)
- func CountTestScoreNumberByUserId(userId int64, questionId int64) (count int64, err1 error)
- func CountThirdScoreNumberByQuestionId(questionId int64) (count int64, err error)
- func CountUnScoreTestNumberByQuestionId(questionId int64) (count int64, err error)
- func CreatePaperGroup(group *PaperGroup) error
- func CreateUserPaperGroup(userId int64, groupId int64) error
- func DeleteAllTest(questionId int64) error
- func DeleteUnderCorrectedPaperByUserId(userId int64) error
- func FindAllArbitramentUnderCorrectedPaper(arbitramentUnderCorrectedPaper *[]UnderCorrectedPaper, questionId int64) error
- func FindArbitramentUnderCorrectedPaperByQuestionId(arbitramentUnderCorrectedPaper *[]UnderCorrectedPaper, questionId int64) error
- func FindFinishScoreByQuestionId(finishScores *[]ScoreRecord, questionId int64) error
- func FindFinishScoreRecordListByQuestionId(scoreRecordList *[]ScoreRecord, questionId int64) error
- func FindFinishTestByUserId(scoreRecord *[]ScoreRecord, userId int64, questionId int64) error
- func FindNewUserId(id1 int64, id2 int64, questionId int64) (newId int64)
- func FindProblemUnderCorrectedList(problemUnderCorrectedPaper *[]UnderCorrectedPaper) error
- func FindProblemUnderCorrectedPaperByQuestionId(problemUnderCorrectedPaper *[]UnderCorrectedPaper, questionId int64) error
- func FindSelfMarkPaperByQuestionId(selfMarkUnderCorrectedPaper *[]UnderCorrectedPaper, questionId int64) error
- func FindSelfScoreRecordByUserId(selfScoreRecord *[]ScoreRecord, examinerId int64) error
- func FindSelfUnderCorrectedPaperByQuestionId(selfUnderCorrectedPaper *[]UnderCorrectedPaper, questionId int64) error
- func FindSubTopicsByQuestionId(id int64, st *[]SubTopic) error
- func FindSubjectList(subjects *[]Subject) error
- func FindTestPaperByQuestionId(questionId int64, t *[]TestPaper) error
- func FindTestPaperInfoByQuestionDetailId(questionDetailId int64, t *[]*TestPaperInfo) error
- func FindTestPapersByTestId(testId, t *[]TestPaper) error
- func FindTopicBySubNameList(topics *[]Topic, subjectName string) error
- func FindTopicList(topics *[]Topic) error
- func FindUserNumberByQuestionId(users *[]User, questionId int64) error
- func GetDistributedPaperByUserId(id string, up *[]UnderCorrectedPaper) error
- func GetDistributedTestIdPaperByUserId(id int64, up *[]int64) error
- func GetLatestRecords(userId int64, records *[]ScoreRecord) error
- func GetSelfScorePaperByTestQuestionTypeAndTestId(underCorrectedPaper *UnderCorrectedPaper, testId int64, userId int64) error
- func GetSubTopicsByTestId(id int64, st *[]SubTopic) error
- func GetSubjectById(id int64) (string, error)
- func GetSubjectBySubjectName(subject *Subject, subjectName string) (bool, error)
- func GetTestInfoListByTestId(id int64, as *[]TestPaperInfo) error
- func GetTestInfoPicListByTestId(id int64, as *[]string) error
- func GetTestPaperListByQuestionIdAndQuestionStatus(questionId int64, questionStatue int64, tl *[]TestPaper) error
- func GetTestPaperTeachingScoreById(id int64) (int64, error)
- func GetTestScoreRecordByTestIdAndUserId(testScoreRecord *ScoreRecord, testId int64, examinerId string) error
- func GetTopicList(topics *[]Topic) error
- func GetUnMarkSelfTestIdPaperByUserId(id int64, up *[]int64) error
- func GetUnderCorrectedPaperByUserIdAndTestId(underCorrectedPaper *UnderCorrectedPaper, userId int64, testId int64) error
- func GetUnderCorrectedSupervisorPaperByTestQuestionTypeAndTestId(underCorrectedPaper *UnderCorrectedPaper, testId int64) error
- func InitAdapter()
- func InitConfig()
- func InsertSubTopic(subTopic *SubTopic) error
- func InsertSubject(subject *Subject) (error, int64)
- func InsertTopic(topic *Topic) (err1 error, questionId int64)
- func ListSchools() ([]string, error)
- func ListTeacherScoreByTestIds(userId int64, testIds []int64) ([]int64, error)
- func SumFinishScore(userId int64, questionId int64) (sum float64, err1 error)
- type Adapter
- type PaperGroup
- type ScoreRecord
- type SubTopic
- type Subject
- type TestPaper
- func (t *TestPaper) GetTestPaper(id int64) (bool, error)
- func (t *TestPaper) GetTestPaperByQuestionIdAndQuestionStatus(questionId int64, questionStatue int64) error
- func (t *TestPaper) GetTestPaperByTestId(testId int64) error
- func (t *TestPaper) Insert() (int64, error)
- func (t *TestPaper) Update() error
- func (t *TestPaper) UpdateCols(columns ...string) error
- type TestPaperInfo
- type Topic
- type UnderCorrectedPaper
- func (u *UnderCorrectedPaper) Delete() error
- func (u *UnderCorrectedPaper) GetUnderCorrectedPaper(userId int64, testId int64) error
- func (u *UnderCorrectedPaper) IsDuplicate() (bool, error)
- func (u *UnderCorrectedPaper) Save() error
- func (u *UnderCorrectedPaper) SelfMarkDelete() error
- func (u *UnderCorrectedPaper) SupervisorDelete() error
- type User
- type UserPaperGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AverageFinishScore ¶
func CountTestByScore ¶
func CreatePaperGroup ¶
func CreatePaperGroup(group *PaperGroup) error
func CreateUserPaperGroup ¶
func DeleteAllTest ¶
func FindAllArbitramentUnderCorrectedPaper ¶
func FindAllArbitramentUnderCorrectedPaper(arbitramentUnderCorrectedPaper *[]UnderCorrectedPaper, questionId int64) error
func FindArbitramentUnderCorrectedPaperByQuestionId ¶
func FindArbitramentUnderCorrectedPaperByQuestionId(arbitramentUnderCorrectedPaper *[]UnderCorrectedPaper, questionId int64) error
func FindFinishScoreByQuestionId ¶
func FindFinishScoreByQuestionId(finishScores *[]ScoreRecord, questionId int64) error
func FindFinishScoreRecordListByQuestionId ¶
func FindFinishScoreRecordListByQuestionId(scoreRecordList *[]ScoreRecord, questionId int64) error
func FindFinishTestByUserId ¶
func FindFinishTestByUserId(scoreRecord *[]ScoreRecord, userId int64, questionId int64) error
func FindProblemUnderCorrectedList ¶
func FindProblemUnderCorrectedList(problemUnderCorrectedPaper *[]UnderCorrectedPaper) error
func FindProblemUnderCorrectedPaperByQuestionId ¶
func FindProblemUnderCorrectedPaperByQuestionId(problemUnderCorrectedPaper *[]UnderCorrectedPaper, questionId int64) error
func FindSelfMarkPaperByQuestionId ¶
func FindSelfMarkPaperByQuestionId(selfMarkUnderCorrectedPaper *[]UnderCorrectedPaper, questionId int64) error
func FindSelfScoreRecordByUserId ¶
func FindSelfScoreRecordByUserId(selfScoreRecord *[]ScoreRecord, examinerId int64) error
func FindSelfUnderCorrectedPaperByQuestionId ¶
func FindSelfUnderCorrectedPaperByQuestionId(selfUnderCorrectedPaper *[]UnderCorrectedPaper, questionId int64) error
func FindSubjectList ¶
func FindTestPaperInfoByQuestionDetailId ¶
func FindTestPaperInfoByQuestionDetailId(questionDetailId int64, t *[]*TestPaperInfo) error
func FindTestPapersByTestId ¶
func FindTopicBySubNameList ¶
func FindTopicList ¶
func GetDistributedPaperByUserId ¶
func GetDistributedPaperByUserId(id string, up *[]UnderCorrectedPaper) error
func GetLatestRecords ¶
func GetLatestRecords(userId int64, records *[]ScoreRecord) error
func GetSelfScorePaperByTestQuestionTypeAndTestId ¶
func GetSelfScorePaperByTestQuestionTypeAndTestId(underCorrectedPaper *UnderCorrectedPaper, testId int64, userId int64) error
func GetSubTopicsByTestId ¶
func GetSubjectById ¶
func GetSubjectBySubjectName ¶
func GetTestInfoListByTestId ¶
func GetTestInfoListByTestId(id int64, as *[]TestPaperInfo) error
func GetTestScoreRecordByTestIdAndUserId ¶
func GetTestScoreRecordByTestIdAndUserId(testScoreRecord *ScoreRecord, testId int64, examinerId string) error
func GetTopicList ¶
func GetUnderCorrectedPaperByUserIdAndTestId ¶
func GetUnderCorrectedPaperByUserIdAndTestId(underCorrectedPaper *UnderCorrectedPaper, userId int64, testId int64) error
func GetUnderCorrectedSupervisorPaperByTestQuestionTypeAndTestId ¶
func GetUnderCorrectedSupervisorPaperByTestQuestionTypeAndTestId(underCorrectedPaper *UnderCorrectedPaper, testId int64) error
func InitAdapter ¶
func InitAdapter()
func InitConfig ¶
func InitConfig()
func InsertSubTopic ¶
func InsertSubject ¶
func InsertTopic ¶
func ListSchools ¶
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter represents the MySQL x for policy storage.
func NewAdapter ¶
NewAdapter is the constructor for Adapter.
type PaperGroup ¶
type PaperGroup struct {
Id int64 `json:"id" xorm:"pk autoincr"`
GroupName string `json:"group_name"`
TestIds []int64 `json:"test_ids"`
QuestionId int64 `json:"question_id"`
}
func GetGroupByGroupId ¶
func GetGroupByGroupId(id int64) (*PaperGroup, error)
func GetGroupThanLastId ¶
func GetGroupThanLastId(id int64, questionId int64) (*PaperGroup, bool, error)
func ListPaperGroup ¶
func ListPaperGroup() ([]*PaperGroup, error)
func (*PaperGroup) Update ¶
func (p *PaperGroup) Update() error
type ScoreRecord ¶
type ScoreRecord struct {
RecordId int64 `json:"record_id" xorm:"pk autoincr"`
QuestionId int64 `json:"question_id"`
TestId int64 `json:"test_id"`
UserId int64 `json:"user_id"`
ScoreTime time.Time `json:"score_time"`
Score int64 `json:"score"`
TestRecordType int64 `json:"test_record_type"`
ProblemType int64 `json:"problem_type" xorm:"default(-1)"`
TestFinish int64 `json:"test_finish"`
}
func GetRecordByTestId ¶
func GetRecordByTestId(testId int64) (*ScoreRecord, error)
func ListScoreRecordByUserId ¶
func ListScoreRecordByUserId(userId int64) ([]ScoreRecord, error)
func ListUserScoreRecord ¶
func ListUserScoreRecord(userId int64) ([]ScoreRecord, error)
func (*ScoreRecord) GetRecordByTestId ¶
func (s *ScoreRecord) GetRecordByTestId(testId int64, userId int64) error
func (*ScoreRecord) GetTopic ¶
func (s *ScoreRecord) GetTopic(id int64) error
func (*ScoreRecord) Save ¶
func (s *ScoreRecord) Save() error
func (*ScoreRecord) Update ¶
func (s *ScoreRecord) Update() error
type SubTopic ¶
type SubTopic struct {
QuestionDetailId int64 `json:"question_detail_id" xorm:"pk autoincr"`
QuestionDetailName string `json:"question_detail_name"`
QuestionId int64 `json:"question_id"`
QuestionDetailScore int64 `json:"question_detail_score"`
ScoreType string `json:"score_type"`
IsSecondScore bool `json:"is_second_score"`
}
func (*SubTopic) GetSubTopic ¶
type TestPaper ¶
type TestPaper struct {
TestId int64 `json:"test_id" xorm:"pk autoincr"`
QuestionId int64 `json:"question_id"`
Candidate string `json:"candidate"`
QuestionStatus int64 `json:"question_status"`
ExaminerFirstId int64 `json:"examiner_first_id" xorm:"default(-1)"`
ExaminerFirstScore int64 `json:"examiner_first_score" xorm:"default(-1)"`
ExaminerFirstSelfScore int64 `json:"examiner_first_self_score" xorm:"default(-1)"`
ExaminerSecondId int64 `json:"examiner_second_id" xorm:"default(-1)"`
ExaminerSecondScore int64 `json:"examiner_second_score" xorm:"default(-1)"`
ExaminerSecondSelfScore int64 `json:"examiner_second_self_score" xorm:"default(-1)"`
ExaminerThirdId int64 `json:"examiner_third_id" xorm:"default(-1)"`
ExaminerThirdScore int64 `json:"examiner_third_score" xorm:"default(-1)"`
ExaminerThirdSelfScore int64 `json:"examiner_third_self_score" xorm:"default(-1)"`
LeaderId int64 `json:"leader_id" xorm:"default(-1)"`
LeaderScore int64 `json:"leader_score" xorm:"default(-1)"`
FinalScore int64 `json:"final_score" xorm:"default(-1)" `
FinalScoreId int64 `json:"finale_score_id"`
PracticeError int64 `json:"practice_error"`
CorrectingNumber int64 `json:"correcting_number"`
Mobile string `json:"mobile"`
IsParent int64 `json:"is_parent"`
ClientIp string `json:"client_ip"`
Tag string `json:"tag"`
School string `json:"school"`
TicketId string `json:"ticket_id"`
TeachingScore int64 `json:"teaching_score"`
}
func (*TestPaper) GetTestPaperByQuestionIdAndQuestionStatus ¶
func (*TestPaper) GetTestPaperByTestId ¶
func (*TestPaper) UpdateCols ¶
type TestPaperInfo ¶
type TestPaperInfo struct {
TestDetailId int64 `json:"test_detail_id" xorm:"pk autoincr"`
QuestionDetailId int64 `json:"question_detail_id"`
TestId int64 `json:"test_id"`
PicSrc string `json:"pic_src"`
ExaminerFirstId int64 `json:"examiner_first_id" xorm:"default(-1)"`
ExaminerFirstScore int64 `json:"examiner_first_score" xorm:"default(-1)"`
ExaminerFirstSelfScore int64 `json:"examiner_first_self_score" xorm:"default(-1)"`
ExaminerSecondId int64 `json:"examiner_second_id" xorm:"default(-1)"`
ExaminerSecondScore int64 `json:"examiner_second_score" xorm:"default(-1)"`
ExaminerSecondSelfScore int64 `json:"examiner_second_self_score" xorm:"default(-1)"`
ExaminerThirdId int64 `json:"examiner_third_id" xorm:"default(-1)"`
ExaminerThirdScore int64 `json:"examiner_third_score" xorm:"default(-1)"`
ExaminerThirdSelfScore int64 `json:"examiner_third_self_score" xorm:"default(-1)"`
LeaderId int64 `json:"leader_id" xorm:"default(-1)"`
LeaderScore int64 `json:"leader_score" xorm:"default(-1)"`
FinalScore int64 `json:"finale_score" xorm:"default(-1)"`
FinalScoreId int64 `json:"final_score_id" xorm:"default(-1)"`
TicketId string `json:"ticket_id"`
}
func FindTestPaperInfoByTicketId ¶
func FindTestPaperInfoByTicketId(ticketId string) ([]*TestPaperInfo, error)
func (*TestPaperInfo) Delete ¶
func (t *TestPaperInfo) Delete() error
func (*TestPaperInfo) GetTestPaperInfo ¶
func (t *TestPaperInfo) GetTestPaperInfo(id int64) error
func (*TestPaperInfo) GetTestPaperInfoByTestIdAndQuestionDetailId ¶
func (t *TestPaperInfo) GetTestPaperInfoByTestIdAndQuestionDetailId(testId int64, questionDetailId int64) error
func (*TestPaperInfo) Insert ¶
func (t *TestPaperInfo) Insert() error
func (*TestPaperInfo) Update ¶
func (t *TestPaperInfo) Update() error
type Topic ¶
type Topic struct {
QuestionId int64 `json:"question_id" xorm:"pk autoincr"`
QuestionName string `json:"question_name" xorm:"varchar(50)"`
SubjectName string `json:"subject_name" xorm:"varchar(50)"`
StandardError int64 `json:"standard_error"`
QuestionScore int64 `json:"question_score"`
ScoreType int64 `json:"score_type"`
ImportNumber int64 `json:"import_number"`
ImportTime string `json:"import_time"`
SubjectId int64 `json:"subject_id"`
SelfScoreRate int64 `json:"self_score_rate"`
}
Author: Junlang struct : Topic(大题) comment: must capitalize the first letter of the field in Topic
type UnderCorrectedPaper ¶
type UnderCorrectedPaper struct {
UnderCorrectedId int64 `json:"under_corrected_id" xorm:"pk autoincr"`
UserId int64 `json:"user_id"`
TestId int64 `json:"test_id"`
QuestionId int64 `json:"question_id"`
TestQuestionType int64 `json:"test_question_type"`
ProblemType int64 `json:"problem_type" xorm:"default(-1)"`
ProblemMessage string `json:"test_message"`
SelfScoreId int64 `json:"self_score_id"`
}
func (*UnderCorrectedPaper) Delete ¶
func (u *UnderCorrectedPaper) Delete() error
func (*UnderCorrectedPaper) GetUnderCorrectedPaper ¶
func (u *UnderCorrectedPaper) GetUnderCorrectedPaper(userId int64, testId int64) error
func (*UnderCorrectedPaper) IsDuplicate ¶
func (u *UnderCorrectedPaper) IsDuplicate() (bool, error)
func (*UnderCorrectedPaper) Save ¶
func (u *UnderCorrectedPaper) Save() error
func (*UnderCorrectedPaper) SelfMarkDelete ¶
func (u *UnderCorrectedPaper) SelfMarkDelete() error
func (*UnderCorrectedPaper) SupervisorDelete ¶
func (u *UnderCorrectedPaper) SupervisorDelete() error
type User ¶
type User struct {
UserId int64 `json:"user_id" xorm:"pk autoincr"`
Account string `json:"account"`
UserName string `json:"user_name"`
Password string `json:"password"`
LoginTime string `json:"login_time"`
ExistTime string `json:"exist_time"`
OnlineTime int64 `json:"online_time"`
SubjectName string `json:"subject_name"`
IsOnlineStatus bool `json:"is_online_status"`
QuestionId int64 `json:"question_id"`
UserType string `json:"user_type"`
IsQualified bool `json:"is_qualified"`
IsAttempt bool `json:"is_attempt"`
}
func GetLastUserBySubject ¶
func GetUserByAccount ¶
func (*User) UpdateCols ¶
type UserPaperGroup ¶
type UserPaperGroup struct {
Id int64 `json:"id" xorm:"pk autoincr"`
GroupId int64 `json:"group_id"`
UserId int64 `json:"user_id"`
}
func GetUserPaperGroupByUserId ¶
func GetUserPaperGroupByUserId(id int64) (*UserPaperGroup, bool, error)
func ListUserPaperGroupByGroupId ¶
func ListUserPaperGroupByGroupId(id int64) ([]*UserPaperGroup, error)
func (*UserPaperGroup) Update ¶
func (u *UserPaperGroup) Update() error
Click to show internal directories.
Click to hide internal directories.