dingxin 5 年前
父节点
当前提交
b5fe139ebd

+ 2
- 0
src/main/java/com/huiju/estateagents/service/impl/TaRecommendCustomerServiceImpl.java 查看文件

@@ -220,6 +220,7 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
220 220
         QueryWrapper<TaRecommendCustomer> queryWrapper = new QueryWrapper<>();
221 221
         queryWrapper.eq("phone", taRecommendCustomer.getPhone());
222 222
         queryWrapper.eq("building_id",taRecommendCustomer.getBuildingId());
223
+        queryWrapper.in("verify_status",CommConstant.VERIFY_AGREE,CommConstant.VERIFY_READY);
223 224
         List<TaRecommendCustomer> result = taRecommendCustomerMapper.selectList(queryWrapper);
224 225
         if (null != result && result.size() > 0) {
225 226
             return ResponseBean.error("当前客户已被推荐, 不能再次推荐", ResponseBean.ERROR_ILLEGAL_PARAMS);
@@ -301,6 +302,7 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
301 302
         queryWrapper.eq("name", taRecommendCustomer.getName());
302 303
         queryWrapper.eq("phone", taRecommendCustomer.getPhone());
303 304
         queryWrapper.eq("building_id",taRecommendCustomer.getBuildingId());
305
+        queryWrapper.in("verify_status",CommConstant.VERIFY_AGREE,CommConstant.VERIFY_READY);
304 306
         List<TaRecommendCustomer> result = taRecommendCustomerMapper.selectList(queryWrapper);
305 307
         if (null != result && result.size() > 0) {
306 308
             return ResponseBean.error("当前客户已被报备, 不能再次报备", ResponseBean.ERROR_ILLEGAL_PARAMS);

+ 1
- 0
src/main/java/com/huiju/estateagents/statistic/service/impl/TsCustomerStatisticDailyServiceImpl.java 查看文件

@@ -86,6 +86,7 @@ public class TsCustomerStatisticDailyServiceImpl extends ServiceImpl<TsCustomerS
86 86
 		//31天前的日期
87 87
 		LocalDateTime beforeDate = nowDate.plusDays(-31);
88 88
 		//获取31天的日期数据
89
+
89 90
 		List<TsCustomerStatisticDaily> list = customerStatisticDailyMapper.getDailyList(customerType,orgId,nowDate,beforeDate);
90 91
 		return list;
91 92
 	}

+ 1
- 1
src/main/resources/mapper/TaBuildingMapper.xml 查看文件

@@ -196,7 +196,7 @@
196 196
 
197 197
     <select id="getBuildingListById" resultType="com.huiju.estateagents.entity.TaBuilding">
198 198
       select * from ta_building t where t.building_id in (
199
-	    select t.building_id from ta_goods t where t.org_id = #{orgId} and t.city_id = #{cityId} group by t.building_id
199
+	    select t.building_id from ta_goods t where t.org_id = #{orgId} and t.city_id = #{cityId} and `status`=1 group by t.building_id
200 200
       )
201 201
     </select>
202 202
 

+ 1
- 1
src/main/resources/mapper/statistic/TsCustomerGenderStatisticMapper.xml 查看文件

@@ -46,7 +46,7 @@
46 46
                     t.enlist_id,
47 47
                     c.*
48 48
                 FROM
49
-                    ta_activity_dynamic_enlist t
49
+                    ts_activity_dynamic_enlist t
50 50
                     LEFT JOIN ta_recommend_customer c ON t.person_id = c.person_id
51 51
                     AND t.building_id = c.building_id
52 52
                     AND t.org_id = c.org_id

+ 4
- 4
src/main/resources/mapper/statistic/TsCustomerStatisticDailyMapper.xml 查看文件

@@ -3,7 +3,7 @@
3 3
 <mapper namespace="com.huiju.estateagents.statistic.mapper.TsCustomerStatisticDailyMapper">
4 4
 
5 5
     <delete id="deleteNowDate">
6
-        delete from ta_customer_statistic_daily
6
+        delete from ts_customer_statistic_daily
7 7
         where customer_type = #{customerType}
8 8
         AND date_format( create_date, '%Y-%m-%d' ) = date_format( #{nowDate}, '%Y-%m-%d' )
9 9
     </delete>
@@ -13,7 +13,7 @@
13 13
             org_id,
14 14
             count( DISTINCT ( customer_id ) ) as customer_num
15 15
         FROM
16
-            ta_customer_follow_up_record
16
+            ts_customer_follow_up_record
17 17
         WHERE
18 18
             date_format( create_date, '%Y-%m-%d' ) = date_format( #{nowDate}, '%Y-%m-%d' )
19 19
         GROUP BY
@@ -37,7 +37,7 @@
37 37
             count( DISTINCT ( c.customer_id ) ) as customer_num,
38 38
             c.org_id
39 39
         FROM
40
-            ta_activity_dynamic_enlist t
40
+            ts_activity_dynamic_enlist t
41 41
             LEFT JOIN ta_recommend_customer c ON t.person_id = c.person_id
42 42
             AND t.building_id = c.building_id
43 43
             AND t.org_id = c.org_id
@@ -52,7 +52,7 @@
52 52
         SELECT
53 53
           *
54 54
         FROM
55
-          ta_customer_statistic_daily
55
+          ts_customer_statistic_daily
56 56
         WHERE
57 57
           org_id = #{orgId}
58 58
         AND customer_type = #{customerType}

+ 3
- 3
src/main/resources/mapper/statistic/TsCustomerStatisticMonthlyMapper.xml 查看文件

@@ -22,7 +22,7 @@
22 22
             org_id,
23 23
             count( DISTINCT ( customer_id ) ) as customer_num
24 24
         FROM
25
-            ta_customer_follow_up_record
25
+            ts_customer_follow_up_record
26 26
         WHERE
27 27
             date_format( create_date, '%Y-%m' ) = date_format( #{nowDate}, '%Y-%m' )
28 28
         GROUP BY
@@ -34,7 +34,7 @@
34 34
             count( DISTINCT ( c.customer_id ) ) as customer_num,
35 35
             c.org_id
36 36
         FROM
37
-            ta_activity_dynamic_enlist t
37
+            ts_activity_dynamic_enlist t
38 38
             LEFT JOIN ta_recommend_customer c ON t.person_id = c.person_id
39 39
             AND t.building_id = c.building_id
40 40
             AND t.org_id = c.org_id
@@ -48,7 +48,7 @@
48 48
         SELECT
49 49
           *
50 50
         FROM
51
-          ta_customer_statistic_monthly
51
+          ts_customer_statistic_monthly
52 52
         WHERE
53 53
           org_id = #{orgId}
54 54
         AND customer_type = #{customerType}