| | |
| | | <mapper namespace="com.gkhy.safePlatform.emergency.repository.EmergencyTeamMemberInfoRepository"> |
| | | |
| | | <insert id="addEmergencyTeamMember" parameterType="com.gkhy.safePlatform.emergency.entity.EmergencyTeamMemberInfo"> |
| | | insert into emergency_team_Member( |
| | | <if test="id != null ">id,</if> |
| | | <if test="delFlag != null ">del_flag,</if> |
| | | <if test="gmtCreate != null ">gmt_create,</if> |
| | | <if test="gmtModitify != null ">gmt_moditify,</if> |
| | | <if test="createUid != null ">create_uid,</if> |
| | | <if test="updateUid != null ">update_uid,</if> |
| | | <if test="teamId != null ">team_id,</if> |
| | | <if test="userUid != null ">user_uid,</if> |
| | | <if test="gender != null ">gender,</if> |
| | | <if test="jobNumber != null and jobNumber != ''">job_number,</if> |
| | | <if test="name != null and name != ''">`name`,</if> |
| | | <if test="phone != null and phone != ''">phone,</if> |
| | | <if test="position != null and position != ''">`position`</if> |
| | | )values( |
| | | <if test="id != null ">#{id},</if> |
| | | <if test="delFlag != null ">#{delFlag},</if> |
| | | <if test="gmtCreate != null ">#{gmtCreate},</if> |
| | | <if test="gmtModitify != null ">#{gmtModitify},</if> |
| | | <if test="createUid != null ">#{createUid},</if> |
| | | <if test="updateUid != null ">#{updateUid},</if> |
| | | |
| | | <if test="teamId != null ">#{teamId},</if> |
| | | <if test="userUid != null ">#{userUid},</if> |
| | | <if test="gender != null ">#{gender},</if> |
| | | <if test="jobNumber != null and jobNumber != ''">#{jobNumber},</if> |
| | | <if test="name != null and name != ''">#{name},</if> |
| | | <if test="phone != null and phone != ''">#{phone},</if> |
| | | <if test="position != null and position != ''">#{position}</if> |
| | | ) |
| | | insert into emergency_team_member |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null ">id,</if> |
| | | <if test="delFlag != null ">del_flag,</if> |
| | | <if test="gmtCreate != null ">gmt_create,</if> |
| | | <if test="gmtModitify != null ">gmt_moditify,</if> |
| | | <if test="createUid != null ">create_uid,</if> |
| | | <if test="updateUid != null ">update_uid,</if> |
| | | <if test="teamId != null ">team_id,</if> |
| | | <if test="userUid != null ">user_uid,</if> |
| | | <if test="gender != null ">gender,</if> |
| | | <if test="jobNumber != null and jobNumber != ''">job_number,</if> |
| | | <if test="name != null and name != ''">`name`,</if> |
| | | <if test="phone != null and phone != ''">phone,</if> |
| | | <if test="position != null and position != ''">`position`</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null ">#{id},</if> |
| | | <if test="delFlag != null ">#{delFlag},</if> |
| | | <if test="gmtCreate != null ">#{gmtCreate},</if> |
| | | <if test="gmtModitify != null ">#{gmtModitify},</if> |
| | | <if test="createUid != null ">#{createUid},</if> |
| | | <if test="updateUid != null ">#{updateUid},</if> |
| | | <if test="teamId != null ">#{teamId},</if> |
| | | <if test="userUid != null ">#{userUid},</if> |
| | | <if test="gender != null ">#{gender},</if> |
| | | <if test="jobNumber != null and jobNumber != ''">#{jobNumber},</if> |
| | | <if test="name != null and name != ''">#{name},</if> |
| | | <if test="phone != null and phone != ''">#{phone},</if> |
| | | <if test="position != null and position != ''">#{position}</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <resultMap type="com.gkhy.safePlatform.emergency.entity.EmergencyTeamMemberInfoDO" id="emergencyTeamMemberInfoDOResult"> |
| | | <resultMap type="com.gkhy.safePlatform.emergency.entity.EmergencyTeamMemberInfoDO" |
| | | id="emergencyTeamMemberInfoDOResult"> |
| | | <id column="id" property="id" jdbcType="BIGINT"/> |
| | | <result column="team_id" property="teamId" /> |
| | | <result column="user_uid" property="userUid" /> |
| | | <result column="gender" property="gender" /> |
| | | <result column="job_number" property="jobNumber" /> |
| | | <result column="name" property="name" /> |
| | | <result column="phone" property="phone" /> |
| | | <result column="position" property="position" /> |
| | | <result column="team_id" property="teamId"/> |
| | | <result column="user_uid" property="userUid"/> |
| | | <result column="gender" property="gender"/> |
| | | <result column="job_number" property="jobNumber"/> |
| | | <result column="name" property="name"/> |
| | | <result column="phone" property="phone"/> |
| | | <result column="position" property="position"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectByEmergencyTeamId" resultMap="emergencyTeamMemberInfoDOResult"> |
| | | select id ,team_id ,user_uid ,gender ,job_number ,`name` ,phone ,`position` from emergency_team_Member where del_flag = 0 and team_id = #{teamId} |
| | | select id ,team_id ,user_uid ,gender ,job_number ,`name` ,phone ,`position` from emergency_team_member where del_flag = 0 and team_id = #{teamId} |
| | | </select> |
| | | |
| | | <select id="selectEmergencyTeamMemberById" resultMap="emergencyTeamMemberInfoDOResult"> |
| | | select id ,team_id ,user_uid ,gender ,job_number ,`name` ,phone ,`position` from emergency_team_member where del_flag = 0 and id = #{id} |
| | | </select> |
| | | |
| | | <update id="updateEmergencyTeamMember" |
| | | parameterType="com.gkhy.safePlatform.emergency.entity.EmergencyTeamMemberInfo"> |
| | | update emergency_team_member |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="gmtCreate != null ">gmt_create = #{gmtCreate},</if> |
| | | <if test="gmtModitify != null ">gmt_moditify = #{gmtModitify},</if> |
| | | <if test="createUid != null ">create_uid = #{createUid},</if> |
| | | <if test="updateUid != null ">update_uid = #{updateUid},</if> |
| | | <if test="teamId != null ">team_id = #{teamId},</if> |
| | | <if test="userUid != null ">user_uid = #{userUid},</if> |
| | | <if test="gender != null ">gender = #{gender},</if> |
| | | <if test="jobNumber != null and jobNumber != ''">job_number = #{jobNumber},</if> |
| | | <if test="name != null and name != ''">`name` = #{name},</if> |
| | | <if test="phone != null and phone != ''">phone = #{phone},</if> |
| | | <if test="position != null and position != ''">`position` = #{position},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deleteEmergencyTeamMemberByTeamId"> |
| | | update emergency_team_member set del_flag = 1 where team_id = #{teamId} |
| | | </update> |
| | | |
| | | <update id="deleteEmergencyTeamMemberById"> |
| | | update emergency_team_member set del_flag = 1 where id = #{id} |
| | | </update> |
| | | |
| | | </mapper> |