From 28cd97d04c68bd8c5fd4adf7780200f61da13654 Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期五, 20 九月 2019 14:39:36 +0800 Subject: [PATCH] Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div --- fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java | 55 +++++++++++++++++++++++++++++++++---------------------- 1 files changed, 33 insertions(+), 22 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java b/fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java index 188fb5e..1553e7c 100644 --- a/fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java +++ b/fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java @@ -921,34 +921,45 @@ String key = its.next(); DouYinDeviceActiveQueueDTO active = map.get(key); if (active.getType() == DouYinDeviceActiveQueueDTO.TYPE_AD) {// 鎶栭煶 - DeviceActive deviceActive = deviceActiveService.getFirstActiveInfo(active.getDevice()); - if (deviceActive != null) { - DouYinClickEvent event = douYinClickEventService.selectByAid(active.getAid()); - if (event != null) { - if (event.getOs() == 0) - DouYinAdUtil.activeAndroid(event.getCallback(), event.getImei(), - deviceActive.getCreateTime().getTime()); - else if (event.getOs() == 1) - DouYinAdUtil.activeIOS(event.getCallback(), event.getIdfa(), - deviceActive.getCreateTime().getTime()); + DouYinClickEvent event = douYinClickEventService.selectByAid(active.getAid()); + if (event != null) { + if (event.getOs() == 0) { + DeviceActive deviceActive = deviceActiveService + .getFirstActiveInfoByImei(event.getUuid()); + if (deviceActive != null) { + if (event != null) { + if (event.getOs() == 0) + DouYinAdUtil.activeAndroid(event.getCallback(), event.getImei(), + deviceActive.getCreateTime().getTime()); + else if (event.getOs() == 1) + DouYinAdUtil.activeIOS(event.getCallback(), event.getIdfa(), + deviceActive.getCreateTime().getTime()); + } + } + } else {// TODO 澶勭悊IOS + } } } else if (active.getType() == DouYinDeviceActiveQueueDTO.TYPE_DEVICE) {// 璁惧 - // TODO 鍏煎IOS - if (active.getPlatform() == 1) { - DouYinClickEvent event = douYinClickEventService - .selectByAndroidId(active.getDevice()); - if (event != null) {// 鍥炶皟 - DeviceActive deviceActive = deviceActiveService - .getFirstActiveInfo(active.getDevice()); - if (deviceActive != null) - DouYinAdUtil.activeAndroid(event.getCallback(), event.getImei(), - deviceActive.getCreateTime().getTime()); - } - } + if (active.getPlatform() == 1) { + DeviceActive deviceActive = deviceActiveService + .getFirstActiveInfo(active.getDevice()); + if (deviceActive != null) { + DouYinClickEvent event = douYinClickEventService + .selectByUuid(deviceActive.getImei()); + if (event != null) {// 鍥炶皟 + if (deviceActive != null) + DouYinAdUtil.activeAndroid(event.getCallback(), event.getImei(), + deviceActive.getCreateTime().getTime()); + } + } + } else { + // TODO 鍏煎IOS + } } + DouYinDeviceActiveCMQManager.getInstance().delete(key); } } } -- Gitblit v1.8.0