84 lines
4.0 KiB
XML
84 lines
4.0 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="createBy" column="create_by" />
|
||
|
<result property="updateTime" column="update_time" />
|
||
|
<result property="updateBy" column="update_by" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectDriveSchoolNoticeVo">
|
||
|
select id, dept_id, title, content, create_time, create_by, update_time, update_by from drive_school_notice
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectDriveSchoolNoticeList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolNotice" resultMap="DriveSchoolNoticeResult">
|
||
|
<include refid="selectDriveSchoolNoticeVo"/>
|
||
|
<where>
|
||
|
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||
|
<if test="title != null and title != ''"> and title = #{title}</if>
|
||
|
<if test="content != null and content != ''"> and content = #{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="createBy != null">create_by,</if>
|
||
|
<if test="updateTime != null">update_time,</if>
|
||
|
<if test="updateBy != null">update_by,</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="createBy != null">#{createBy},</if>
|
||
|
<if test="updateTime != null">#{updateTime},</if>
|
||
|
<if test="updateBy != null">#{updateBy},</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="createBy != null">create_by = #{createBy},</if>
|
||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||
|
<if test="updateBy != null">update_by = #{updateBy},</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>
|