|
@@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<resultMap id="ZxNoticeZxUserNoticeResult" type="ZxNotice" extends="ZxNoticeResult">
|
|
|
<collection property="zxUserNoticeList" notNullColumn="sub_user_id" javaType="java.util.List" resultMap="ZxUserNoticeResult" />
|
|
|
- <collection property="zxFjList" notNullColumn="fj_source_id" javaType="java.util.List" resultMap="ZxFjResult" />
|
|
|
+ <collection property="zxFjList" javaType="java.util.List" resultMap="ZxFjResult" />
|
|
|
|
|
|
</resultMap>
|
|
|
|
|
@@ -57,13 +57,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
a.issuer_dept, a.issuer_dept_id, a.issuer_time, a.create_by, a.create_time, a.update_by, a.update_time,
|
|
|
a.remark,
|
|
|
b.user_id as sub_user_id,
|
|
|
- b.zx_notice_type as type,
|
|
|
- f.id as fj_id,f.main_id as fj_main_id, f.source_id as fj_source_id, f.name as fj_name, f.url as fj_url, f.type as fj_type,f.stytle as fj_stytle
|
|
|
+ b.zx_notice_type as type
|
|
|
from zx_notice a
|
|
|
left join zx_user_notice b on b.zx_notice_id = a.zx_notice_id
|
|
|
- left join zx_fj f on f.source_id = a.zx_notice_id
|
|
|
<where>
|
|
|
- f.type = '3'
|
|
|
<if test="userId != null">and b.user_id = #{userId}</if>
|
|
|
<if test="zxNoticeId != null">and a.zx_notice_id = #{zxNoticeId}</if>
|
|
|
<if test="noticeTitle != null and noticeTitle != ''">and a.notice_title = #{noticeTitle}</if>
|
|
@@ -84,12 +81,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectZxNoticeByZxNoticeId" parameterType="Long" resultMap="ZxNoticeZxUserNoticeResult">
|
|
|
select a.zx_notice_id, a.notice_title, a.notice_type, a.notice_content, a.status, a.issuer, a.issuer_dept, a.issuer_dept_id, a.issuer_time, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,
|
|
|
- b.user_id as sub_user_id, b.user_name as sub_user_name,b.zx_notice_type as sub_zx_notice_type, b.zx_notice_id as sub_zx_notice_id, b.create_time as sub_create_time,
|
|
|
- f.id as fj_id,f.main_id as fj_main_id, f.source_id as fj_source_id, f.name as fj_name, f.url as fj_url, f.type as fj_type,f.stytle as fj_stytle
|
|
|
+ b.user_id as sub_user_id, b.user_name as sub_user_name,b.zx_notice_type as sub_zx_notice_type, b.zx_notice_id as sub_zx_notice_id, b.create_time as sub_create_time
|
|
|
from zx_notice a
|
|
|
left join zx_user_notice b on b.zx_notice_id = a.zx_notice_id
|
|
|
- left join zx_fj f on f.source_id = a.zx_notice_id
|
|
|
- where a.zx_notice_id = #{zxNoticeId} and f.type = '3'
|
|
|
+ where a.zx_notice_id = #{zxNoticeId}
|
|
|
</select>
|
|
|
<select id="selectZxUserNoticeByUserIdAndNoticeId" resultType="java.lang.Integer">
|
|
|
select count(1) from zx_user_notice where user_id = #{userId} and zx_notice_id =#{zxNoticeId}
|