...
|
...
|
@@ -6,15 +6,14 @@ package com.yoho.unions.server.service.impl; |
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.google.common.base.Function;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.google.common.collect.Maps;
|
|
|
import com.netflix.config.DynamicIntProperty;
|
|
|
import com.netflix.config.DynamicPropertyFactory;
|
|
|
import com.yoho.core.common.utils.MD5;
|
|
|
import com.yoho.core.common.utils.Marker;
|
|
|
import com.yoho.core.redis.YHRedisTemplate;
|
|
|
import com.yoho.core.redis.YHValueOperations;
|
|
|
import com.yoho.core.rest.client.ServiceCaller;
|
|
|
import com.yoho.error.event.DeviceActiveEvent;
|
|
|
import com.yoho.error.exception.ServiceException;
|
|
|
import com.yoho.service.model.union.UnionTypeModel;
|
...
|
...
|
@@ -35,9 +34,9 @@ import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.tuple.Pair;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.cache.interceptor.CacheableOperation;
|
|
|
import org.springframework.context.ApplicationEventPublisher;
|
|
|
import org.springframework.context.ApplicationEventPublisherAware;
|
|
|
import org.springframework.stereotype.Service;
|
...
|
...
|
@@ -118,6 +117,9 @@ public class UnionServiceImpl implements IUnionService,ApplicationEventPublisher |
|
|
@Resource(name="unionServiceImpl")
|
|
|
IUnionService unionService;
|
|
|
|
|
|
@Autowired
|
|
|
AppAdSourceMonitorAnaMapper appAdSourceMonitorAnaMapper;
|
|
|
|
|
|
// 记录付费渠道的redis
|
|
|
private static final String UNION_PAY_CHANNEL_KEY_PRE = "union:pay_channel:";
|
|
|
|
...
|
...
|
@@ -979,4 +981,24 @@ public class UnionServiceImpl implements IUnionService,ApplicationEventPublisher |
|
|
pageYHActivateDeviceIdRspBO.setList(yhActivateDeviceIdRspBOList);
|
|
|
return pageYHActivateDeviceIdRspBO;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public PageMonitorRspBO queryMonitorList(String unionType, int page, Integer rows) {
|
|
|
int count = appAdSourceMonitorAnaMapper.selectCount(unionType);
|
|
|
List<AppAdSourceMonitorAna> list = appAdSourceMonitorAnaMapper.selectByUnionType(unionType);
|
|
|
if(CollectionUtils.isEmpty(list)){
|
|
|
return null;
|
|
|
}
|
|
|
List<AppAdSourceMonitorAnaBO> anaBOList = Lists.transform(list, input -> {
|
|
|
AppAdSourceMonitorAnaBO bo = new AppAdSourceMonitorAnaBO();
|
|
|
BeanUtils.copyProperties(input,bo);
|
|
|
bo.setIps(StringUtils.isEmpty(bo.getIps()) ? "" : bo.getIps().replaceAll(",","\n"));
|
|
|
bo.setSkns(StringUtils.isEmpty(bo.getSkns()) ? "" : bo.getSkns().replaceAll(",","\n"));
|
|
|
return bo;
|
|
|
});
|
|
|
PageMonitorRspBO rspBO = new PageMonitorRspBO();
|
|
|
rspBO.setTotal(count);
|
|
|
rspBO.setList(anaBOList);
|
|
|
return rspBO;
|
|
|
}
|
|
|
} |
...
|
...
|
|