|
@@ -30,16 +30,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
from (
|
|
|
select a.*,
|
|
|
(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,
|
|
|
(select avatar from tb_app_user us where us.id = a.app_user_id)avatar,
|
|
|
(select nick_name from tb_app_user us where us.id = a.message_user_id)message_user,
|
|
|
(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 * from tb_my_publish p
|
|
|
+ select p.*,'1' publish_type from tb_my_publish p
|
|
|
where deleted = 'N' and app_user_id = #{appUserId}
|
|
|
union
|
|
|
- select * from tb_my_publish p
|
|
|
+ select p.*,'2' publish_type 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
|
|
@@ -47,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
)
|
|
|
<if test="familyId != null and familyId != '' ">
|
|
|
union
|
|
|
- select * from tb_my_publish p
|
|
|
+ select p.*,'1' publish_type 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
|