fuxingfan 3 years ago
parent
commit
09734d46f3

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

@@ -97,10 +97,15 @@ public class TaChannelController extends BaseController {
97 97
         Integer orgId = getOrgId(request);
98 98
 
99 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 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 109
             List<TaChannel> recommendCount = taChannelMapper.recommendCount(orgId, channelId, getInstitutionIds(request));
105 110
 
106 111
             result.getRecords().stream().forEach(e -> {