Files
xkrs_ms/ruoyi-system/src/main/resources/mapper/jxzxkhgl/TsbzJxzxkhshMapper.xml
2020-09-02 11:05:42 +08:00

136 lines
6.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.TsbzJxzxkhshMapper">
<resultMap type="TsbzJxzxkhsh" id="TsbzJxzxkhshResult">
<result property="id" column="id"/>
<result property="faid" column="faid"/>
<result property="jsid" column="jsid"/>
<result property="status" column="status"/>
<result property="xjshr" column="xjshr"/>
<result property="xjshyj" column="xjshyj"/>
<result property="xjshjy" column="xjshjy"/>
<result property="qjshr" column="qjshr"/>
<result property="qjshyj" column="qjshyj"/>
<result property="qjshjy" column="qjshjy"/>
<result property="createuseird" column="createuseird"/>
<result property="createTime" column="create_time"/>
<association property="tsbzJxjsjbxx" column="jsid" javaType="TsbzJxjsjbxx" resultMap="TsbzJxjsjbxxResult"/>
</resultMap>
<resultMap type="TsbzJxjsjbxx" id="TsbzJxjsjbxxResult">
<result property="id" column="id"/>
<result property="otherid" column="otherid"/>
<result property="name" column="name"/>
<result property="jxbh" column="jxbh"/>
<result property="xb" column="xb"/>
<result property="csrq" column="csrq"/>
<result property="email" column="email"/>
<result property="phone" column="phone"/>
<result property="yzbm" column="yzbm"/>
<result property="zzmm" column="zzmm"/>
<result property="mz" column="mz"/>
<result property="prdwid" column="prdwid"/>
<result property="prdwmc" column="prdwmc"/>
<result property="jdxid" column="jdxid"/>
<result property="rjxd" column="rjxd"/>
<result property="rjxk" column="rjxk"/>
<result property="rjnj" column="rjnj"/>
<result property="byyx" column="byyx"/>
<result property="xl" column="xl"/>
<result property="xw" column="xw"/>
<result property="sfsfs" column="sfsfs"/>
<result property="lqnf" column="lqnf"/>
<result property="createTime" column="create_time"/>
</resultMap>
<sql id="selectTsbzJxzxkhshVo">
select d.id,d.faid,d.jsid,d.status,d.xjshr,d.xjshyj,d.xjshjy,d.qjshr,d.qjshjy,d.qjshyj,d.createuseird,d.create_time,b.name,b.prdwmc from tsbz_jxzxmd a
left join tsbz_jxjsjbxx b on b.id=a.jsid
left join sys_dept c on b.prdwid=c.schoolid
left join tsbz_jxzxkhsh d on a.jsid=d.jsid
</sql>
<select id="selectTsbzJxzxkhshList" parameterType="TsbzJxzxkhsh" resultMap="TsbzJxzxkhshResult">
<include refid="selectTsbzJxzxkhshVo"/>
<where>
<if test="faid != null ">and d.faid = #{faid}</if>
<if test="jsid != null ">and d.jsid = #{jsid}</if>
<if test="status != null and status != ''">and d.status = #{status}</if>
<if test="xjshr != null ">and d.xjshr = #{xjshr}</if>
<if test="xjshyj != null and xjshyj != ''">and d.xjshyj = #{xjshyj}</if>
<if test="xjshjy != null and xjshjy != ''">and d.xjshjy = #{xjshjy}</if>
<if test="qjshr != null ">and d.qjshr = #{qjshr}</if>
<if test="qjshyj != null and qjshyj != ''">and d.qjshyj = #{qjshyj}</if>
<if test="qjshjy != null and qjshjy != ''">and d.qjshjy = #{qjshjy}</if>
<if test="createuseird != null ">and d.createuseird = #{createuseird}</if>
</where>
</select>
<select id="selectTsbzJxzxkhshById" parameterType="Long" resultMap="TsbzJxzxkhshResult">
<include refid="selectTsbzJxzxkhshVo"/>
where d.id = #{id}
</select>
<insert id="insertTsbzJxzxkhsh" parameterType="TsbzJxzxkhsh" useGeneratedKeys="true" keyProperty="id">
insert into tsbz_jxzxkhsh
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="faid != null">faid,</if>
<if test="jsid != null">jsid,</if>
<if test="status != null">status,</if>
<if test="xjshr != null">xjshr,</if>
<if test="xjshyj != null">xjshyj,</if>
<if test="xjshjy != null">xjshjy,</if>
<if test="qjshr != null">qjshr,</if>
<if test="qjshyj != null">qjshyj,</if>
<if test="qjshjy != null">qjshjy,</if>
<if test="createuseird != null">createuseird,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="faid != null">#{faid},</if>
<if test="jsid != null">#{jsid},</if>
<if test="status != null">#{status},</if>
<if test="xjshr != null">#{xjshr},</if>
<if test="xjshyj != null">#{xjshyj},</if>
<if test="xjshjy != null">#{xjshjy},</if>
<if test="qjshr != null">#{qjshr},</if>
<if test="qjshyj != null">#{qjshyj},</if>
<if test="qjshjy != null">#{qjshjy},</if>
<if test="createuseird != null">#{createuseird},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateTsbzJxzxkhsh" parameterType="TsbzJxzxkhsh">
update tsbz_jxzxkhsh
<trim prefix="SET" suffixOverrides=",">
<if test="faid != null">faid = #{faid},</if>
<if test="jsid != null">jsid = #{jsid},</if>
<if test="status != null">status = #{status},</if>
<if test="xjshr != null">xjshr = #{xjshr},</if>
<if test="xjshyj != null">xjshyj = #{xjshyj},</if>
<if test="xjshjy != null">xjshjy = #{xjshjy},</if>
<if test="qjshr != null">qjshr = #{qjshr},</if>
<if test="qjshyj != null">qjshyj = #{qjshyj},</if>
<if test="qjshjy != null">qjshjy = #{qjshjy},</if>
<if test="createuseird != null">createuseird = #{createuseird},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTsbzJxzxkhshById" parameterType="Long">
delete from tsbz_jxzxkhsh where id = #{id}
</delete>
<delete id="deleteTsbzJxzxkhshByIds" parameterType="String">
delete from tsbz_jxzxkhsh where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>