From a4ff6ea9260c42293cb0d37b4e93ce45c9f61bf7 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Sat, 09 Dec 2023 10:09:34 +0800
Subject: [PATCH] 无用字段去除
---
src/main/java/org/springblade/modules/simulateexam/mapper/SimulateExamRecordMapper.xml | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/springblade/modules/simulateexam/mapper/SimulateExamRecordMapper.xml b/src/main/java/org/springblade/modules/simulateexam/mapper/SimulateExamRecordMapper.xml
index 519feb2..15c1c76 100644
--- a/src/main/java/org/springblade/modules/simulateexam/mapper/SimulateExamRecordMapper.xml
+++ b/src/main/java/org/springblade/modules/simulateexam/mapper/SimulateExamRecordMapper.xml
@@ -4,10 +4,18 @@
<!--自定义查询模拟考试记录分页数据-->
<select id="selectSimulateExamRecordPage" resultType="org.springblade.modules.simulateexam.vo.SimulateExamRecordVO">
- SELECT ser.*,bu.real_name as userName,bd.dept_name as deptName FROM simulate_exam_record ser
+ SELECT
+ DISTINCT ser.*,
+ bu.real_name AS userName,
+ bd.dept_name AS deptName
+ FROM
+ simulate_exam_record ser
LEFT JOIN blade_user bu ON bu.phone = ser.phone
LEFT JOIN blade_dept bd ON bd.id = bu.dept_id
- where 1=1
+ WHERE
+ bu.is_deleted = 0
+ AND ser.phone IS NOT NULL
+ AND ser.phone != ""
<if test="simulateExamRecord.phone != null and simulateExamRecord.phone != ''" >
and ser.phone LIKE CONCAT('%',#{simulateExamRecord.phone},'%')
</if>
--
Gitblit v1.9.3