|
@@ -24,6 +24,7 @@ import org.apache.commons.collections.map.HashedMap; |
|
@@ -24,6 +24,7 @@ import org.apache.commons.collections.map.HashedMap; |
24
|
import org.apache.commons.lang.StringUtils;
|
24
|
import org.apache.commons.lang.StringUtils;
|
25
|
import org.slf4j.Logger;
|
25
|
import org.slf4j.Logger;
|
26
|
import org.slf4j.LoggerFactory;
|
26
|
import org.slf4j.LoggerFactory;
|
|
|
27
|
+import org.springframework.beans.BeanUtils;
|
27
|
import org.springframework.beans.factory.annotation.Autowired;
|
28
|
import org.springframework.beans.factory.annotation.Autowired;
|
28
|
import org.springframework.stereotype.Service;
|
29
|
import org.springframework.stereotype.Service;
|
29
|
import org.springframework.util.CollectionUtils;
|
30
|
import org.springframework.util.CollectionUtils;
|
|
@@ -115,8 +116,16 @@ public class ChannelGroupServiceImpl implements IChannelGroupService { |
|
@@ -115,8 +116,16 @@ public class ChannelGroupServiceImpl implements IChannelGroupService { |
115
|
// (2)查询:总数和列表
|
116
|
// (2)查询:总数和列表
|
116
|
channelGroupRequestBO.setStatus(1);
|
117
|
channelGroupRequestBO.setStatus(1);
|
117
|
int total = channelGroupDAO.selectListCountByParam(channelGroupRequestBO);
|
118
|
int total = channelGroupDAO.selectListCountByParam(channelGroupRequestBO);
|
118
|
- List<ChannelGroupRspBO> channelGroupBOList = channelGroupDAO.selectListByParam(channelGroupRequestBO);
|
119
|
+ List<ChannelGroup> channelGroups = Collections.emptyList();
|
|
|
120
|
+ if(total>0){
|
|
|
121
|
+ channelGroups =channelGroupDAO.selectListByParam(channelGroupRequestBO);
|
|
|
122
|
+ }
|
119
|
|
123
|
|
|
|
124
|
+ List<ChannelGroupRspBO> channelGroupBOList = Lists.transform(channelGroups,input -> {
|
|
|
125
|
+ ChannelGroupRspBO output = new ChannelGroupRspBO();
|
|
|
126
|
+ BeanUtils.copyProperties(input, output);
|
|
|
127
|
+ return output;
|
|
|
128
|
+ });
|
120
|
// (3)返回
|
129
|
// (3)返回
|
121
|
PageChannelGroupRspBO pageChannelGroupRspBO = new PageChannelGroupRspBO();
|
130
|
PageChannelGroupRspBO pageChannelGroupRspBO = new PageChannelGroupRspBO();
|
122
|
pageChannelGroupRspBO.setList(channelGroupBOList);
|
131
|
pageChannelGroupRspBO.setList(channelGroupBOList);
|