<?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.ots.project.exam.mapper.EntTestMemberBackstageMapper">
|
|
<resultMap type="EntTestMemberBackstage" id="EntTestMemberBackstageResult">
|
<result property="memberId" column="member_id" />
|
<result property="memberName" column="member_name" />
|
<result property="memberDept" column="member_dept" />
|
<result property="memberEmail" column="member_email" />
|
<result property="memberPhone" column="member_phone" />
|
<result property="testId" column="test_id" />
|
<result property="token" column="token" />
|
<result property="startTime" column="start_time" />
|
<result property="endTime" column="end_time" />
|
<result property="smsStatus" column="sms_status" />
|
<result property="smsTime" column="sms_time" />
|
<result property="emailStatus" column="email_status" />
|
<result property="emailTime" column="email_time" />
|
<result property="createBy" column="create_by" />
|
<result property="createTime" column="create_time" />
|
<result property="updateBy" column="update_by" />
|
<result property="updateTime" column="update_time" />
|
<result property="status" column="status" />
|
<result property="remark" column="remark" />
|
<result property="firstname" column="firstName" />
|
<result property="lastname" column="lastName" />
|
</resultMap>
|
|
<sql id="selectEntTestMemberBackstageVo">
|
select member_id, member_name, member_dept, member_email, member_phone, test_id, token, start_time, end_time, sms_status, sms_time, email_status, email_time, create_by, create_time, update_by, update_time, status, remark, firstName, lastName from ent_test_member_backstage
|
</sql>
|
|
<select id="selectEntTestMemberBackstageList" parameterType="EntTestMemberBackstage" resultMap="EntTestMemberBackstageResult">
|
<include refid="selectEntTestMemberBackstageVo"/>
|
<where>
|
<if test="memberName != null and memberName != ''"> and member_name = #{memberName}</if>
|
<if test="memberDept != null and memberDept != ''"> and member_dept = #{memberDept}</if>
|
<if test="memberEmail != null and memberEmail != ''"> and member_email = #{memberEmail}</if>
|
<if test="memberPhone != null and memberPhone != ''"> and member_phone = #{memberPhone}</if>
|
<if test="testId != null "> and test_id = #{testId}</if>
|
<if test="token != null and token != ''"> and token = #{token}</if>
|
<if test="startTime != null "> and start_time = #{startTime}</if>
|
<if test="endTime != null "> and end_time = #{endTime}</if>
|
<if test="smsStatus != null and smsStatus != ''"> and sms_status = #{smsStatus}</if>
|
<if test="smsTime != null "> and sms_time = #{smsTime}</if>
|
<if test="emailStatus != null and emailStatus != ''"> and email_status = #{emailStatus}</if>
|
<if test="emailTime != null "> and email_time = #{emailTime}</if>
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
<if test="firstname != null and firstname != ''"> and firstName = #{firstname}</if>
|
<if test="lastname != null and lastname != ''"> and lastName = #{lastname}</if>
|
</where>
|
</select>
|
|
<select id="selectEntTestMemberBackstageById" parameterType="Long" resultMap="EntTestMemberBackstageResult">
|
<include refid="selectEntTestMemberBackstageVo"/>
|
where member_id = #{memberId}
|
</select>
|
|
<insert id="insertEntTestMemberBackstage" parameterType="EntTestMemberBackstage">
|
insert into ent_test_member_backstage
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="memberId != null ">member_id,</if>
|
<if test="memberName != null and memberName != ''">member_name,</if>
|
<if test="memberDept != null and memberDept != ''">member_dept,</if>
|
<if test="memberEmail != null and memberEmail != ''">member_email,</if>
|
<if test="memberPhone != null and memberPhone != ''">member_phone,</if>
|
<if test="testId != null ">test_id,</if>
|
<if test="token != null and token != ''">token,</if>
|
<if test="startTime != null ">start_time,</if>
|
<if test="endTime != null ">end_time,</if>
|
<if test="smsStatus != null and smsStatus != ''">sms_status,</if>
|
<if test="smsTime != null ">sms_time,</if>
|
<if test="emailStatus != null and emailStatus != ''">email_status,</if>
|
<if test="emailTime != null ">email_time,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createTime != null ">create_time,</if>
|
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
<if test="updateTime != null ">update_time,</if>
|
<if test="status != null and status != ''">status,</if>
|
<if test="remark != null and remark != ''">remark,</if>
|
<if test="firstname != null and firstname != ''">firstName,</if>
|
<if test="lastname != null and lastname != ''">lastName,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="memberId != null ">#{memberId},</if>
|
<if test="memberName != null and memberName != ''">#{memberName},</if>
|
<if test="memberDept != null and memberDept != ''">#{memberDept},</if>
|
<if test="memberEmail != null and memberEmail != ''">#{memberEmail},</if>
|
<if test="memberPhone != null and memberPhone != ''">#{memberPhone},</if>
|
<if test="testId != null ">#{testId},</if>
|
<if test="token != null and token != ''">#{token},</if>
|
<if test="startTime != null ">#{startTime},</if>
|
<if test="endTime != null ">#{endTime},</if>
|
<if test="smsStatus != null and smsStatus != ''">#{smsStatus},</if>
|
<if test="smsTime != null ">#{smsTime},</if>
|
<if test="emailStatus != null and emailStatus != ''">#{emailStatus},</if>
|
<if test="emailTime != null ">#{emailTime},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createTime != null ">#{createTime},</if>
|
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
<if test="updateTime != null ">#{updateTime},</if>
|
<if test="status != null and status != ''">#{status},</if>
|
<if test="remark != null and remark != ''">#{remark},</if>
|
<if test="firstname != null and firstname != ''">#{firstname},</if>
|
<if test="lastname != null and lastname != ''">#{lastname},</if>
|
</trim>
|
</insert>
|
|
<update id="updateEntTestMemberBackstage" parameterType="EntTestMemberBackstage">
|
update ent_test_member_backstage
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="memberName != null and memberName != ''">member_name = #{memberName},</if>
|
<if test="memberDept != null and memberDept != ''">member_dept = #{memberDept},</if>
|
<if test="memberEmail != null and memberEmail != ''">member_email = #{memberEmail},</if>
|
<if test="memberPhone != null and memberPhone != ''">member_phone = #{memberPhone},</if>
|
<if test="testId != null ">test_id = #{testId},</if>
|
<if test="token != null and token != ''">token = #{token},</if>
|
<if test="startTime != null ">start_time = #{startTime},</if>
|
<if test="endTime != null ">end_time = #{endTime},</if>
|
<if test="smsStatus != null and smsStatus != ''">sms_status = #{smsStatus},</if>
|
<if test="smsTime != null ">sms_time = #{smsTime},</if>
|
<if test="emailStatus != null and emailStatus != ''">email_status = #{emailStatus},</if>
|
<if test="emailTime != null ">email_time = #{emailTime},</if>
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
<if test="createTime != null ">create_time = #{createTime},</if>
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
<if test="status != null and status != ''">status = #{status},</if>
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
<if test="firstname != null and firstname != ''">firstName = #{firstname},</if>
|
<if test="lastname != null and lastname != ''">lastName = #{lastname},</if>
|
</trim>
|
where member_id = #{memberId}
|
</update>
|
|
<delete id="deleteEntTestMemberBackstageById" parameterType="Long">
|
delete from ent_test_member_backstage where member_id = #{memberId}
|
</delete>
|
|
<delete id="deleteEntTestMemberBackstageByIds" parameterType="String">
|
delete from ent_test_member_backstage where member_id in
|
<foreach item="memberId" collection="array" open="(" separator="," close=")">
|
#{memberId}
|
</foreach>
|
</delete>
|
|
</mapper>
|