|
@@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<select id="selectPublish" resultType="com.ruoyi.app.domain.TbMyPublish">
|
|
|
select b.*,(case when message = 'Y' then concat('#给',nick_name,'的留言纪念') else '' end) message_content
|
|
|
from (
|
|
|
- select a.*,
|
|
|
+ select a.*,#{familyId} family_id,
|
|
|
(select id from tb_family_member m where m.app_user_id = a.app_user_id) member_id,
|
|
|
(select name from tb_family_member m where m.app_user_id = a.app_user_id) name,
|
|
|
(select nick_name from tb_app_user us where us.id = a.app_user_id)nick_name,
|
|
@@ -37,10 +37,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
(select avatar from tb_app_user us where us.id = a.message_user_id)message_user_avatar,
|
|
|
(select count(1) from tb_publish_thumbs where publish_id = a.id)thumbs
|
|
|
from (
|
|
|
- select p.*,'1' publish_type from tb_my_publish p
|
|
|
+ select p.* from tb_my_publish p
|
|
|
where deleted = 'N' and app_user_id = #{appUserId}
|
|
|
union
|
|
|
- select p.*,'2' publish_type from tb_my_publish p
|
|
|
+ select p.* from tb_my_publish p
|
|
|
where deleted = 'N' and app_user_id in (
|
|
|
select f.app_user_id uid from tb_my_friends f where friends_user_id = #{appUserId} and status = 2
|
|
|
union all
|
|
@@ -48,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
)
|
|
|
<if test="familyId != null and familyId != '' ">
|
|
|
union
|
|
|
- select p.*,'1' publish_type from tb_my_publish p
|
|
|
+ select p.* from tb_my_publish p
|
|
|
where deleted = 'N' and app_user_id in (
|
|
|
select u.id from tb_app_user u
|
|
|
left join tb_family_member m on u.id = m.app_user_id
|