...
|
...
|
@@ -39,6 +39,7 @@ import org.slf4j.Logger; |
|
|
import org.slf4j.LoggerFactory;
|
|
|
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;
|
...
|
...
|
@@ -573,12 +574,7 @@ public class UnionServiceImpl implements IUnionService,ApplicationEventPublisher |
|
|
@Override
|
|
|
public PageActivateDeviceIdRspBO queryActivateDeviceId(ActivateDeviceIdReqBO activateDeviceIdReqBO) {
|
|
|
log.info("enter queryActivateDeviceId. param activateDeviceIdReqBO={}", activateDeviceIdReqBO);
|
|
|
if(StringUtils.isEmpty(activateDeviceIdReqBO.getActivateTime())){
|
|
|
activateDeviceIdReqBO.setActivateTimeStr(DateUtils.getTodayZero());
|
|
|
}else{
|
|
|
String dateStr = activateDeviceIdReqBO.getActivateTime().replaceAll("-","/");
|
|
|
activateDeviceIdReqBO.setActivateTimeStr(DateUtils.getTimesmorning(dateStr));
|
|
|
}
|
|
|
|
|
|
//(1).查询出各渠道激活的设备id数
|
|
|
List<ActivateDeviceIdRspBO> activateDeviceIdRspList = unionLogsDAO.selectListByParam(activateDeviceIdReqBO);
|
|
|
|
...
|
...
|
@@ -600,12 +596,12 @@ public class UnionServiceImpl implements IUnionService,ApplicationEventPublisher |
|
|
public Integer queryActivateCount(ActivateDeviceIdReqBO activateDeviceIdReqBO) {
|
|
|
log.info("enter queryActivateCount. param activateDeviceIdReqBO={}", activateDeviceIdReqBO);
|
|
|
Integer count = 0;
|
|
|
if(StringUtils.isEmpty(activateDeviceIdReqBO.getActivateTime())){
|
|
|
activateDeviceIdReqBO.setActivateTimeStr(DateUtils.getTodayZero());
|
|
|
}else{
|
|
|
String dateStr = activateDeviceIdReqBO.getActivateTime().replaceAll("-","/");
|
|
|
activateDeviceIdReqBO.setActivateTimeStr(DateUtils.getTimesmorning(dateStr));
|
|
|
}
|
|
|
// if(StringUtils.isEmpty(activateDeviceIdReqBO.getActivateTime())){
|
|
|
// activateDeviceIdReqBO.setActivateTimeStr(DateUtils.getTodayZero());
|
|
|
// }else{
|
|
|
// String dateStr = activateDeviceIdReqBO.getActivateTime().replaceAll("-","/");
|
|
|
// activateDeviceIdReqBO.setActivateTimeStr(DateUtils.getTimesmorning(dateStr));
|
|
|
// }
|
|
|
if(activateDeviceIdReqBO.getIsIdfa()>0 ){
|
|
|
//ios查询时,接口为全部或者是ios接口才查询
|
|
|
if(IOS_INTERFACE_LIST.contains(activateDeviceIdReqBO.getInterfaceType())||StringUtils.isEmpty(activateDeviceIdReqBO.getInterfaceType())){
|
...
|
...
|
@@ -799,5 +795,35 @@ public class UnionServiceImpl implements IUnionService,ApplicationEventPublisher |
|
|
return page;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public PageActivateDeviceIdRspBO queryActivateHour(ActivateDeviceIdReqBO activateDeviceIdReqBO) {
|
|
|
log.info("enter queryActivateHour. param activateDeviceIdReqBO={}", activateDeviceIdReqBO);
|
|
|
|
|
|
//(1).查询出各渠道激活的设备id数
|
|
|
List<ActivateDeviceIdRspBO> activateDeviceIdRspList = Lists.newArrayList();
|
|
|
|
|
|
int beginTime = DateUtils.getTodayZero();
|
|
|
for(int i=0;i<24;i++){
|
|
|
activateDeviceIdReqBO.setActivateHourBegin(beginTime);
|
|
|
activateDeviceIdReqBO.setActivateHourEnd(beginTime+3600);
|
|
|
activateDeviceIdRspList.addAll(unionLogsDAO.selectListByHour(activateDeviceIdReqBO));
|
|
|
beginTime +=3600;
|
|
|
}
|
|
|
|
|
|
|
|
|
for(int i=0;i<24;i++){
|
|
|
ActivateDeviceIdRspBO bo = activateDeviceIdRspList.get(i);
|
|
|
String hour = i<10?"0"+i+":00--"+"0"+i+":59":i+":00--"+i+":59";
|
|
|
bo.setHour(hour);
|
|
|
}
|
|
|
|
|
|
PageActivateDeviceIdRspBO pageActivateDeviceIdRspBO = new PageActivateDeviceIdRspBO();
|
|
|
pageActivateDeviceIdRspBO.setList(activateDeviceIdRspList);
|
|
|
//不需要分页了
|
|
|
// pageActivateDeviceIdRspBO.setTotal(total);
|
|
|
// pageActivateDeviceIdRspBO.setPage(activateDeviceIdReqBO.getPage());
|
|
|
return pageActivateDeviceIdRspBO;
|
|
|
}
|
|
|
|
|
|
|
|
|
} |
...
|
...
|
|