xiaoyong931011
2021-04-23 d4488a987cccd3ddd51a202a9f8aa71d3cdcbced
src/main/resources/mapper/modules/ContractHoldOrderMapper.xml
@@ -18,16 +18,16 @@
                    and opening_type=#{record.openType}
                </if>
                <if test='record.timeType=="1"'>
                    and TO_DAYS(create_time) = TO_DAYS(NOW())
                    and TO_DAYS(a.create_time) = TO_DAYS(NOW())
                </if>
                <if test='record.timeType=="2"'>
                    and TO_DAYS(NOW()) - TO_DAYS(create_time) = 1
                    and TO_DAYS(NOW()) - TO_DAYS(a.create_time) = 1
                </if>
                <if test='record.timeType=="3"'>
                    and YEARWEEK(date_format(create_time,'%Y-%m-%d')) = YEARWEEK(now())
                    and YEARWEEK(date_format(a.create_time,'%Y-%m-%d')) = YEARWEEK(now())
                </if>
                <if test='record.timeType=="4"'>
                    and DATE_FORMAT(create_time, '%Y%m' ) = DATE_FORMAT( CURDATE() , '%Y%m' )
                    and DATE_FORMAT(a.create_time, '%Y%m' ) = DATE_FORMAT( CURDATE() , '%Y%m' )
                </if>
            </if>
        </where>