From e92ce10abd2c9e66c8f84b2d2d534bf48c09688e Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期二, 05 三月 2019 17:06:13 +0800 Subject: [PATCH] 邀请者bug修改 --- fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java | 22 ++++++++++++++++------ 1 files changed, 16 insertions(+), 6 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 a64a1f6..def3250 100644 --- a/fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java +++ b/fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java @@ -23,6 +23,7 @@ import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanOrder; import com.yeshi.fanli.exception.TaoBaoWeiQuanException; import com.yeshi.fanli.log.LogHelper; +import com.yeshi.fanli.service.inter.hongbao.ThreeSaleSerivce; import com.yeshi.fanli.service.inter.lable.BoutiqueAutoRuleService; import com.yeshi.fanli.service.inter.lable.LabelService; import com.yeshi.fanli.service.inter.lable.QualityFactoryService; @@ -30,6 +31,7 @@ import com.yeshi.fanli.service.inter.push.IOSPushService; import com.yeshi.fanli.service.inter.user.ExtractService; import com.yeshi.fanli.service.inter.user.UserInfoService; +import com.yeshi.fanli.service.inter.user.UserSystemCouponService; /** * 绯荤粺鍒濆鍖� @@ -64,6 +66,12 @@ @Resource private QualityFactoryService qualityFactoryService; + @Resource + private UserSystemCouponService userSystemCouponService; + + @Resource + private ThreeSaleSerivce threeSaleSerivce; + private static boolean isInited = false; public void onApplicationEvent(ContextRefreshedEvent arg0) { @@ -90,6 +98,7 @@ doOrderTiChengFanLi();// 澶勭悊璁㈠崟鎻愭垚杩斿埄 doWeiQuanOrder();// 澶勭悊缁存潈璁㈠崟 doPushIOS();// 澶勭悊鍙戦�両OS娑堟伅 + doThreeSaleUserCouponJob();// 澶勭悊閭�璇烽槦鍒� } else if (!Constant.IS_TEST) { initScheduler();// 鍚姩瀹氭椂浠诲姟 // doUpdateGoodsJob(); @@ -204,7 +213,7 @@ } } catch (Exception e) { try { - LogHelper.errorDetailInfo(e); + LogHelper.errorDetailInfo(e, "HongBaoV2-ID:" + map.get(handler).getId(), ""); } catch (Exception e1) { e1.printStackTrace(); } @@ -413,13 +422,14 @@ String key = its.next(); try { ThreeSale threeSale = map.get(key); + if (threeSale != null) + threeSale = threeSaleSerivce.selectByPrimaryKey(threeSale.getId()); if (threeSale != null) { if (threeSale.getState() != null && threeSale.getState() == true) { - // 閭�璇锋垚鍔� - - // TODO 鍒告縺娲荤敓鏁� - // threeSale.getBoss().getId(); - + // 閭�璇锋垚鍔� - 鍒告縺娲荤敓鏁� + LogHelper.test("doThreeSaleUserCouponJob-"+threeSale.getId()); + Long bossId = threeSale.getBoss().getId(); + userSystemCouponService.activatedWelfareFreeCoupon(bossId); } } ThreeSaleCMQManager.getInstance() -- Gitblit v1.8.0