From e03e1e2f53544909ce5d7478ff2dc7c42c698e7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A3=B4=E6=B5=A9=E5=AE=87?= <617594538@qq.com> Date: Wed, 15 May 2024 16:21:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BA=AA=E5=BF=B5=E6=97=A5=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/PxCommemorationDayMapper.xml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pnkx-life/src/main/resources/mapper/PxCommemorationDayMapper.xml b/pnkx-life/src/main/resources/mapper/PxCommemorationDayMapper.xml index 3aafd53..70fd21b 100644 --- a/pnkx-life/src/main/resources/mapper/PxCommemorationDayMapper.xml +++ b/pnkx-life/src/main/resources/mapper/PxCommemorationDayMapper.xml @@ -31,7 +31,15 @@ and name like concat('%', #{name}, '%') - and date = #{date} + + 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') + )) + and order_num = #{orderNum} and version = #{version} and del_flag = '0'