Browse Source

DAO和mapper

haogh 1 year ago
parent
commit
9d1b162648

+ 8 - 0
src/main/java/com/qmth/exam/reserve/dao/ExamRoomDao.java

@@ -0,0 +1,8 @@
+package com.qmth.exam.reserve.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.qmth.exam.reserve.entity.ExamRoomEntity;
+
+public interface ExamRoomDao extends BaseMapper<ExamRoomEntity> {
+
+}

+ 8 - 0
src/main/java/com/qmth/exam/reserve/dao/OperateLogDao.java

@@ -0,0 +1,8 @@
+package com.qmth.exam.reserve.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.qmth.exam.reserve.entity.OperateLogEntity;
+
+public interface OperateLogDao extends BaseMapper<OperateLogEntity> {
+
+}

+ 8 - 0
src/main/java/com/qmth/exam/reserve/dao/OrgDao.java

@@ -0,0 +1,8 @@
+package com.qmth.exam.reserve.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.qmth.exam.reserve.entity.OrgEntity;
+
+public interface OrgDao extends BaseMapper<OrgEntity> {
+
+}

+ 8 - 0
src/main/java/com/qmth/exam/reserve/dao/StudentImportTaskDao.java

@@ -0,0 +1,8 @@
+package com.qmth.exam.reserve.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.qmth.exam.reserve.entity.StudentImportTaskEntity;
+
+public interface StudentImportTaskDao extends BaseMapper<StudentImportTaskEntity> {
+
+}

+ 8 - 0
src/main/java/com/qmth/exam/reserve/dao/TimePeriodDao.java

@@ -0,0 +1,8 @@
+package com.qmth.exam.reserve.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.qmth.exam.reserve.entity.TimePeriodEntity;
+
+public interface TimePeriodDao extends BaseMapper<TimePeriodEntity> {
+
+}

+ 5 - 0
src/main/resources/mapper/CategoryMapper.xml

@@ -0,0 +1,5 @@
+<?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.qmth.exam.reserve.dao.CategoryDao">
+
+</mapper>

+ 5 - 0
src/main/resources/mapper/ExamRoomMapper.xml

@@ -0,0 +1,5 @@
+<?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.qmth.exam.reserve.dao.ExamRoomDao">
+
+</mapper>

+ 5 - 0
src/main/resources/mapper/ExamSiteMapper.xml

@@ -0,0 +1,5 @@
+<?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.qmth.exam.reserve.dao.ExamSiteDao">
+
+</mapper>

+ 5 - 0
src/main/resources/mapper/OperateLogMapper.xml

@@ -0,0 +1,5 @@
+<?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.qmth.exam.reserve.dao.OperateLogDao">
+
+</mapper>

+ 5 - 0
src/main/resources/mapper/OrgMapper.xml

@@ -0,0 +1,5 @@
+<?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.qmth.exam.reserve.dao.OrgDao">
+
+</mapper>

+ 40 - 0
src/main/resources/mapper/StudentApplyMapper.xml

@@ -0,0 +1,40 @@
+<?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.qmth.exam.reserve.dao.StudentApplyDao">
+	<select id="page"
+		resultType="com.qmth.exam.reserve.bean.stdapply.StdApplyVO">
+		select a.id,s.name,s.identity_number
+		identityNumber,s.student_code
+		studentCode,o.name teachingName,es.name
+		agentName, p.start_time
+		startTime,p.end_time endTime,
+		r.name roomName, a.cancel,a.update_time
+		updateTime,u.name userName
+		from t_student s,t_category o,t_student_apply a
+		left join t_exam_site es on
+		es.id=a.exam_site_id
+		left join t_time_period
+		p on p.id=a.time_period_id
+		left join t_exam_room r on
+		r.id=a.exam_room_id
+		left join t_user u on u.id=a.user_id
+		where
+		a.student_id=s.id and s.category_id=o.id
+		<if test="req.teachingId != null">
+			and s.category_id=#{req.teachingId}
+		</if>
+		<if test="req.agentId != null">
+			and a.exam_site_id=#{req.agentId}
+		</if>
+		<if test="req.name != null and req.name !=''">
+			and s.name like concat('%',#{req.name},'%')
+		</if>
+		<if test="req.identityNumber != null and req.identityNumber !=''">
+			and s.identity_number=#{req.identityNumber}
+		</if>
+		<if test="req.studentCode != null and req.studentCode !=''">
+			and s.student_code=#{req.studentCode}
+		</if>
+		order by a.id
+	</select>
+</mapper>

+ 5 - 0
src/main/resources/mapper/StudentImportTaskMapper.xml

@@ -0,0 +1,5 @@
+<?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.qmth.exam.reserve.dao.StudentImportTaskDao">
+
+</mapper>

+ 5 - 0
src/main/resources/mapper/TimePeriodMapper.xml

@@ -0,0 +1,5 @@
+<?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.qmth.exam.reserve.dao.TimePeriodDao">
+
+</mapper>