傅行帆 3 years ago
parent
commit
edb9505251

+ 1
- 1
src/main/java/com/yunzhi/marketing/xlk/controller/ChannelCustomerController.java View File

95
                     phone,
95
                     phone,
96
                     recommendPersonName,
96
                     recommendPersonName,
97
                     recommendPhone,
97
                     recommendPhone,
98
-                    status,type);
98
+                    status,type,getUserId(request));
99
             responseBean.addSuccess(result);
99
             responseBean.addSuccess(result);
100
         }catch (Exception e){
100
         }catch (Exception e){
101
             e.printStackTrace();
101
             e.printStackTrace();

+ 2
- 1
src/main/java/com/yunzhi/marketing/xlk/mapper/ChannelCustomerMapper.java View File

32
                                           @Param("phone") String phone,
32
                                           @Param("phone") String phone,
33
                                           @Param("recommendPersonName") String recommendPersonName,
33
                                           @Param("recommendPersonName") String recommendPersonName,
34
                                           @Param("recommendPhone") String recommendPhone,
34
                                           @Param("recommendPhone") String recommendPhone,
35
-                                          @Param("status") String status,@Param("type") String type);
35
+                                          @Param("status") String status,@Param("type") String type,
36
+                                          @Param("institutionCode") String institutionCode);
36
 
37
 
37
     List<CustomerRankListVO> getRanklist(@Param("params") StatisticsDTO statisticsDTo);
38
     List<CustomerRankListVO> getRanklist(@Param("params") StatisticsDTO statisticsDTo);
38
 
39
 

+ 2
- 1
src/main/java/com/yunzhi/marketing/xlk/service/IChannelCustomerService.java View File

47
                                           String recommendPersonName,
47
                                           String recommendPersonName,
48
                                           String recommendPhone,
48
                                           String recommendPhone,
49
                                           String status,
49
                                           String status,
50
-                                          String type);
50
+                                          String type,
51
+                                          Integer userId);
51
 
52
 
52
     /**
53
     /**
53
      * 驻场认筹
54
      * 驻场认筹

+ 12
- 2
src/main/java/com/yunzhi/marketing/xlk/service/impl/ChannelCustomerServiceImpl.java View File

5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
6
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7
 import com.yunzhi.marketing.base.ResponseBean;
7
 import com.yunzhi.marketing.base.ResponseBean;
8
+import com.yunzhi.marketing.center.taUser.entity.TaUser;
9
+import com.yunzhi.marketing.center.taUser.mapper.TaUserMapper;
8
 import com.yunzhi.marketing.common.CommConstant;
10
 import com.yunzhi.marketing.common.CommConstant;
9
 import com.yunzhi.marketing.common.StringUtils;
11
 import com.yunzhi.marketing.common.StringUtils;
10
 import com.yunzhi.marketing.entity.TaBuilding;
12
 import com.yunzhi.marketing.entity.TaBuilding;
55
 
57
 
56
     @Autowired
58
     @Autowired
57
     private TaBuildingMapper taBuildingMapper;
59
     private TaBuildingMapper taBuildingMapper;
60
+
61
+    @Autowired
62
+    private TaUserMapper taUserMapper;
63
+
64
+    @Autowired
65
+    private InstitutionMapper institutionMapper;
58
     /**
66
     /**
59
      * 审核
67
      * 审核
60
      *
68
      *
310
                                                  String phone,
318
                                                  String phone,
311
                                                  String recommendPersonName,
319
                                                  String recommendPersonName,
312
                                                  String recommendPhone,
320
                                                  String recommendPhone,
313
-                                                 String status,String type) {
314
-        return channelCustomerMapper.getProfileList(pg, orgId, buildingId, name, phone, recommendPersonName, recommendPhone, status, type);
321
+                                                 String status,String type, Integer userId) {
322
+        TaUser taUser = taUserMapper.selectById(userId);
323
+        Institution institution = institutionMapper.selectById(taUser.getInstitutionId());
324
+        return channelCustomerMapper.getProfileList(pg, orgId, buildingId, name, phone, recommendPersonName, recommendPhone, status, type, institution.getInstitutionCode());
315
     }
325
     }
316
 
326
 
317
     /**
327
     /**

+ 2
- 0
src/main/resources/mapper/xlk/ChannelCustomerMapper.xml View File

11
         FROM
11
         FROM
12
             xlk_channel_customer t
12
             xlk_channel_customer t
13
                 LEFT JOIN ta_building s ON t.building_id = s.building_id
13
                 LEFT JOIN ta_building s ON t.building_id = s.building_id
14
+        LEFT JOIN xlk_institution i ON s.institution_id = i.institution_id
14
                 INNER JOIN ta_person m ON t.recommend_person = m.person_id
15
                 INNER JOIN ta_person m ON t.recommend_person = m.person_id
15
         WHERE
16
         WHERE
16
             t.org_id = #{orgId}
17
             t.org_id = #{orgId}
18
+            AND i.institution_code like CONCAT(#{institutionCode}, '%')
17
           <if test="buildingId != null and buildingId != ''">
19
           <if test="buildingId != null and buildingId != ''">
18
               AND t.building_id = #{buildingId}
20
               AND t.building_id = #{buildingId}
19
           </if>
21
           </if>