Authored by linlong

update

... ... @@ -24,6 +24,7 @@ import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
... ... @@ -115,8 +116,16 @@ public class ChannelGroupServiceImpl implements IChannelGroupService {
// (2)查询:总数和列表
channelGroupRequestBO.setStatus(1);
int total = channelGroupDAO.selectListCountByParam(channelGroupRequestBO);
List<ChannelGroupRspBO> channelGroupBOList = channelGroupDAO.selectListByParam(channelGroupRequestBO);
List<ChannelGroup> channelGroups = Collections.emptyList();
if(total>0){
channelGroups =channelGroupDAO.selectListByParam(channelGroupRequestBO);
}
List<ChannelGroupRspBO> channelGroupBOList = Lists.transform(channelGroups,input -> {
ChannelGroupRspBO output = new ChannelGroupRspBO();
BeanUtils.copyProperties(input, output);
return output;
});
// (3)返回
PageChannelGroupRspBO pageChannelGroupRspBO = new PageChannelGroupRspBO();
pageChannelGroupRspBO.setList(channelGroupBOList);
... ...
... ... @@ -21,5 +21,5 @@ public interface IChannelGroupDAO {
int selectListCountByParam(ChannelGroupRequestBO channelGroupRequestBO);
List<ChannelGroupRspBO> selectListByParam(ChannelGroupRequestBO channelGroupRequestBO);
List<ChannelGroup> selectListByParam(ChannelGroupRequestBO channelGroupRequestBO);
}
\ No newline at end of file
... ...