73 lines
3.3 KiB
XML
73 lines
3.3 KiB
XML
![]() |
<?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="cn.iocoder.yudao.module.rescue.mapper.RescueInfoDetailMapper">
|
||
|
|
||
|
|
||
|
|
||
|
<select id="selectRescueInfoDetailList" parameterType="cn.iocoder.yudao.module.rescue.domain.RescueInfoDetail" resultType="cn.iocoder.yudao.module.rescue.domain.RescueInfoDetail">
|
||
|
select * from rescue_info_detail
|
||
|
<where>
|
||
|
<if test="rescueInfoId != null "> and rescue_info_id = #{rescueInfoId}</if>
|
||
|
<if test="title != null and title != ''"> and title = #{title}</if>
|
||
|
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||
|
</where>
|
||
|
order by create_time
|
||
|
</select>
|
||
|
|
||
|
<select id="selectRescueInfoDetailById" parameterType="java.lang.Long" resultType="cn.iocoder.yudao.module.rescue.domain.RescueInfoDetail">
|
||
|
select * from rescue_info_detail
|
||
|
where id = #{id}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertRescueInfoDetail" parameterType="cn.iocoder.yudao.module.rescue.domain.RescueInfoDetail">
|
||
|
insert into rescue_info_detail
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="id != null">id,</if>
|
||
|
<if test="title != null">title,</if>
|
||
|
<if test="remark != null">remark,</if>
|
||
|
<if test="createTime != null">create_time,</if>
|
||
|
<if test="createBy != null">creator,</if>
|
||
|
<if test="deptId != null">dept_id,</if>
|
||
|
<if test="updateTime != null">update_time,</if>
|
||
|
<if test="updateBy != null">updater,</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="id != null">#{id},</if>
|
||
|
<if test="title != null">#{title},</if>
|
||
|
<if test="remark != null">#{remark},</if>
|
||
|
<if test="createTime != null">#{createTime},</if>
|
||
|
<if test="createBy != null">#{createBy},</if>
|
||
|
<if test="deptId != null">#{deptId},</if>
|
||
|
<if test="updateTime != null">#{updateTime},</if>
|
||
|
<if test="updateBy != null">#{updateBy},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateRescueInfoDetail" parameterType="cn.iocoder.yudao.module.rescue.domain.RescueInfoDetail">
|
||
|
update rescue_info_detail
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="title != null">title = #{title},</if>
|
||
|
<if test="remark != null">remark = #{remark},</if>
|
||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||
|
<if test="createBy != null">creator = #{createBy},</if>
|
||
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||
|
<if test="updateBy != null">updater = #{updateBy},</if>
|
||
|
</trim>
|
||
|
where id = #{id}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteRescueInfoDetailById" parameterType="java.lang.Long">
|
||
|
delete from rescue_info_detail where id = #{id}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteRescueInfoDetailByIds" parameterType="java.lang.String">
|
||
|
delete from rescue_info_detail where id in
|
||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
#{id}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
</mapper>
|