| | |
| | |
|
| | | // 抖音
|
| | | public void doDouYinDeviceActiveJob() {
|
| | | LogHelper.test("开始执行:doDouYinDeviceActiveJob");
|
| | | executor.execute(new Runnable() {
|
| | | @Override
|
| | | public void run() {
|
| | | LogHelper.test("开始执行:doDouYinDeviceActiveJob-run");
|
| | | while (true) {
|
| | | Map<String, DouYinDeviceActiveQueueDTO> map = DouYinDeviceActiveCMQManager.getInstance()
|
| | | .consume(16);
|
| | |
| | | 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 && deviceActive.getImei() != 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);
|
| | | }
|
| | | }
|
| | | }
|