fix: 修复6个bug并接入CodeStable工作流
Bug修复: - GetWorkList 使用了错误的 RecordType (RecordStudy→RecordWork) - AllRecord handler 返回错误的分页信息 (page硬编码1, pageSize用RecordsCount) - CourseParse creditNode nil panic (加nil检查) - WebSocket CheckOrigin 安全漏洞 (release模式限制为同源) - math/rand 可预测 (替换为 crypto/rand) - GetDiscussList 未实现 (补全实现, 移除重复路由) 其他: - 接入 CodeStable 工作流体系 (codestable/ 骨架 + AGENTS.md) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -77,6 +77,44 @@ type StudyList struct {
|
||||
URL string `json:"url"`
|
||||
}
|
||||
|
||||
// 作业记录列表
|
||||
type WorkList struct {
|
||||
ID string `json:"id"`
|
||||
UserID any `json:"userId"`
|
||||
Title string `json:"title"`
|
||||
TopicNumber string `json:"topicNumber"`
|
||||
Score string `json:"score"`
|
||||
Type string `json:"type"`
|
||||
Remarks string `json:"remarks"`
|
||||
AddTime string `json:"addTime"`
|
||||
Sequence string `json:"sequence"`
|
||||
NodeID string `json:"nodeId"`
|
||||
CourseID string `json:"courseId"`
|
||||
StartTime string `json:"startTime"`
|
||||
EndTime string `json:"endTime"`
|
||||
PaperID string `json:"paperId"`
|
||||
CreateUserID string `json:"createUserId"`
|
||||
IsPrivate string `json:"isPrivate"`
|
||||
ClassList string `json:"classList"`
|
||||
TeacherType string `json:"teacherType"`
|
||||
Allow string `json:"allow"`
|
||||
Frequency string `json:"frequency"`
|
||||
ScoringRules string `json:"scoringRules"`
|
||||
HasCollect string `json:"hasCollect"`
|
||||
Lock any `json:"lock"`
|
||||
SchoolID string `json:"schoolId"`
|
||||
Parsing string `json:"parsing"`
|
||||
AddDate string `json:"addDate"`
|
||||
Name string `json:"name"`
|
||||
ChapterID string `json:"chapterId"`
|
||||
State string `json:"state"`
|
||||
SubmitTime string `json:"submitTime"`
|
||||
FinalScore string `json:"finalScore"`
|
||||
TypeName string `json:"typeName"`
|
||||
FinishTime string `json:"finishTime"`
|
||||
URL string `json:"url"`
|
||||
}
|
||||
|
||||
// 考试记录列表
|
||||
type ExamList struct {
|
||||
ID string `json:"id"`
|
||||
|
||||
Reference in New Issue
Block a user