| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 | <?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.keao.edu.user.dao.ExamRoomDao">		<resultMap type="com.keao.edu.user.api.entity.ExamRoom" id="ExamRoom">		<result column="id_" property="id" />		<result column="exam_mode_" property="examMode" />		<result column="exam_location_id_" property="examLocationId" />		<result column="subject_id_list_" property="subjectIdList" />		<result column="main_teacher_user_id_" property="mainTeacherUserId" />		<result column="assistant_teacher_user_id_list_" property="assistantTeacherUserIdList" />		<result column="exam_time_json_" property="examTimeJson" />		<result column="del_flag_" property="delFlag" />		<result column="create_time_" property="createTime" />		<result column="update_time_" property="updateTime" />		<result column="tenant_id_" property="tenantId" />	</resultMap>		<!-- 根据主键查询一条记录 -->	<select id="get" resultMap="ExamRoom" >		SELECT * FROM exam_room WHERE id_ = #{id} 	</select>		<!-- 全查询 -->	<select id="findAll" resultMap="ExamRoom">		SELECT * FROM exam_room ORDER BY id_	</select>		<!-- 向数据库增加一条记录 -->	<insert id="insert" parameterType="com.keao.edu.user.api.entity.ExamRoom" useGeneratedKeys="true" keyColumn="id" keyProperty="id">		INSERT INTO exam_room (id_,exam_mode_,exam_location_id_,subject_id_list_,main_teacher_user_id_,		assistant_teacher_user_id_list_,exam_time_json_,del_flag_,create_time_,update_time_,tenant_id_)		VALUES(#{id},#{examMode},#{examLocationId},#{subjectIdList},#{mainTeacherUserId},#{assistantTeacherUserIdList},		#{examTimeJson},#{delFlag},NOW(),NOW(),#{tenantId})	</insert>		<!-- 根据主键查询一条记录 -->	<update id="update" parameterType="com.keao.edu.user.api.entity.ExamRoom">		UPDATE exam_room <set>		<if test="delFlag != null">		del_flag_ = #{delFlag},		</if>		<if test="examTimeJson != null">		exam_time_json_ = #{examTimeJson},		</if>		<if test="subjectIdList != null">		subject_id_list_ = #{subjectIdList},		</if>		<if test="tenantId != null">		tenant_id_ = #{tenantId},		</if>		<if test="updateTime != null">		update_time_ = #{updateTime},		</if>		<if test="examMode != null">		exam_mode_ = #{examMode},		</if>		<if test="examLocationId != null">		exam_location_id_ = #{examLocationId},		</if>		<if test="mainTeacherUserId != null">		main_teacher_user_id_ = #{mainTeacherUserId},		</if>		<if test="assistantTeacherUserIdList != null">		assistant_teacher_user_id_list_ = #{assistantTeacherUserIdList},		</if>		</set> WHERE id_ = #{id}	</update>		<!-- 根据主键删除一条记录 -->	<delete id="delete" >		DELETE FROM exam_room WHERE id_ = #{id} 	</delete>		<!-- 分页查询 -->	<select id="queryPage" resultMap="ExamRoom" parameterType="map">		SELECT * FROM exam_room ORDER BY id_ <include refid="global.limit"/>	</select>		<!-- 查询当前表的总记录数 -->	<select id="queryCount" resultType="int">		SELECT COUNT(*) FROM exam_room	</select></mapper>
 |