张延森 5 년 전
부모
커밋
f9ea8a95c7
1개의 변경된 파일5개의 추가작업 그리고 9개의 파일을 삭제
  1. 5
    9
      src/main/resources/mapper/TsConsultantKpiMapper.xml

+ 5
- 9
src/main/resources/mapper/TsConsultantKpiMapper.xml 파일 보기

@@ -155,21 +155,17 @@
155 155
         SELECT
156 156
             t.*,
157 157
             e.create_date as visit_time
158
-        FROM ta_share_person_from e
158
+        FROM ta_customer_from e
159 159
         INNER JOIN ta_person t ON t.person_id = e.person_id
160 160
         WHERE e.org_id = #{orgId}
161
-        AND e.share_person = #{userId}
162
-        AND (
163
-            e.target_type IN ( 'card_share', 'building_share', 'dynamic_share', 'group_share', 'h5_share', 'help_share', 'house_share', 'live_share', 'news_share', 'poster' )
164
-            or ( e.target_type = 'share' and e.target_id = 'index' )
165
-        )
166
-        AND e.create_date BETWEEN #{startDate} and #{endDate}
167 161
         <if test="buildingId != null and buildingId !=''">
168 162
             AND e.building_id = #{buildingId}
169 163
         </if>
170
-        AND e.is_first_time = 1
164
+        AND e.target_type is not null
165
+        AND e.create_date BETWEEN #{startDate} and #{endDate}
166
+        AND e.is_project_first = 1
167
+        AND t.user_id = #{userId}
171 168
 
172
-        AND t.phone is not null
173 169
         AND t.person_type != 'Realty Consultant'
174 170
 
175 171
 <!--        为了与存储过程一致 -->