<!--集合[begin,end] 后简称集合 A 月份以2月份为例-->
<!--2月份集合为[2013-03-01,2013-03-31] 后简称为集合B 必须保证[begin,end]与[2013-03-01,2013-03-31]两个集合之间 -->
<!--存在交集 ,between and是个闭区间 也就是包括等号 如下sql条件控制-->
<!--1.A是B的子集 此时 begin>2013-03-01并且end<2013-0-31-->
<!--2.B是A的子集 此时 begin<2013-03-01并且end>2013-0-31-->
<!--3.B与A存在交集,但不是子集的关系 此时 begin=<2013-03-01<=end 或者 begin=<2013<=end-->
((to_date(#{monthFirstDay}, 'yyyy-mm-dd') between
to_date(adp.createfunddate, 'yyyy-mm-dd') and
to_date(adp.closefunddate, 'yyyy-mm-dd'))or (to_date(#{monthLastDay}, 'yyyy-mm-dd') between
to_date(adp.createfunddate, 'yyyy-mm-dd') and
to_date(adp.closefunddate, 'yyyy-mm-dd'))
or (to_date(#{monthFirstDay}, 'yyyy-mm-dd') <
to_date(adp.createfunddate, 'yyyy-mm-dd') and
to_date(adp.closefunddate, 'yyyy-mm-dd') <
to_date(#{monthLastDay}, 'yyyy-mm-dd')))