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

+ 2
- 1
src/main/resources/mapper/TsConsultantKpiMapper.xml 查看文件

157
             e.create_date as visit_time
157
             e.create_date as visit_time
158
         FROM ta_customer_from e
158
         FROM ta_customer_from e
159
         INNER JOIN ta_person t ON t.person_id = e.person_id
159
         INNER JOIN ta_person t ON t.person_id = e.person_id
160
+        INNER JOIN ta_person s ON s.person_id = e.share_person_id
160
         WHERE e.org_id = #{orgId}
161
         WHERE e.org_id = #{orgId}
161
         <if test="buildingId != null and buildingId !=''">
162
         <if test="buildingId != null and buildingId !=''">
162
             AND e.building_id = #{buildingId}
163
             AND e.building_id = #{buildingId}
164
         AND e.target_type is not null
165
         AND e.target_type is not null
165
         AND e.create_date BETWEEN #{startDate} and #{endDate}
166
         AND e.create_date BETWEEN #{startDate} and #{endDate}
166
         AND e.is_project_first = 1
167
         AND e.is_project_first = 1
167
-        AND t.user_id = #{userId}
168
+        AND s.user_id = #{userId}
168
 
169
 
169
         AND t.person_type != 'Realty Consultant'
170
         AND t.person_type != 'Realty Consultant'
170
 
171