|
|
@ -33,6 +33,10 @@ class ShixunSearchService < ApplicationService
|
|
|
|
@shixuns = status == "published" ? @shixuns.where(status: 2) : @shixuns.where(status: [0, 1])
|
|
|
|
@shixuns = status == "published" ? @shixuns.where(status: 2) : @shixuns.where(status: [0, 1])
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if params[:no_jupyter]
|
|
|
|
|
|
|
|
@shixuns = @shixuns.where(is_jupyter: 0)
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
## 筛选 难度
|
|
|
|
## 筛选 难度
|
|
|
|
if params[:diff].present? && params[:diff].to_i != 0
|
|
|
|
if params[:diff].present? && params[:diff].to_i != 0
|
|
|
|
@shixuns = @shixuns.where(trainee: params[:diff])
|
|
|
|
@shixuns = @shixuns.where(trainee: params[:diff])
|
|
|
|