fix: 纪念日接口修复

This commit is contained in:
裴浩宇 2024-05-15 16:21:34 +08:00
parent 3992e02eef
commit e03e1e2f53

View File

@ -31,7 +31,15 @@
<include refid="selectPxCommemorationDayVo"/>
<where>
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="date != null ">and date = #{date}</if>
<if test="date != null">
and ( `repeat` = 1 and date_format(date,'%m') in ( date_format(#{date},'%m'),
date_format(DATE_SUB(#{date}, INTERVAL 1 MONTH),'%m'),
date_format(DATE_SUB(#{date}, INTERVAL -1 MONTH),'%m')
))or (`repeat` = 0 and date_format(date,'%Y-%m') in ( date_format(#{date},'%Y-%m'),
date_format(DATE_SUB(#{date}, INTERVAL 1 MONTH),'%Y-%m'),
date_format(DATE_SUB(#{date}, INTERVAL -1 MONTH),'%Y-%m')
))
</if>
<if test="orderNum != null ">and order_num = #{orderNum}</if>
<if test="version != null and version != ''">and version = #{version}</if>
and del_flag = '0'