From 4318293c1f2bb372dba2adf7d328c0e0bd870ecc Mon Sep 17 00:00:00 2001 From: yystopf Date: Tue, 14 Mar 2023 13:52:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=EF=BC=9A=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E8=8C=83=E5=9B=B4=E9=9C=80=E5=8C=85=E6=8B=AC=E4=B8=B4=E7=95=8C?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/api/v1/issues/list_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/api/v1/issues/list_service.rb b/app/services/api/v1/issues/list_service.rb index 0aeca052d..9804d63c2 100644 --- a/app/services/api/v1/issues/list_service.rb +++ b/app/services/api/v1/issues/list_service.rb @@ -71,7 +71,7 @@ class Api::V1::Issues::ListService < ApplicationService issues = issues.where(status_id: status_id) if status_id.present? if begin_date&.present? || end_date&.present? - issues = issues.where("issues.created_on between ? and ?",begin_date&.present? ? begin_date.to_date : Time.now.to_date, end_date&.present? ? end_date.to_date : Time.now.to_date) + issues = issues.where("issues.created_on between ? and ?", begin_date&.present? ? begin_date.to_time : Time.now.beginning_of_day, end_date&.present? ? end_date.to_time.end_of_day : Time.now.end_of_day) end # keyword