From 5d60fd3267341eb0880c9e9a9c2457460b01f7b3 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 30 八月 2019 12:11:09 +0800 Subject: [PATCH] 拼多多/京东返利到账 --- fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java | 30 +++++++++++++++++++----------- 1 files changed, 19 insertions(+), 11 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 e0b5fca..e698963 100644 --- a/fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java +++ b/fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java @@ -31,6 +31,7 @@ import com.yeshi.fanli.log.LogHelper; import com.yeshi.fanli.service.inter.hongbao.HongBaoV2Service; import com.yeshi.fanli.service.inter.hongbao.ThreeSaleSerivce; +import com.yeshi.fanli.service.inter.integral.IntegralGetService; import com.yeshi.fanli.service.inter.jd.JDOrderService; import com.yeshi.fanli.service.inter.lable.BoutiqueAutoRuleService; import com.yeshi.fanli.service.inter.lable.LabelService; @@ -107,6 +108,9 @@ @Resource private HongBaoV2Service hongBaoV2Service; + @Resource + private IntegralGetService integralGetService; + private static boolean isInited = false; public void onApplicationEvent(ContextRefreshedEvent arg0) { @@ -138,9 +142,10 @@ doUserMoneyDebtJob();// 鍊哄姟鍋胯繕 initScheduler();// 鍚姩鍟嗗搧鏇存柊瀹氭椂浠诲姟 doUpdateGoodsJob(); // 鏇存柊鍟嗗搧闃熷垪 - doJDOrderJob();// 浜笢璁㈠崟澶勭悊 +// doJDOrderJob();// 浜笢璁㈠崟澶勭悊 doPDDOrderJob();// 鎷煎澶氳鍗曞鐞� doImportantTaoBaoGoodsUpdateJob();// 娣樺疂閲嶈鍟嗗搧鐨勪俊鎭洿鏂� + doHongBaoRecieveIntegralGetJob();// 杩斿埄鍒拌处锛岄噾甯佸鍔� } } @@ -708,16 +713,19 @@ Long hongBaoId = map.get(key); try { HongBaoV2 hongBaoV2 = hongBaoV2Service.selectByPrimaryKey(hongBaoId); - if (hongBaoV2.getType() == HongBaoV2.TYPE_ZIGOU) {// 鑷喘 - // TODO 娣诲姞鍔犻噾甯佷簨浠� - } else if (hongBaoV2.getType() == HongBaoV2.TYPE_SHARE_GOODS) {// 鍒嗕韩璧� - // TODO 娣诲姞鍔犻噾甯佷簨浠� - } else if (hongBaoV2.getType() == HongBaoV2.TYPE_YIJI - || hongBaoV2.getType() == HongBaoV2.TYPE_SHARE_YIJI) {// 涓�绾ч個璇疯禋 - // TODO 娣诲姞鍔犻噾甯佷簨浠� - } else if (hongBaoV2.getType() == HongBaoV2.TYPE_ERJI - || hongBaoV2.getType() == HongBaoV2.TYPE_SHARE_ERJI) {// 浜岀骇閭�璇疯禋 - // TODO 娣诲姞鍔犻噾甯佷簨浠� + if (hongBaoV2 != null && hongBaoV2.getState() == HongBaoV2.STATE_YILINGQU + && hongBaoV2.getMoney().compareTo(new BigDecimal(0)) > 0) { + if (hongBaoV2.getType() == HongBaoV2.TYPE_ZIGOU) {// 鑷喘 + integralGetService.addRebateOrder(hongBaoV2.getUserInfo().getId()); + } else if (hongBaoV2.getType() == HongBaoV2.TYPE_SHARE_GOODS) {// 鍒嗕韩璧� + integralGetService.addShareOrder(hongBaoV2.getUserInfo().getId()); + } else if (hongBaoV2.getType() == HongBaoV2.TYPE_YIJI + || hongBaoV2.getType() == HongBaoV2.TYPE_SHARE_YIJI) {// 涓�绾ч個璇疯禋 + integralGetService.addInviteOrderLevelOne(hongBaoV2.getUserInfo().getId()); + } else if (hongBaoV2.getType() == HongBaoV2.TYPE_ERJI + || hongBaoV2.getType() == HongBaoV2.TYPE_SHARE_ERJI) {// 浜岀骇閭�璇疯禋 + integralGetService.addInviteOrderLevelOne(hongBaoV2.getUserInfo().getId()); + } } HongBaoRecieveCMQManager.getInstance() .deleteQueueMsg(HongBaoRecieveCMQManager.QUEUE_INTEGRAL, key); -- Gitblit v1.8.0