傅行帆 3 years ago
parent
commit
edb9505251

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

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

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

@@ -32,7 +32,8 @@ public interface ChannelCustomerMapper extends BaseMapper<ChannelCustomer> {
32 32
                                           @Param("phone") String phone,
33 33
                                           @Param("recommendPersonName") String recommendPersonName,
34 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 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,7 +47,8 @@ public interface IChannelCustomerService extends IService<ChannelCustomer> {
47 47
                                           String recommendPersonName,
48 48
                                           String recommendPhone,
49 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,6 +5,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
5 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 6
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7 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 10
 import com.yunzhi.marketing.common.CommConstant;
9 11
 import com.yunzhi.marketing.common.StringUtils;
10 12
 import com.yunzhi.marketing.entity.TaBuilding;
@@ -55,6 +57,12 @@ public class ChannelCustomerServiceImpl extends ServiceImpl<ChannelCustomerMappe
55 57
 
56 58
     @Autowired
57 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,8 +318,10 @@ public class ChannelCustomerServiceImpl extends ServiceImpl<ChannelCustomerMappe
310 318
                                                  String phone,
311 319
                                                  String recommendPersonName,
312 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,9 +11,11 @@
11 11
         FROM
12 12
             xlk_channel_customer t
13 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 15
                 INNER JOIN ta_person m ON t.recommend_person = m.person_id
15 16
         WHERE
16 17
             t.org_id = #{orgId}
18
+            AND i.institution_code like CONCAT(#{institutionCode}, '%')
17 19
           <if test="buildingId != null and buildingId != ''">
18 20
               AND t.building_id = #{buildingId}
19 21
           </if>