From 97a200831571d1ef66622fe2fb9a994cd7bbe9a1 Mon Sep 17 00:00:00 2001 From: YOSHIDA Hiroki Date: Thu, 14 Mar 2013 11:20:20 +0900 Subject: [PATCH] =?utf8?q?=E3=83=A1=E3=83=AB=E3=83=9E=E3=82=AC=E9=85=8D?= =?utf8?q?=E4=BF=A1=E5=85=88=E6=A4=9C=E7=B4=A2:=20=E9=A1=A7=E5=AE=A2?= =?utf8?q?=E5=90=8D(=E3=82=AB=E3=83=8A)=E3=81=A8=E6=9C=80=E7=B5=82?= =?utf8?q?=E8=B3=BC=E5=85=A5=E6=97=A5=E3=81=A7=E6=AD=A3=E3=81=97=E3=81=8F?= =?utf8?q?=E6=A4=9C=E7=B4=A2=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=84=E4=B8=8D?= =?utf8?q?=E5=85=B7=E5=90=88=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- app/models/mail_magazine.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/mail_magazine.rb b/app/models/mail_magazine.rb index 3f5de86..075abc6 100644 --- a/app/models/mail_magazine.rb +++ b/app/models/mail_magazine.rb @@ -189,7 +189,7 @@ and c.activate = 2 to = condition.updated_at_to unless from.blank? && to.blank? if !from.blank? && !to.blank? - "and #{MergeAdapterUtil.convert_time_to_yyyymmdd('c.updated_at')} >= '#{from.strftime("%Y%m%d")}' + "and (#{MergeAdapterUtil.convert_time_to_yyyymmdd('c.updated_at')} >= '#{from.strftime("%Y%m%d")}' and #{MergeAdapterUtil.convert_time_to_yyyymmdd('c.updated_at')} <= '#{to.strftime("%Y%m%d")}')" elsif !from.blank? "and #{MergeAdapterUtil.convert_time_to_yyyymmdd('c.updated_at')} >= '#{from.strftime("%Y%m%d")}'" @@ -200,10 +200,10 @@ and c.activate = 2 } #{ from = condition.last_order_from - to = condition.last_order_from + to = condition.last_order_to unless from.blank? && to.blank? if !from.blank? && !to.blank? - "and #{MergeAdapterUtil.convert_time_to_yyyymmdd('last_order_at')} >= '#{from.strftime("%Y%m%d")}' + "and (#{MergeAdapterUtil.convert_time_to_yyyymmdd('last_order_at')} >= '#{from.strftime("%Y%m%d")}' and #{MergeAdapterUtil.convert_time_to_yyyymmdd('last_order_at')} <= '#{to.strftime("%Y%m%d")}')" elsif !from.blank? "and #{MergeAdapterUtil.convert_time_to_yyyymmdd('last_order_at')} >= '#{from.strftime("%Y%m%d")}'" -- 2.11.0