fuxingfan 3 years ago
parent
commit
09734d46f3

+ 7
- 2
src/main/java/com/yunzhi/marketing/controller/TaChannelController.java View File

97
         Integer orgId = getOrgId(request);
97
         Integer orgId = getOrgId(request);
98
 
98
 
99
         try {
99
         try {
100
-            Institution institution = iInstitutionService.getById(institutionId);
100
+            String institutionCode = null;
101
+            if (!StringUtils.isEmpty(institutionId)){
102
+                Institution institution = iInstitutionService.getById(institutionId);
103
+                institutionCode = institution.getInstitutionCode();
104
+            }
105
+
101
             //使用分页插件
106
             //使用分页插件
102
 		    IPage<TaChannel> pg = new Page<>(pageNum, pageSize);
107
 		    IPage<TaChannel> pg = new Page<>(pageNum, pageSize);
103
-            IPage<TaChannel> result = taChannelMapper.pageTaChannel(pg,orgId,channelId,getInstitutionIds(request),institution.getInstitutionCode());
108
+            IPage<TaChannel> result = taChannelMapper.pageTaChannel(pg,orgId,channelId,getInstitutionIds(request),institutionCode);
104
             List<TaChannel> recommendCount = taChannelMapper.recommendCount(orgId, channelId, getInstitutionIds(request));
109
             List<TaChannel> recommendCount = taChannelMapper.recommendCount(orgId, channelId, getInstitutionIds(request));
105
 
110
 
106
             result.getRecords().stream().forEach(e -> {
111
             result.getRecords().stream().forEach(e -> {