Browse Source

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

傅行帆 5 years ago
parent
commit
9961d1eaaa
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      src/main/resources/mapper/TaRecommendCustomerMapper.xml

+ 5
- 5
src/main/resources/mapper/TaRecommendCustomerMapper.xml View File

341
             SELECT
341
             SELECT
342
               count( 1 )
342
               count( 1 )
343
             FROM
343
             FROM
344
-              ta_recommend_customer tarc
345
-            LEFT JOIN ta_person tp ON tarc.recommend_person = tp.person_id
344
+              ta_person tp
346
             WHERE
345
             WHERE
347
-              tarc.recommend_person = a.person_id and ifnull(tp.person_type, '') = 'customer'
346
+              tp.recommend_agent = a.person_id
348
         ) AS agentCount,
347
         ) AS agentCount,
349
         (
348
         (
350
             SELECT
349
             SELECT
351
               count( 1 )
350
               count( 1 )
352
             FROM
351
             FROM
353
               ta_recommend_customer tarc
352
               ta_recommend_customer tarc
354
-            LEFT JOIN ta_person tp ON tarc.recommend_person = tp.person_id
355
             WHERE
353
             WHERE
356
-              tarc.recommend_person = a.person_id and ifnull(tp.person_type, '') in ('channel agent', 'estate agent')
354
+              tarc.recommend_person = a.person_id
355
+              and tarc.status = 1
356
+              and tarc.org_id = #{orgId}
357
         ) AS recommedCount
357
         ) AS recommedCount
358
         FROM
358
         FROM
359
         ta_person a
359
         ta_person a