From 41aedac31eb4c5b9f7b98bacec18c45b3926d69c Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期五, 27 九月 2019 16:57:54 +0800 Subject: [PATCH] 京东商品 券bug --- fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java | 80 +++++++++++++++++++++++----------------- 1 files changed, 46 insertions(+), 34 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..7e07182 100644 --- a/fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java +++ b/fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java @@ -171,12 +171,11 @@ doUpdateGoodsJob(); // 鏇存柊鍟嗗搧闃熷垪 doJDOrderJob();// 浜笢璁㈠崟澶勭悊 doPDDOrderJob();// 鎷煎澶氳鍗曞鐞� - doImportantTaoBaoGoodsUpdateJob();// 娣樺疂閲嶈鍟嗗搧鐨勪俊鎭洿鏂� + doImportantTaoBaoGoodsUpdateJob();// 娣樺疂閲嶈鍟嗗搧鐨勪俊鎭洿鏂� doHongBaoRecieveIntegralGetJob();// 杩斿埄鍒拌处锛岄噾甯佸鍔� - doPlaceOrderIntegralJob();// 涓嬪崟璧犻�侀噾甯佷换鍔� - doDouYinDeviceActiveJob();// 鎶栭煶璁惧婵�娲诲箍鍛婄洃娴� +// doPlaceOrderIntegralJob();// 涓嬪崟璧犻�侀噾甯佷换鍔� + doDouYinDeviceActiveJob();// 鎶栭煶璁惧婵�娲诲箍鍛婄洃娴� } - } /** @@ -855,15 +854,15 @@ integralTaskRecordService.firstRebateOrderRewardBoss(boss.getId(), order.getUserInfo().getId(), null); } - } - boss = threeSaleSerivce.getBoss(boss.getId()); - if (boss != null) {// 鍒ゆ柇涓婄骇鐨勭孩鍖� - if (hongBaoMoney.get(boss.getId()) == null - || hongBaoMoney.get(boss.getId()).compareTo(new BigDecimal("0")) <= 0) { - // 琛ュ伩閲戝竵2绾� - integralTaskRecordService.firstRebateOrderRewardBossSuper(boss.getId(), - order.getUserInfo().getId(), null); + boss = threeSaleSerivce.getBoss(boss.getId()); + if (boss != null) {// 鍒ゆ柇涓婄骇鐨勭孩鍖� + if (hongBaoMoney.get(boss.getId()) == null || hongBaoMoney.get(boss.getId()) + .compareTo(new BigDecimal("0")) <= 0) { + // 琛ュ伩閲戝竵2绾� + integralTaskRecordService.firstRebateOrderRewardBossSuper(boss.getId(), + order.getUserInfo().getId(), null); + } } } } @@ -909,9 +908,11 @@ // 鎶栭煶 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); @@ -921,34 +922,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 && 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); } } } -- Gitblit v1.8.0