|
@@ -3,13 +3,14 @@
|
3
|
3
|
<mapper namespace="com.huiju.estateagents.mapper.TaSharePersonFromMapper">
|
4
|
4
|
|
5
|
5
|
<select id="countViewNum" resultType="java.lang.Integer">
|
6
|
|
- select count(*) from (
|
|
6
|
+ select count(*) from (
|
7
|
7
|
select count(1) from ta_share_person_from t
|
8
|
|
- left join ta_person a on t.share_person = a.person_id or t.share_person = a.user_id
|
|
8
|
+ left join ta_person a on t.share_person = a.person_id
|
|
9
|
+ left join ta_person b on t.share_person = b.user_id
|
9
|
10
|
where
|
10
|
|
- (t.share_person = #{userId}
|
|
11
|
+ t.share_person in (#{userId}
|
11
|
12
|
<if test="personId != null and personId != ''">
|
12
|
|
- or t.share_person = #{personId}
|
|
13
|
+ ,#{personId}
|
13
|
14
|
</if>
|
14
|
15
|
)
|
15
|
16
|
and t.org_id = #{orgId} and t.status = 1 and t.person_id != #{personId}
|
|
@@ -20,6 +21,6 @@
|
20
|
21
|
and date_format(t.create_date,'%Y-%m-%d') <= date_format(#{endCreateDate},'%Y-%m-%d')
|
21
|
22
|
</if>
|
22
|
23
|
GROUP BY t.person_id
|
23
|
|
- ) t
|
|
24
|
+ ) t
|
24
|
25
|
</select>
|
25
|
26
|
</mapper>
|