From 7d2a3da6223ced6f72423931b7f63f27445d63eb Mon Sep 17 00:00:00 2001 From: zf <1603559716@qq.com> Date: 星期二, 26 三月 2024 16:59:59 +0800 Subject: [PATCH] 加前缀 --- exam-system/src/main/resources/mapper/noncoalmine/ExamApplyMapper.xml | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/exam-system/src/main/resources/mapper/noncoalmine/ExamApplyMapper.xml b/exam-system/src/main/resources/mapper/noncoalmine/ExamApplyMapper.xml new file mode 100644 index 0000000..3d0078d --- /dev/null +++ b/exam-system/src/main/resources/mapper/noncoalmine/ExamApplyMapper.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE mapper + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.gkhy.exam.noncoalmine.mapper.ExamApplyMapper"> + <select id="listByPage" resultType="com.gkhy.exam.noncoalmine.model.vo.ExamApplyVO"> + SELECT + ea.*, + t.institution_name, + es.site_name, + d.NAME AS districtName + FROM + exam_apply ea + LEFT JOIN training_institution t ON t.institution_id = ea.institution_id + LEFT JOIN sys_district d ON d.id = t.district_id + LEFT JOIN exam_site es ON es.site_id = ea.site_id + WHERE + ea.del_flag = 0 + <if test="query.districtId != null"> + and d.district_id = #{query.districtId} + </if> + <if test="query.examStartTime != null"><!-- 开始时间检索 --> + and date_format(ea.exam_start_time,'%y-%m-%d') >= date_format(#{query.examStartTime},'%y-%m-%d') + </if> + <if test="query.examEndTime != null"><!-- 结束时间检索 --> + and date_format(ea.exam_end_time,'%y-%m-%d') <= date_format(#{query.examEndTime},'%y-%m-%d') + </if> + order by ea.create_time desc + + </select> + +</mapper> \ No newline at end of file -- Gitblit v1.9.2