|
|
@@ -30,12 +30,11 @@
|
|
|
select
|
|
|
t.*
|
|
|
from xjr_oa_news t
|
|
|
- left join xjr_oa_news_relation t1 on t1.news_id = t.id
|
|
|
where t.delete_mark = 0 and
|
|
|
(t.send_end_date > now() or t.send_end_date is null)
|
|
|
and t.status = 2
|
|
|
- <if test="dto.type != null and dto.type == 2 and dto.loginId != null and dto.loginId > 0">
|
|
|
- and (t1.user_id = #{dto.loginId} or t.send_range = 1)
|
|
|
+ <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>
|
|
|
<if test="dto.type != null and dto.type == 1">
|
|
|
and t.wf_status = 1
|