94 lines
4.6 KiB
XML
94 lines
4.6 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.DriveSchoolNoticeMapper">
|
|
|
|
<resultMap type="cn.iocoder.yudao.module.jx.domain.DriveSchoolNotice" id="DriveSchoolNoticeResult">
|
|
<result property="id" column="id" />
|
|
<result property="deptId" column="dept_id" />
|
|
<result property="title" column="title" />
|
|
<result property="content" column="content" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="creator" column="creator" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="updater" column="updater" />
|
|
</resultMap>
|
|
|
|
<sql id="selectDriveSchoolNoticeVo">
|
|
select id, dept_id, title, content, create_time, creator, update_time, updater from drive_school_notice
|
|
</sql>
|
|
|
|
<select id="selectDriveSchoolNoticeList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolNotice" resultMap="DriveSchoolNoticeResult">
|
|
<include refid="selectDriveSchoolNoticeVo"/>
|
|
<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>
|
|
</where>
|
|
order by create_time desc
|
|
</select>
|
|
|
|
<select id="selectDriveSchoolNoticeListAll" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolNotice" resultMap="DriveSchoolNoticeResult">
|
|
<include refid="selectDriveSchoolNoticeVo"/>
|
|
<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>
|
|
</where>
|
|
order by create_time desc
|
|
</select>
|
|
|
|
<select id="selectDriveSchoolNoticeById" parameterType="Long" resultMap="DriveSchoolNoticeResult">
|
|
<include refid="selectDriveSchoolNoticeVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertDriveSchoolNotice" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolNotice" useGeneratedKeys="true" keyProperty="id">
|
|
insert into drive_school_notice
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="deptId != null">dept_id,</if>
|
|
<if test="title != null and title != ''">title,</if>
|
|
<if test="content != null and content != ''">content,</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>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="deptId != null">#{deptId},</if>
|
|
<if test="title != null and title != ''">#{title},</if>
|
|
<if test="content != null and content != ''">#{content},</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>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateDriveSchoolNotice" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolNotice">
|
|
update drive_school_notice
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
|
<if test="title != null and title != ''">title = #{title},</if>
|
|
<if test="content != null and content != ''">content = #{content},</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>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteDriveSchoolNoticeById" parameterType="Long">
|
|
delete from drive_school_notice where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteDriveSchoolNoticeByIds" parameterType="String">
|
|
delete from drive_school_notice where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|