From af94dfe8d7f680b8b97568d4a3aaf2f10e124821 Mon Sep 17 00:00:00 2001 From: liwen Date: Tue, 23 Apr 2024 15:46:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=BC=94=E7=BB=83=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=95=B0=E6=8D=AE=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hnac/hzims/safeproduct/mapper/RehearsalRecordMapper.java | 8 ++++++++ .../hnac/hzims/safeproduct/mapper/RehearsalRecordMapper.xml | 12 ++++++++++++ .../safeproduct/service/impl/RehearsalRecordServiceImpl.java | 6 +----- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalRecordMapper.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalRecordMapper.java index 3746e36..5d6242d 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalRecordMapper.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalRecordMapper.java @@ -8,6 +8,7 @@ import org.apache.ibatis.annotations.Mapper; import org.springblade.core.datascope.annotation.UserDataAuth; import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; +import java.util.List; import java.util.Map; /** @@ -34,4 +35,11 @@ public interface RehearsalRecordMapper extends UserDataScopeBaseMapper getRehearsalRecordPage(IPage page, Map param); + + /** + * 查询当月演练记录 + * @param month 当月 + * @return 当月演练数据表 + */ + List selectRehearsalByMonth(String month); } diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalRecordMapper.xml b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalRecordMapper.xml index 5241221..2130923 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalRecordMapper.xml +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalRecordMapper.xml @@ -39,4 +39,16 @@ ORDER BY t1.create_time DESC + + \ No newline at end of file diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/RehearsalRecordServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/RehearsalRecordServiceImpl.java index 7ac4d6e..55aaf12 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/RehearsalRecordServiceImpl.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/RehearsalRecordServiceImpl.java @@ -23,7 +23,6 @@ import com.hnac.hzims.safeproduct.vo.RehearsalRecordDetailVO; import com.hnac.hzims.safeproduct.vo.RehearsalRecordlVO; import lombok.extern.slf4j.Slf4j; import org.springblade.core.mp.support.Query; -import org.springblade.core.secure.utils.AuthUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; @@ -116,10 +115,7 @@ public class RehearsalRecordServiceImpl extends ServiceImpl getRehearsalByMonth(String month) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.lambda().like(RehearsalRecordEntity::getCreateTime, month) - .orderByDesc(RehearsalRecordEntity::getCode); - return this.list(queryWrapper); + return baseMapper.selectRehearsalByMonth(month); } /**