Selaa lähdekoodia

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

张延森 5 vuotta sitten
vanhempi
commit
c0639f83ca
1 muutettua tiedostoa jossa 7 lisäystä ja 2 poistoa
  1. 7
    2
      src/main/resources/mapper/TsConsultantKpiMapper.xml

+ 7
- 2
src/main/resources/mapper/TsConsultantKpiMapper.xml Näytä tiedosto

24
                 IFNULL(sum( t.chat_persons ),0) AS chat_persons,
24
                 IFNULL(sum( t.chat_persons ),0) AS chat_persons,
25
                 IFNULL(sum( t.favor_num ),0) AS favor_num,
25
                 IFNULL(sum( t.favor_num ),0) AS favor_num,
26
                 (select count(DISTINCT s.customer_id) from ta_recommend_customer s
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
             FROM
32
             FROM
29
                 ts_consultant_kpi t
33
                 ts_consultant_kpi t
30
             LEFT JOIN ta_person m on m.org_id = #{orgId} and m.user_id = t.user_id
34
             LEFT JOIN ta_person m on m.org_id = #{orgId} and m.user_id = t.user_id
141
         WHERE
145
         WHERE
142
             p.org_id = #{orgId}
146
             p.org_id = #{orgId}
143
             AND p.`status` > 0
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
         <if test="buildingIds != null">
150
         <if test="buildingIds != null">
146
             AND t.building_id in
151
             AND t.building_id in
147
             <foreach item="buildingId" index="index" collection="buildingIds"
152
             <foreach item="buildingId" index="index" collection="buildingIds"