|
|
@@ -35,6 +35,13 @@ func (c *Controller) GetAllCourse(r *ghttp.Request) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if classId := r.GetInt("ClassId"); classId != 0 {
|
|
|
+ if where == "" {
|
|
|
+ where = fmt.Sprintf(" ClassId LIKE '%%%v%%'", classId)
|
|
|
+ } else {
|
|
|
+ where += fmt.Sprintf(" AND ClassId LIKE '%%%v%%'", classId)
|
|
|
+ }
|
|
|
+ }
|
|
|
var result []course.Entity
|
|
|
if err := course.GetAllCourse(page, where, &result); err != nil {
|
|
|
if err.Error() == "sql: no rows in result set" {
|