From 19eae97c395d6d50ca9ed4dd20567887ae77ea69 Mon Sep 17 00:00:00 2001 From: yujian <yujian> Date: 星期三, 06 三月 2019 10:20:16 +0800 Subject: [PATCH] 使用券验证 --- fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 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 5ccc1a5..8b64fbe 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; @@ -67,6 +68,9 @@ @Resource private UserSystemCouponService userSystemCouponService; + + @Resource + private ThreeSaleSerivce threeSaleSerivce; private static boolean isInited = false; @@ -209,7 +213,7 @@ } } catch (Exception e) { try { - LogHelper.errorDetailInfo(e); + LogHelper.errorDetailInfo(e, "HongBaoV2-ID:" + map.get(handler).getId(), ""); } catch (Exception e1) { e1.printStackTrace(); } @@ -418,11 +422,18 @@ 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) { // 閭�璇锋垚鍔� - 鍒告縺娲荤敓鏁� + LogHelper.test("doThreeSaleUserCouponJob-"+threeSale.getId()); + Long bossId = threeSale.getBoss().getId(); - userSystemCouponService.activatedWelfareFreeCoupon(bossId); + // 涓嬬骇鏄电О + String workerNickName = threeSale.getWorker().getNickName(); + + userSystemCouponService.activatedWelfareFreeCoupon(bossId, workerNickName); } } ThreeSaleCMQManager.getInstance() -- Gitblit v1.8.0