|
|
@@ -3,7 +3,7 @@
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.ruoyi.system.mapper.SysNoticeMapper">
|
|
|
-
|
|
|
+
|
|
|
<resultMap type="SysNotice" id="SysNoticeResult">
|
|
|
<result property="noticeId" column="notice_id" />
|
|
|
<result property="noticeTitle" column="notice_title" />
|
|
|
@@ -16,17 +16,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
<result property="remark" column="remark" />
|
|
|
</resultMap>
|
|
|
-
|
|
|
+
|
|
|
<sql id="selectNoticeVo">
|
|
|
- select notice_id, notice_title, notice_type, cast(notice_content as char) as notice_content, status, create_by, create_time, update_by, update_time, remark
|
|
|
+ select notice_id, notice_title, notice_type, cast(notice_content as char) as notice_content, status, create_by, create_time, update_by, update_time, remark
|
|
|
from sys_notice
|
|
|
</sql>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectNoticeById" parameterType="Long" resultMap="SysNoticeResult">
|
|
|
<include refid="selectNoticeVo"/>
|
|
|
where notice_id = #{noticeId}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectNoticeList" parameterType="SysNotice" resultMap="SysNoticeResult">
|
|
|
<include refid="selectNoticeVo"/>
|
|
|
<where>
|
|
|
@@ -36,12 +36,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="noticeType != null and noticeType != ''">
|
|
|
AND notice_type = #{noticeType}
|
|
|
</if>
|
|
|
+ <if test="status != null and status != ''">
|
|
|
+ AND status = #{status}
|
|
|
+ </if>
|
|
|
<if test="createBy != null and createBy != ''">
|
|
|
AND create_by like concat('%', #{createBy}, '%')
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<insert id="insertNotice" parameterType="SysNotice">
|
|
|
insert into sys_notice (
|
|
|
<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
|
|
|
@@ -61,9 +64,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
sysdate()
|
|
|
)
|
|
|
</insert>
|
|
|
-
|
|
|
+
|
|
|
<update id="updateNotice" parameterType="SysNotice">
|
|
|
- update sys_notice
|
|
|
+ update sys_notice
|
|
|
<set>
|
|
|
<if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if>
|
|
|
<if test="noticeType != null and noticeType != ''">notice_type = #{noticeType}, </if>
|
|
|
@@ -74,16 +77,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</set>
|
|
|
where notice_id = #{noticeId}
|
|
|
</update>
|
|
|
-
|
|
|
+
|
|
|
<delete id="deleteNoticeById" parameterType="Long">
|
|
|
delete from sys_notice where notice_id = #{noticeId}
|
|
|
</delete>
|
|
|
-
|
|
|
+
|
|
|
<delete id="deleteNoticeByIds" parameterType="Long">
|
|
|
- delete from sys_notice where notice_id in
|
|
|
+ delete from sys_notice where notice_id in
|
|
|
<foreach item="noticeId" collection="array" open="(" separator="," close=")">
|
|
|
#{noticeId}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
-
|
|
|
-</mapper>
|
|
|
+
|
|
|
+</mapper>
|