admin
2019-08-28 0a8917b5a842f0343e5a1d322209fee95fa1b23d
增加返利得金币任务
1个文件已修改
16 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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) {
@@ -141,6 +145,7 @@
            doJDOrderJob();// 京东订单处理
            doPDDOrderJob();// 拼多多订单处理
            doImportantTaoBaoGoodsUpdateJob();// 淘宝重要商品的信息更新
            doHongBaoRecieveIntegralGetJob();// 返利到账,金币增加
        }
    }
@@ -708,17 +713,18 @@
                            Long hongBaoId = map.get(key);
                            try {
                                HongBaoV2 hongBaoV2 = hongBaoV2Service.selectByPrimaryKey(hongBaoId);
                                if (hongBaoV2 != null && hongBaoV2.getState() == HongBaoV2.STATE_YILINGQU) {
                                if (hongBaoV2 != null && hongBaoV2.getState() == HongBaoV2.STATE_YILINGQU
                                        && hongBaoV2.getMoney().compareTo(new BigDecimal(0)) > 0) {
                                    if (hongBaoV2.getType() == HongBaoV2.TYPE_ZIGOU) {// 自购
                                        // TODO 添加加金币事件
                                        integralGetService.addRebateOrder(hongBaoV2.getUserInfo().getId());
                                    } else if (hongBaoV2.getType() == HongBaoV2.TYPE_SHARE_GOODS) {// 分享赚
                                        // TODO 添加加金币事件
                                        integralGetService.addShareOrder(hongBaoV2.getUserInfo().getId());
                                    } else if (hongBaoV2.getType() == HongBaoV2.TYPE_YIJI
                                            || hongBaoV2.getType() == HongBaoV2.TYPE_SHARE_YIJI) {// 一级邀请赚
                                        // TODO 添加加金币事件
                                        integralGetService.addInviteOrderLevelOne(hongBaoV2.getUserInfo().getId());
                                    } else if (hongBaoV2.getType() == HongBaoV2.TYPE_ERJI
                                            || hongBaoV2.getType() == HongBaoV2.TYPE_SHARE_ERJI) {// 二级邀请赚
                                        // TODO 添加加金币事件
                                        integralGetService.addInviteOrderLevelOne(hongBaoV2.getUserInfo().getId());
                                    }
                                }
                                HongBaoRecieveCMQManager.getInstance()