傅行帆 5 years ago
parent
commit
a728476a34

+ 1
- 1
src/main/java/com/huiju/estateagents/controller/TaRecommendCustomerController.java View File

784
      * @param request
784
      * @param request
785
      * @return
785
      * @return
786
      */
786
      */
787
-    @GetMapping("/wx/inventory/customer/{type}")
787
+    @GetMapping("/wx/inventory/customer/statistics/{type}")
788
     @ApiOperation(value = "查询我的客户人数统计", notes = "查询我的客户人数统计")
788
     @ApiOperation(value = "查询我的客户人数统计", notes = "查询我的客户人数统计")
789
     public ResponseBean getMyCustFollows(@PathVariable(value = "type") String type,
789
     public ResponseBean getMyCustFollows(@PathVariable(value = "type") String type,
790
                                          @RequestParam(value = "pageNumber",defaultValue = "0") Integer pageNumber,
790
                                          @RequestParam(value = "pageNumber",defaultValue = "0") Integer pageNumber,

+ 1
- 1
src/main/java/com/huiju/estateagents/mapper/TaRecommendCustomerMapper.java View File

158
      * @param userId
158
      * @param userId
159
      * @return
159
      * @return
160
      */
160
      */
161
-	List<Map<String, Object>> getMyCustStatistics(@Param("personId") String personId,@Param("userId") Integer userId,@Param("orgId") Integer orgId);
161
+	Map<String, Object> getMyCustStatistics(@Param("personId") String personId,@Param("userId") Integer userId,@Param("orgId") Integer orgId);
162
     
162
     
163
     /**
163
     /**
164
      * 获取我的跟进客户数据
164
      * 获取我的跟进客户数据

+ 2
- 2
src/main/java/com/huiju/estateagents/service/impl/TaRecommendCustomerServiceImpl.java View File

601
         }
601
         }
602
     
602
     
603
         TaPerson taPerson = taPersons.get(0);
603
         TaPerson taPerson = taPersons.get(0);
604
-        List<Map<String,Object>> list = taRecommendCustomerMapper.getMyCustStatistics(taPerson.getPersonId(),taPerson.getUserId(),taPerson.getOrgId());
605
-        return ResponseBean.success(list);
604
+        Map<String,Object> map = taRecommendCustomerMapper.getMyCustStatistics(taPerson.getPersonId(),taPerson.getUserId(),taPerson.getOrgId());
605
+        return ResponseBean.success(map);
606
     }
606
     }
607
     
607
     
608
     /**
608
     /**

+ 6
- 6
src/main/resources/mapper/Activity.xml View File

3
 <mapper namespace="com.huiju.estateagents.activity.mapper.ActivityMapper">
3
 <mapper namespace="com.huiju.estateagents.activity.mapper.ActivityMapper">
4
 
4
 
5
     <select id="getActivityList" resultType="com.huiju.estateagents.activity.entity.Activity">
5
     <select id="getActivityList" resultType="com.huiju.estateagents.activity.entity.Activity">
6
-        SELECT dynamic_id as id,img_url as main_img,title,start_date as start_date,enlist_end as end_date,weight,activity_status,'dynamic' as type
6
+        SELECT dynamic_id as id,list_img_url as main_img,title,start_date as start_date,enlist_end as end_date,weight,activity_status,'dynamic' as type
7
         FROM ta_building_dynamic
7
         FROM ta_building_dynamic
8
         WHERE org_id = #{orgId}  and `status` = #{status}
8
         WHERE org_id = #{orgId}  and `status` = #{status}
9
         <if test="cityId != null and cityId != ''">
9
         <if test="cityId != null and cityId != ''">
10
           and city_id = #{cityId}
10
           and city_id = #{cityId}
11
         </if>
11
         </if>
12
         UNION  all
12
         UNION  all
13
-        SELECT group_activity_id as id,main_img,activity_name as title,start_time as start_date,end_time as end_date,weight,activity_status,'group' as type
13
+        SELECT group_activity_id as id,list_img as main_img,activity_name as title,start_time as start_date,end_time as end_date,weight,activity_status,'group' as type
14
         from ta_share_activity
14
         from ta_share_activity
15
         WHERE org_id = #{orgId} and `status` = #{status}
15
         WHERE org_id = #{orgId} and `status` = #{status}
16
         <if test="cityId != null and cityId != ''">
16
         <if test="cityId != null and cityId != ''">
17
             and city_id = #{cityId}
17
             and city_id = #{cityId}
18
         </if>
18
         </if>
19
         UNION  all
19
         UNION  all
20
-        SELECT help_activity_id as id,img as main_img,title,start_date,end_date,weight,activity_status,'help' as type
20
+        SELECT help_activity_id as id,list_img as main_img,title,start_date,end_date,weight,activity_status,'help' as type
21
         from ta_help_activity
21
         from ta_help_activity
22
         WHERE org_id = #{orgId} and `status` = #{status}
22
         WHERE org_id = #{orgId} and `status` = #{status}
23
         <if test="cityId != null and cityId != ''">
23
         <if test="cityId != null and cityId != ''">
31
             t.dynamic_id AS activityId,
31
             t.dynamic_id AS activityId,
32
             t.create_date AS createDate,
32
             t.create_date AS createDate,
33
             IF( t.is_checkin = 1, "已签到", "未签到" ) AS `status`,
33
             IF( t.is_checkin = 1, "已签到", "未签到" ) AS `status`,
34
-            d.img_url AS mainImg,
34
+            d.list_img_url AS mainImg,
35
             d.title,
35
             d.title,
36
             d.start_date AS startDate,
36
             d.start_date AS startDate,
37
             d.enlist_end AS endDate,
37
             d.enlist_end AS endDate,
59
         WHEN t.STATUS = 2 THEN
59
         WHEN t.STATUS = 2 THEN
60
         "失败"
60
         "失败"
61
         END `status`,
61
         END `status`,
62
-            d.main_img AS mainImg,
62
+            d.list_img AS mainImg,
63
             d.activity_name AS title,
63
             d.activity_name AS title,
64
             d.start_time AS startDate,
64
             d.start_time AS startDate,
65
             d.end_time AS endDate,
65
             d.end_time AS endDate,
87
                         WHEN t.STATUS = 2 THEN
87
                         WHEN t.STATUS = 2 THEN
88
                         "失败"
88
                         "失败"
89
                     END `status`,
89
                     END `status`,
90
-            d.img AS mainImg,
90
+            d.list_img AS mainImg,
91
             d.title,
91
             d.title,
92
             d.start_date AS startDate,
92
             d.start_date AS startDate,
93
             d.end_date AS endDate,
93
             d.end_date AS endDate,

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

613
             ta_recommend_customer
613
             ta_recommend_customer
614
         WHERE
614
         WHERE
615
             org_id = #{orgId}
615
             org_id = #{orgId}
616
-        AND ( realty_consultant = #{personId} OR realty_consultant = #{userId} )
616
+        AND ( realty_consultant = #{personId}
617
+        <if test="userId != null and userId != ''">
618
+            OR realty_consultant = #{userId}
619
+        </if>
620
+        )
617
     </select>
621
     </select>
618
 
622
 
619
     <select id="getMyCustFollowOrClinch" resultType="com.huiju.estateagents.entity.TaRecommendCustomer">
623
     <select id="getMyCustFollowOrClinch" resultType="com.huiju.estateagents.entity.TaRecommendCustomer">