Browse Source

更改:时间范围需包括临界值

pull/343/head
yystopf 3 years ago
parent
commit
4318293c1f
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/services/api/v1/issues/list_service.rb

+ 1
- 1
app/services/api/v1/issues/list_service.rb View File

@@ -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


Loading…
Cancel
Save