99 lines
4.3 KiB
XML
99 lines
4.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="com.ruoyi.jxzxkhgl.mapper.TsbzJxzxkhgcsjMapper">
|
|
|
|
<resultMap type="TsbzJxzxkhgcsj" id="TsbzJxzxkhgcsjResult">
|
|
<result property="id" column="id"/>
|
|
<result property="faid" column="faid"/>
|
|
<result property="zbid" column="zbid"/>
|
|
<result property="content" column="content"/>
|
|
<result property="createuserid" column="createuserid"/>
|
|
<result property="createTime" column="create_time"/>
|
|
<association property="tsbzJxzxkhzbx" column="zbid" javaType="TsbzJxzxkhzbx" resultMap="TsbzJxzxkhzbxResult"/>
|
|
</resultMap>
|
|
|
|
<resultMap type="TsbzJxzxkhzbx" id="TsbzJxzxkhzbxResult">
|
|
<result property="id" column="zbxid"/>
|
|
<result property="faid" column="faid"/>
|
|
<result property="khmk" column="khmk"/>
|
|
<result property="khnr" column="khnr"/>
|
|
<result property="tjsl" column="tjsl"/>
|
|
<result property="gjzd" column="gjzd"/>
|
|
<result property="tbly" column="tbly"/>
|
|
<result property="jkbj" column="jkbj"/>
|
|
<result property="starttime" column="starttime"/>
|
|
<result property="endtime" column="endtime"/>
|
|
<result property="zxrw" column="zxrw"/>
|
|
<result property="createuserid" column="createuserid"/>
|
|
<result property="createTime" column="create_time"/>
|
|
<result property="yly" column="yly"/>
|
|
<result property="yle" column="yle"/>
|
|
</resultMap>
|
|
|
|
<sql id="selectTsbzJxzxkhgcsjVo">
|
|
select b.id,b.content,b.zbid,b.createuserid,a.create_time,a.id as zbxid,a.faid,a.khmk,a.khnr,a.tjsl,a.gjzd,a.tbly,a.jkbj,a.starttime,a.endtime,a.zxrw,a.yly,a.yle from tsbz_jxzxkhzbx a
|
|
left join (select * from tsbz_jxzxkhgcsj where createuserid= #{createuserid}) b
|
|
on a.faid=b.faid and a.id=b.zbid
|
|
</sql>
|
|
|
|
<select id="selectTsbzJxzxkhgcsjList" parameterType="TsbzJxzxkhgcsj" resultMap="TsbzJxzxkhgcsjResult">
|
|
<include refid="selectTsbzJxzxkhgcsjVo"/>
|
|
<where>
|
|
<if test="faid != null ">and a.faid = #{faid}</if>
|
|
<if test="zbid != null ">and a.zbid = #{zbid}</if>
|
|
<if test="content != null and content != ''">and b.content = #{content}</if>
|
|
</where>
|
|
order by a.id
|
|
</select>
|
|
|
|
<select id="selectTsbzJxzxkhgcsjById" parameterType="TsbzJxzxkhgcsj" resultMap="TsbzJxzxkhgcsjResult">
|
|
<include refid="selectTsbzJxzxkhgcsjVo"/>
|
|
where b.id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertTsbzJxzxkhgcsj" parameterType="TsbzJxzxkhgcsj">
|
|
insert into tsbz_jxzxkhgcsj
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">id,</if>
|
|
<if test="faid != null">faid,</if>
|
|
<if test="zbid != null">zbid,</if>
|
|
<if test="content != null">content,</if>
|
|
<if test="createuserid != null">createuserid,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">#{id},</if>
|
|
<if test="faid != null">#{faid},</if>
|
|
<if test="zbid != null">#{zbid},</if>
|
|
<if test="content != null">#{content},</if>
|
|
<if test="createuserid != null">#{createuserid},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateTsbzJxzxkhgcsj" parameterType="TsbzJxzxkhgcsj">
|
|
update tsbz_jxzxkhgcsj
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="faid != null">faid = #{faid},</if>
|
|
<if test="zbid != null">zbid = #{zbid},</if>
|
|
<if test="content != null">content = #{content},</if>
|
|
<if test="createuserid != null">createuserid = #{createuserid},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteTsbzJxzxkhgcsjById" parameterType="String">
|
|
delete from tsbz_jxzxkhgcsj where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteTsbzJxzxkhgcsjByIds" parameterType="String">
|
|
delete from tsbz_jxzxkhgcsj where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
|
|
</mapper> |