增加结束时间

project_pack
daiao 5 years ago
parent f7a2057433
commit 5cca4e05e6

@ -102,9 +102,10 @@ class SourcesService
# games start ############################################ # games start ############################################
def myshixuns_index params def myshixuns_index params
time = Time.parse(params[:time].to_s) endTime = Time.parse(params[:time].to_s)
beginTime = Time.parse(params[:begin_time].to_s)
offset = ((params[:page] || 1).to_i - 1) * 50 offset = ((params[:page] || 1).to_i - 1) * 50
Myshixun.select([:id, :user_id, :shixun_id]).where("created_at < ?", time).offset(offset).limit(50) Myshixun.select([:id, :user_id, :shixun_id]).where("created_at < ? and created_at > ?", endTime, beginTime).offset(offset).limit(50)
end end
def search_myshixun params def search_myshixun params

Loading…
Cancel
Save