116 lines
5.9 KiB
XML
116 lines
5.9 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.jx.mapper.DriveSchoolDialMapper">
|
|
|
|
<resultMap type="cn.iocoder.yudao.module.jx.domain.DriveSchoolDial" id="DriveSchoolDialResult">
|
|
<result property="id" column="id" />
|
|
<result property="deptId" column="dept_id" />
|
|
<result property="title" column="title" />
|
|
<result property="content" column="content" />
|
|
<result property="photo" column="photo" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="creator" column="creator" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="updater" column="updater" />
|
|
<result property="type" column="type" />
|
|
<result property="jlId" column="jlId" />
|
|
<result property="name" column="name" />
|
|
</resultMap>
|
|
|
|
<sql id="selectDriveSchoolDialVo">
|
|
select id, dept_id, name,jlId,title, content, photo, create_time, creator, update_time, updater, type from drive_school_dial
|
|
</sql>
|
|
|
|
<select id="selectDriveSchoolDialList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolDial" resultMap="DriveSchoolDialResult">
|
|
<include refid="selectDriveSchoolDialVo"/>
|
|
<where>
|
|
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
|
|
<if test="entity.title != null and entity.title != ''"> and title = #{entity.title}</if>
|
|
<if test="entity.content != null and entity.content != ''"> and content = #{entity.content}</if>
|
|
<if test="entity.type != null and entity.type != ''"> and type = #{entity.type}</if>
|
|
<if test="entity.name != null and entity.name != ''"> and name like concat('%',#{entity.type},'%') </if>
|
|
<if test="entity.jlId != null and entity.jlId != ''"> and jlId =#{entity.jlId} </if>
|
|
</where>
|
|
order by create_time desc
|
|
</select>
|
|
|
|
<select id="selectDriveSchoolDialListAll" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolDial" resultMap="DriveSchoolDialResult">
|
|
<include refid="selectDriveSchoolDialVo"/>
|
|
<where>
|
|
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
|
|
<if test="entity.title != null and entity.title != ''"> and title = #{entity.title}</if>
|
|
<if test="entity.content != null and entity.content != ''"> and content = #{entity.content}</if>
|
|
<if test="entity.type != null and entity.type != ''"> and type = #{entity.type}</if>
|
|
<if test="entity.name != null and entity.name != ''"> and name like concat('%',#{entity.type},'%') </if>
|
|
<if test="entity.jlId != null and entity.jlId != ''"> and jlId =#{entity.jlId} </if>
|
|
</where>
|
|
order by create_time desc
|
|
</select>
|
|
|
|
<select id="selectDriveSchoolDialById" parameterType="Long" resultMap="DriveSchoolDialResult">
|
|
<include refid="selectDriveSchoolDialVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertDriveSchoolDial" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolDial" useGeneratedKeys="true" keyProperty="id">
|
|
insert into drive_school_dial
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="deptId != null">dept_id,</if>
|
|
<if test="title != null">title,</if>
|
|
<if test="content != null">content,</if>
|
|
<if test="photo != null">photo,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="creator != null">creator,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="updater != null">updater,</if>
|
|
<if test="type != null">type,</if>
|
|
<if test="jlId != null">jlId,</if>
|
|
<if test="name != null">name,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="deptId != null">#{deptId},</if>
|
|
<if test="title != null">#{title},</if>
|
|
<if test="content != null">#{content},</if>
|
|
<if test="photo != null">#{photo},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="creator != null">#{creator},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="updater != null">#{updater},</if>
|
|
<if test="type != null">#{type},</if>
|
|
<if test="jlId != null">#{jlId},</if>
|
|
<if test="name != null">#{name},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateDriveSchoolDial" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolDial">
|
|
update drive_school_dial
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
|
<if test="title != null">title = #{title},</if>
|
|
<if test="content != null">content = #{content},</if>
|
|
<if test="photo != null">photo = #{photo},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="creator != null">creator = #{creator},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
<if test="updater != null">updater = #{updater},</if>
|
|
<if test="type != null">type = #{type},</if>
|
|
<if test="jlId != null">jlId = #{jlId},</if>
|
|
<if test="name != null">type = #{name},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteDriveSchoolDialById" parameterType="Long">
|
|
delete from drive_school_dial where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteDriveSchoolDialByIds" parameterType="String">
|
|
delete from drive_school_dial where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|