From 5cca4e05e657c34d5e37e4dea9839b93cfc45358 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 11 Jul 2019 09:11:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BB=93=E6=9D=9F=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/sources_service.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/services/sources_service.rb b/app/services/sources_service.rb index 6d97acc8..aa95d382 100644 --- a/app/services/sources_service.rb +++ b/app/services/sources_service.rb @@ -102,9 +102,10 @@ class SourcesService # games start ############################################ 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 - 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 def search_myshixun params