傅行帆 5 jaren geleden
bovenliggende
commit
b8ed856b83

+ 4
- 1
src/main/java/com/huiju/estateagents/statistic/mapper/TsCustomerGenderStatisticMapper.java Bestand weergeven

@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 4
 import com.huiju.estateagents.statistic.entity.GenderStatistic;
5 5
 import com.huiju.estateagents.statistic.entity.TsCustomerGenderStatistic;
6 6
 import org.apache.ibatis.annotations.Mapper;
7
+import org.apache.ibatis.annotations.Param;
7 8
 
9
+import java.time.LocalDateTime;
8 10
 import java.util.List;
9 11
 
10 12
 /**
@@ -21,8 +23,9 @@ public interface TsCustomerGenderStatisticMapper extends BaseMapper<TsCustomerGe
21 23
 	/**
22 24
 	 * 获取新增客户的男女性别比
23 25
 	 * @return
26
+	 * @param nowDate
24 27
 	 */
25
-	List<GenderStatistic> getNewCustomerSexCount();
28
+	List<GenderStatistic> getNewCustomerSexCount(@Param("nowDate") LocalDateTime nowDate);
26 29
 	
27 30
 	/**
28 31
 	 * 获取跟进客户的男女性别比

+ 1
- 1
src/main/java/com/huiju/estateagents/statistic/service/impl/TsCustomerGenderStatisticServiceImpl.java Bestand weergeven

@@ -36,7 +36,7 @@ public class TsCustomerGenderStatisticServiceImpl extends ServiceImpl<TsCustomer
36 36
 	@Override
37 37
 	public void newCustomerSexStatisticDaily(LocalDateTime nowDate) {
38 38
 		//获取新增客户的男女性别比和性别数
39
-		List<GenderStatistic> newCustomerSexList = customerGenderStatisticMapper.getNewCustomerSexCount();
39
+		List<GenderStatistic> newCustomerSexList = customerGenderStatisticMapper.getNewCustomerSexCount(nowDate);
40 40
 		//批量保存
41 41
 		saveBatchCustomerSexData(newCustomerSexList,nowDate,CommConstant.CUSTOMER_TYPE_NEW);
42 42
 	}

+ 1
- 0
src/main/resources/mapper/TaRecommendCustomerMapper.xml Bestand weergeven

@@ -630,6 +630,7 @@ FROM
630 630
         AND ( realty_consultant = #{personId} OR realty_consultant = #{userId} )
631 631
         <if test="type == 'follow'">
632 632
           AND STATUS != 4
633
+          AND verify_status = 1
633 634
             <if test="name != null and name !=''">
634 635
                 and (`name` like CONCAT('%',#{name}, '%') or phone like CONCAT('%',#{name}, '%'))
635 636
             </if>

+ 1
- 1
src/main/resources/mapper/statistic/TsCustomerGenderStatisticMapper.xml Bestand weergeven

@@ -14,7 +14,7 @@
14 14
         FROM
15 15
             ta_recommend_customer
16 16
         WHERE
17
-            `STATUS` = 1
17
+            date_format( create_date, '%Y-%m-%d' ) = date_format( #{nowDate}, '%Y-%m-%d' )
18 18
             GROUP BY org_id,realty_consultant
19 19
     </select>
20 20
     <select id="getFollowUpSexCount" resultType="com.huiju.estateagents.statistic.entity.GenderStatistic">

+ 1
- 2
src/main/resources/mapper/statistic/TsCustomerStatisticDailyMapper.xml Bestand weergeven

@@ -29,8 +29,7 @@
29 29
         FROM
30 30
             ta_recommend_customer
31 31
         WHERE
32
-            `STATUS` = #{status}
33
-            AND date_format( create_date, '%Y-%m-%d' ) = date_format( #{nowDate}, '%Y-%m-%d' )
32
+             date_format( create_date, '%Y-%m-%d' ) = date_format( #{nowDate}, '%Y-%m-%d' )
34 33
         GROUP BY
35 34
             org_id,realty_consultant
36 35
     </select>

+ 1
- 2
src/main/resources/mapper/statistic/TsCustomerStatisticMonthlyMapper.xml Bestand weergeven

@@ -11,8 +11,7 @@
11 11
         FROM
12 12
             ta_recommend_customer
13 13
         WHERE
14
-            `STATUS` = #{status}
15
-            AND date_format( create_date, '%Y-%m' ) = date_format( #{nowDate}, '%Y-%m' )
14
+            date_format( create_date, '%Y-%m' ) = date_format( #{nowDate}, '%Y-%m' )
16 15
         GROUP BY
17 16
             org_id,realty_consultant
18 17
     </select>