|
@@ -1,27 +1,27 @@
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper
|
|
<!DOCTYPE mapper
|
|
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.ruoyi.system.mapper.XiaoyuanNoticeMapper">
|
|
<mapper namespace="com.ruoyi.system.mapper.XiaoyuanNoticeMapper">
|
|
-
|
|
|
|
|
|
+
|
|
<resultMap type="XiaoyuanNotice" id="XiaoyuanNoticeResult">
|
|
<resultMap type="XiaoyuanNotice" id="XiaoyuanNoticeResult">
|
|
- <result property="noticeId" column="notice_id" />
|
|
|
|
- <result property="image" column="image" />
|
|
|
|
- <result property="noticeTitle" column="notice_title" />
|
|
|
|
- <result property="noticeType" column="notice_type" />
|
|
|
|
- <result property="noticeContent" column="notice_content" />
|
|
|
|
- <result property="status" column="status" />
|
|
|
|
- <result property="type" column="type" />
|
|
|
|
- <result property="senderId" column="sender_id" />
|
|
|
|
- <result property="senderName" column="sender_name" />
|
|
|
|
- <result property="senderDept" column="sender_dept" />
|
|
|
|
- <result property="createBy" column="create_by" />
|
|
|
|
- <result property="createTime" column="create_time" />
|
|
|
|
- <result property="updateBy" column="update_by" />
|
|
|
|
- <result property="updateTime" column="update_time" />
|
|
|
|
- <result property="remark" column="remark" />
|
|
|
|
- <result property="avatar" column="avatar" />
|
|
|
|
- <result property="schoolName" column="school_name" />
|
|
|
|
|
|
+ <result property="noticeId" column="notice_id"/>
|
|
|
|
+ <result property="image" column="image"/>
|
|
|
|
+ <result property="noticeTitle" column="notice_title"/>
|
|
|
|
+ <result property="noticeType" column="notice_type"/>
|
|
|
|
+ <result property="noticeContent" column="notice_content"/>
|
|
|
|
+ <result property="status" column="status"/>
|
|
|
|
+ <result property="type" column="type"/>
|
|
|
|
+ <result property="senderId" column="sender_id"/>
|
|
|
|
+ <result property="senderName" column="sender_name"/>
|
|
|
|
+ <result property="senderDept" column="sender_dept"/>
|
|
|
|
+ <result property="createBy" column="create_by"/>
|
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
|
+ <result property="updateBy" column="update_by"/>
|
|
|
|
+ <result property="updateTime" column="update_time"/>
|
|
|
|
+ <result property="remark" column="remark"/>
|
|
|
|
+ <result property="avatar" column="avatar"/>
|
|
|
|
+ <result property="schoolName" column="school_name"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectXiaoyuanNoticeVo">
|
|
<sql id="selectXiaoyuanNoticeVo">
|
|
@@ -74,7 +74,8 @@ FROM
|
|
xiaoyuan_notice
|
|
xiaoyuan_notice
|
|
WHERE
|
|
WHERE
|
|
find_in_set( sender_dept, ${senderDept} )
|
|
find_in_set( sender_dept, ${senderDept} )
|
|
- AND type = '1' UNION
|
|
|
|
|
|
+ and type = '1'
|
|
|
|
+ UNION
|
|
SELECT
|
|
SELECT
|
|
notice_id,
|
|
notice_id,
|
|
image,
|
|
image,
|
|
@@ -99,12 +100,12 @@ WHERE
|
|
sender_id = ${senderId}
|
|
sender_id = ${senderId}
|
|
AND type = '2'
|
|
AND type = '2'
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<select id="selectXiaoyuanNoticeByNoticeId" parameterType="Integer" resultMap="XiaoyuanNoticeResult">
|
|
<select id="selectXiaoyuanNoticeByNoticeId" parameterType="Integer" resultMap="XiaoyuanNoticeResult">
|
|
<include refid="selectXiaoyuanNoticeVo"/>
|
|
<include refid="selectXiaoyuanNoticeVo"/>
|
|
where notice_id = #{noticeId}
|
|
where notice_id = #{noticeId}
|
|
</select>
|
|
</select>
|
|
- <select id="selectXiaoyuanNoticeMyList" resultType="com.ruoyi.system.domain.XiaoyuanNotice">
|
|
|
|
|
|
+ <select id="selectXiaoyuanNoticeMyList" resultMap="XiaoyuanNoticeResult">
|
|
<include refid="selectXiaoyuanNoticeVo"/>
|
|
<include refid="selectXiaoyuanNoticeVo"/>
|
|
where sender_id = #{senderId}
|
|
where sender_id = #{senderId}
|
|
</select>
|
|
</select>
|
|
@@ -128,7 +129,7 @@ WHERE
|
|
<if test="updateBy != null">update_by,</if>
|
|
<if test="updateBy != null">update_by,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="remark != null">remark,</if>
|
|
<if test="remark != null">remark,</if>
|
|
- </trim>
|
|
|
|
|
|
+ </trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="image != null">#{image},</if>
|
|
<if test="image != null">#{image},</if>
|
|
<if test="noticeTitle != null and noticeTitle != ''">#{noticeTitle},</if>
|
|
<if test="noticeTitle != null and noticeTitle != ''">#{noticeTitle},</if>
|
|
@@ -146,7 +147,7 @@ WHERE
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="remark != null">#{remark},</if>
|
|
<if test="remark != null">#{remark},</if>
|
|
- </trim>
|
|
|
|
|
|
+ </trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<update id="updateXiaoyuanNotice" parameterType="XiaoyuanNotice">
|
|
<update id="updateXiaoyuanNotice" parameterType="XiaoyuanNotice">
|
|
@@ -177,7 +178,7 @@ WHERE
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteXiaoyuanNoticeByNoticeIds" parameterType="String">
|
|
<delete id="deleteXiaoyuanNoticeByNoticeIds" parameterType="String">
|
|
- delete from xiaoyuan_notice where notice_id in
|
|
|
|
|
|
+ delete from xiaoyuan_notice where notice_id in
|
|
<foreach item="noticeId" collection="array" open="(" separator="," close=")">
|
|
<foreach item="noticeId" collection="array" open="(" separator="," close=")">
|
|
#{noticeId}
|
|
#{noticeId}
|
|
</foreach>
|
|
</foreach>
|