张延森 пре 5 година
родитељ
комит
36b8faaa5f
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2
    1
      src/main/resources/mapper/TsConsultantKpiMapper.xml

+ 2
- 1
src/main/resources/mapper/TsConsultantKpiMapper.xml Прегледај датотеку

@@ -157,6 +157,7 @@
157 157
             e.create_date as visit_time
158 158
         FROM ta_customer_from e
159 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 161
         WHERE e.org_id = #{orgId}
161 162
         <if test="buildingId != null and buildingId !=''">
162 163
             AND e.building_id = #{buildingId}
@@ -164,7 +165,7 @@
164 165
         AND e.target_type is not null
165 166
         AND e.create_date BETWEEN #{startDate} and #{endDate}
166 167
         AND e.is_project_first = 1
167
-        AND t.user_id = #{userId}
168
+        AND s.user_id = #{userId}
168 169
 
169 170
         AND t.person_type != 'Realty Consultant'
170 171