|
|
@@ -33,12 +33,12 @@
|
|
|
resultType="com.xjrsoft.module.oa.vo.NewsPageVo">
|
|
|
select
|
|
|
t.*,t2.name as create_user_name
|
|
|
- <if test="dto.type != null and dto.type == 2 and dto.loginId != null">
|
|
|
+ <if test="dto.loginId != null">
|
|
|
,t3.read_mark
|
|
|
</if>
|
|
|
from xjr_oa_news t
|
|
|
left join xjr_user t2 on t.create_user_id = t2.id
|
|
|
- <if test="dto.type != null and dto.type == 2 and dto.loginId != null">
|
|
|
+ <if test="dto.loginId != null">
|
|
|
left join xjr_oa_news_relation t3 on t.id = t3.news_id and t3.user_id = #{dto.loginId}
|
|
|
</if>
|
|
|
where t.delete_mark = 0 and
|
|
|
@@ -46,9 +46,6 @@
|
|
|
and t.status = 2
|
|
|
<if test="dto.type != null and dto.type == 2 and dto.loginId != null">
|
|
|
and (t.send_range = 1 or t.id in (select news_id from xjr_oa_news_relation t1 where user_id = #{dto.loginId}))
|
|
|
- <if test="dto.readMark != null">
|
|
|
- and t3.read_mark = #{dto.loginId}
|
|
|
- </if>
|
|
|
</if>
|
|
|
<if test="dto.type != null and dto.type == 1">
|
|
|
and t.wf_status = 1
|
|
|
@@ -63,6 +60,9 @@
|
|
|
and (t.full_head LIKE CONCAT('%',#{dto.keyword},'%')
|
|
|
or t.news_content LIKE CONCAT('%',#{dto.keyword},'%'))
|
|
|
</if>
|
|
|
+ <if test="dto.loginId != null and dto.readMark != null">
|
|
|
+ and t3.read_mark = #{dto.readMark}
|
|
|
+ </if>
|
|
|
order by
|
|
|
t.release_time desc
|
|
|
</select>
|