Explorar el Código

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/estateagents into dev

傅行帆 hace 5 años
padre
commit
4249fd380d
Se han modificado 1 ficheros con 6 adiciones y 5 borrados
  1. 6
    5
      src/main/resources/mapper/TsConsultantKpiMapper.xml

+ 6
- 5
src/main/resources/mapper/TsConsultantKpiMapper.xml Ver fichero

@@ -167,6 +167,7 @@
167 167
         AND e.is_first_time = 1
168 168
 
169 169
         AND t.phone is not null
170
+        AND t.person_type != 'Realty Consultant'
170 171
 
171 172
 <!--        为了与存储过程一致 -->
172 173
 <!--        AND t.`status` = 1-->
@@ -177,7 +178,7 @@
177 178
         SELECT
178 179
             t.*,
179 180
             count( * ) as visit_times,
180
-            MAX(f.visit_time) as visit_time
181
+            f.visit_time as visit_time
181 182
         FROM
182 183
             ta_person t
183 184
         INNER JOIN ta_person_visit_record f ON f.org_id = #{orgId} AND f.person_id = t.person_id
@@ -195,8 +196,8 @@
195 196
 
196 197
 <!--        为了与存储过程一致 -->
197 198
 <!--            AND s.`status` = 1-->
198
-        GROUP BY t.person_id, DATE_FORMAT(t.create_date, '%Y%m%d')
199
-        ORDER BY t.create_date DESC
199
+        GROUP BY t.person_id, DATE_FORMAT(f.visit_time, '%Y%m%d')
200
+        ORDER BY f.visit_time DESC
200 201
     </select>
201 202
 
202 203
     <select id="getConsultantHomePageTimes" resultType="com.huiju.estateagents.entity.TaPerson">
@@ -229,7 +230,7 @@
229 230
     <select id="getConsultantChatPersons" resultType="com.huiju.estateagents.entity.TaPerson">
230 231
         SELECT
231 232
             t.*,
232
-            max( h.create_date ) AS visit_time
233
+            h.create_date AS visit_time
233 234
         FROM
234 235
             ta_person t
235 236
         INNER JOIN ta_chat h ON h.send_person = t.person_id
@@ -311,7 +312,7 @@
311 312
         SELECT
312 313
             t.*,
313 314
             count(*) as visit_times,
314
-            max(e.create_date) as visit_time
315
+            e.create_date as visit_time
315 316
         FROM ta_share_person_from e
316 317
         INNER JOIN ta_person t ON t.person_id = e.person_id
317 318
         WHERE e.org_id = #{orgId}