From 05a54025b1ae843f9d21a4450ec05c9e420e7f24 Mon Sep 17 00:00:00 2001
From: zf <1603559716@qq.com>
Date: 星期四, 28 九月 2023 10:47:37 +0800
Subject: [PATCH] bug修改

---
 exam-system/src/main/java/com/gkhy/exam/coalmine/service/baseService/impl/EmonExamRecordServiceImpl.java |   45 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 45 insertions(+), 0 deletions(-)

diff --git a/exam-system/src/main/java/com/gkhy/exam/coalmine/service/baseService/impl/EmonExamRecordServiceImpl.java b/exam-system/src/main/java/com/gkhy/exam/coalmine/service/baseService/impl/EmonExamRecordServiceImpl.java
new file mode 100644
index 0000000..781a74a
--- /dev/null
+++ b/exam-system/src/main/java/com/gkhy/exam/coalmine/service/baseService/impl/EmonExamRecordServiceImpl.java
@@ -0,0 +1,45 @@
+package com.gkhy.exam.coalmine.service.baseService.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gkhy.exam.coalmine.mapper.EmonExamRecordMapper;
+import com.gkhy.exam.coalmine.entity.EmonExamRecord;
+import com.gkhy.exam.coalmine.service.baseService.EmonExamRecordService;
+import com.ruoyi.common.enums.coalmineEnums.DeleteStatusEnum;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * @author hz
+ * @since 2023-09-13 10:13:40
+ */
+@Service("emonExamRecordServiceImpl")
+public class EmonExamRecordServiceImpl extends ServiceImpl<EmonExamRecordMapper, EmonExamRecord> implements EmonExamRecordService {
+
+    @Resource
+    private EmonExamRecordMapper emonExamRecordMapper;
+
+
+    @Override
+    public EmonExamRecord findValidById(Long id) {
+        LambdaQueryWrapper<EmonExamRecord> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(EmonExamRecord::getId,id)
+                .eq(EmonExamRecord::getDelFlag, DeleteStatusEnum.NO.getStatus());
+        return emonExamRecordMapper.selectOne(wrapper);
+    }
+
+    @Override
+    public List<EmonExamRecord> listValid(List<Long> childrenIds) {
+        LambdaQueryWrapper<EmonExamRecord> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(EmonExamRecord::getDelFlag, DeleteStatusEnum.NO.getStatus())
+                .orderByDesc(EmonExamRecord::getReportTime);
+        if (!CollectionUtils.isEmpty(childrenIds)){
+            wrapper.in(EmonExamRecord::getDistrictId,childrenIds);
+        }
+        return emonExamRecordMapper.selectList(wrapper);
+    }
+}
+

--
Gitblit v1.9.2