zk 2 жил өмнө
parent
commit
3aae44d6d1

+ 3 - 0
server/service/autocode/problem_type.go

@@ -61,6 +61,9 @@ func (problemTypeService *ProblemTypeService) GetProblemTypeInfoList(info autoCo
 	if info.SiteType != nil {
 		db.Where("site_type = ?", info.SiteType)
 	}
+	if info.Problem != "" {
+		db.Where("problem like ?", "%"+info.Problem+"%")
+	}
 	var problemTypes []autocode.ProblemType
 	// 如果有条件搜索 下方会自动创建搜索语句
 	err = db.Count(&total).Error