魏超 5 anos atrás
pai
commit
bedb0dd3ae

+ 3
- 0
src/main/resources/mapper/TaPersonVisitRecordMapper.xml Ver arquivo

130
         FROM
130
         FROM
131
             ( SELECT * FROM ta_share_person_from WHERE org_id = #{orgId} and target_id = #{targetId} AND share_person = #{userId} and target_type = #{eventType} ORDER BY create_date DESC LIMIT 999) t
131
             ( SELECT * FROM ta_share_person_from WHERE org_id = #{orgId} and target_id = #{targetId} AND share_person = #{userId} and target_type = #{eventType} ORDER BY create_date DESC LIMIT 999) t
132
             left JOIN ta_person p on t.person_id = p.person_id
132
             left JOIN ta_person p on t.person_id = p.person_id
133
+            where p.user_id != #{userId}
133
         GROUP BY
134
         GROUP BY
134
             t.person_id
135
             t.person_id
135
         ORDER BY
136
         ORDER BY
334
 
335
 
335
     <select id="countShareNumByEventType" resultType="java.lang.Integer">
336
     <select id="countShareNumByEventType" resultType="java.lang.Integer">
336
         select count(DISTINCT t.person_id)  from ta_share_person_from t
337
         select count(DISTINCT t.person_id)  from ta_share_person_from t
338
+        left join ta_person a on t.person_id = a.person_id
337
         where
339
         where
338
         t.share_person = #{userId}
340
         t.share_person = #{userId}
339
         and t.org_id = #{orgId}
341
         and t.org_id = #{orgId}
340
         and t.target_type = #{eventType}
342
         and t.target_type = #{eventType}
341
         and t.target_id = #{targetId}
343
         and t.target_id = #{targetId}
342
         and t.status = 1
344
         and t.status = 1
345
+        and a.user_id != #{userId}
343
         group by t.target_type
346
         group by t.target_type
344
     </select>
347
     </select>
345
 
348