张延森 5 年前
父节点
当前提交
afb1ae7ef7
共有 1 个文件被更改,包括 2 次插入5 次删除
  1. 2
    5
      src/main/resources/mapper/TaPersonVisitRecordMapper.xml

+ 2
- 5
src/main/resources/mapper/TaPersonVisitRecordMapper.xml 查看文件

175
             left join ta_help_activity tha on t.target_id = tha.help_activity_id
175
             left join ta_help_activity tha on t.target_id = tha.help_activity_id
176
             left join ta_share_activity tsa on t.target_id = tsa.group_activity_id
176
             left join ta_share_activity tsa on t.target_id = tsa.group_activity_id
177
             left join ta_building_dynamic tbd on t.target_id = tbd.dynamic_id
177
             left join ta_building_dynamic tbd on t.target_id = tbd.dynamic_id
178
-            left join ta_person c on (t.share_person = c.person_id or t.share_person = c.user_id)
179
-            where 1=1
178
+            left join ta_person c on t.org_id = c.org_id and (t.share_person = c.person_id or t.share_person = c.user_id)
179
+            where t.org_id = #{orgId}
180
             and t.target_type in ('h5_share','group_share','help_share','news_share','dynamic_share','building_share')
180
             and t.target_type in ('h5_share','group_share','help_share','news_share','dynamic_share','building_share')
181
-            <if test="orgId != null and orgId != ''">
182
-                and c.org_id = #{orgId}
183
-            </if>
184
             <if test="eventType !=null and eventType != ''">
181
             <if test="eventType !=null and eventType != ''">
185
                 and t.target_type = #{eventType}
182
                 and t.target_type = #{eventType}
186
             </if>
183
             </if>