顾绍勇 vor 5 Jahren
Ursprung
Commit
0bee94f2cd
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 2
    1
      src/main/resources/mapper/TaRecommendCustomerMapper.xml

+ 2
- 1
src/main/resources/mapper/TaRecommendCustomerMapper.xml Datei anzeigen

582
         IF( t.sex = 1, '男', IF ( t.sex = 2, '女', '未知' ) ) AS sex,
582
         IF( t.sex = 1, '男', IF ( t.sex = 2, '女', '未知' ) ) AS sex,
583
         t.create_date,
583
         t.create_date,
584
         concat( t.country, t.province ) AS province,
584
         concat( t.country, t.province ) AS province,
585
-        t.intention,
585
+        z.intention,
586
         IF(t.building_id is null or t.building_id = '','否','是') AS belongStatus,
586
         IF(t.building_id is null or t.building_id = '','否','是') AS belongStatus,
587
         IFNULL( t2.building_name, '暂无' ) AS buildingName,
587
         IFNULL( t2.building_name, '暂无' ) AS buildingName,
588
         t5.scene_alias as sceneType,
588
         t5.scene_alias as sceneType,
598
         LEFT JOIN td_wx_dict t5 ON t4.scene_id = t5.scene_id
598
         LEFT JOIN td_wx_dict t5 ON t4.scene_id = t5.scene_id
599
         LEFT JOIN (select sum(points_amount) as points,person_id from ta_points_records where org_id = #{orgId} GROUP BY
599
         LEFT JOIN (select sum(points_amount) as points,person_id from ta_points_records where org_id = #{orgId} GROUP BY
600
         person_id) t6 on t.person_id = t6.person_id
600
         person_id) t6 on t.person_id = t6.person_id
601
+        left join (select sum(ti.intention) as intention,ti.person_id From ta_person_intention_record ti where ti.org_id = #{orgId} group by ti.person_id) z on z.person_id = t.person_id
601
         WHERE
602
         WHERE
602
         t.`status` > 0
603
         t.`status` > 0
603
         AND t.verify_status = 1
604
         AND t.verify_status = 1