Przeglądaj źródła

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

张延森 5 lat temu
rodzic
commit
c0639f83ca

+ 7
- 2
src/main/resources/mapper/TsConsultantKpiMapper.xml Wyświetl plik

@@ -24,7 +24,11 @@
24 24
                 IFNULL(sum( t.chat_persons ),0) AS chat_persons,
25 25
                 IFNULL(sum( t.favor_num ),0) AS favor_num,
26 26
                 (select count(DISTINCT s.customer_id) from ta_recommend_customer s
27
-                 where s.org_id = t.org_id and (s.realty_consultant = t.user_id or s.realty_consultant = m.person_id) and (s.building_id = t.building_id or IFNULL(t.building_id, '') = '') and s.status > 0) as total_persons
27
+                 where s.org_id = t.org_id and (s.realty_consultant = t.user_id or s.realty_consultant = m.person_id)
28
+                 and (s.building_id = t.building_id or IFNULL(t.building_id, '') = '')
29
+                 and s.status > 0
30
+                 AND s.create_date BETWEEN STR_TO_DATE( #{startDate}, '%Y%m%d' )
31
+                 AND  STR_TO_DATE(concat(#{endDate}, '235959'), '%Y%m%d%H%i%s')) as total_persons
28 32
             FROM
29 33
                 ts_consultant_kpi t
30 34
             LEFT JOIN ta_person m on m.org_id = #{orgId} and m.user_id = t.user_id
@@ -141,7 +145,8 @@
141 145
         WHERE
142 146
             p.org_id = #{orgId}
143 147
             AND p.`status` > 0
144
-            AND t.statis_date BETWEEN #{startDate} AND #{endDate}
148
+            AND p.create_date BETWEEN STR_TO_DATE( #{startDate}, '%Y%m%d')
149
+            AND  STR_TO_DATE(concat(#{endDate}, '235959'), '%Y%m%d%H%i%s')
145 150
         <if test="buildingIds != null">
146 151
             AND t.building_id in
147 152
             <foreach item="buildingId" index="index" collection="buildingIds"