Commit 9a93ed71 authored by szh's avatar szh

update

parent 843813b9
......@@ -77,17 +77,19 @@ func (courseListService *CourseListService)GetCourseListInfoList(info courseReq.
return
}
for _, v := range courseLists {
var cs course.CourseList
err = global.GVA_DB.Debug().Model(&course.CourseSignup{}).Where("uid = ? and cid = ?",cu.ID,v.ID).First(&cs).Error
var cs course.CourseSignup
err = global.GVA_DB.Model(&course.CourseSignup{}).Where("uid = ? and cid = ?",cu.ID,v.ID).First(&cs).Error
if err != nil && err != gorm.ErrRecordNotFound{
return
}
if err == nil && cs.IsPass {
if err == nil && *cs.IsPass{
v.IsSign = true
v.IsPass = true
} else if err == nil && !cs.IsPass {
} else if err == nil && !*cs.IsPass {
v.IsSign = true
v.IsPass = false
}
}
}
return courseLists, total, err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment