<?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.safePlatform.incidentManage.repository.AccidentExpressCasualtyInfoRepository">
|
|
<insert id="addAccidentExpressCasualty">
|
insert into accident_express_casualty
|
<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="accidentExpressId != null ">accident_express_id,</if>
|
<if test="name != null and name != ''">`name`,</if>
|
<if test="gender != null ">gender,</if>
|
<if test="card != null and card != ''">card,</if>
|
<if test="injuryDesc != null and injuryDesc != ''">injury_desc,</if>
|
<if test="damageDesc != null and damageDesc != ''">damage_desc,</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="accidentExpressId != null ">#{accidentExpressId},</if>
|
<if test="name != null and name != ''">#{name},</if>
|
<if test="gender != null ">#{gender},</if>
|
<if test="card != null and card != ''">#{card},</if>
|
<if test="injuryDesc != null and injuryDesc != ''">#{injuryDesc},</if>
|
<if test="damageDesc != null and damageDesc != ''">#{damageDesc},</if>
|
</trim>
|
</insert>
|
|
<resultMap type="com.gkhy.safePlatform.incidentManage.entity.AccidentExpressCasualtyInfoDO" id="AccidentExpressCasualtyInfoDOResult">
|
<id column="id" property="id" jdbcType="BIGINT"/>
|
<result column="accident_express_id" property="accidentExpressId" />
|
<result column="name" property="name" />
|
<result column="gender" property="gender" />
|
<result column="card" property="card" />
|
<result column="injury_desc" property="injuryDesc" />
|
<result column="damage_desc" property="damageDesc" />
|
</resultMap>
|
|
<select id="selectByAccidentExpressId" resultMap="AccidentExpressCasualtyInfoDOResult">
|
select id,accident_express_id,`name`,`gender`,`card`,injury_desc,damage_desc from accident_express_casualty where del_flag = 0 and accident_express_id = #{accidentExpressId}
|
</select>
|
|
|
<update id="deleteAccidentExpressCasualtyById">
|
update accident_express_casualty set del_flag = 1 where id = #{id}
|
</update>
|
|
<update id="deleteAccidentExpressCasualtyByAccidentExpressId">
|
update accident_express_casualty set del_flag = 1 where accident_express_id = #{id}
|
</update>
|
</mapper>
|