admin
2020-05-20 98b1a0affd69bbe63223c21fdd2c404e8bedfccb
fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderProcessServiceImpl.java
@@ -220,7 +220,8 @@
            List<TaoBaoOrder> list = orders.get(orderId);
            String pid = String.format("mm_%s_%s_%s", configList.get(0).getAccountId(),
                  list.get(0).getSourceMediaId(), list.get(0).getAdPositionId());
            if ("饿了么".equalsIgnoreCase(list.get(0).getOrderType())) {
            if ("饿了么".equalsIgnoreCase(list.get(0).getOrderType())
                  && !pid.equalsIgnoreCase(TaoBaoConstant.TAOBAO_RELATION_PID_DEFAULT)) {
               // 饿了么订单开始归入到淘宝订单
               if (TimeUtil.convertToTimeTemp(list.get(0).getCreateTime(),
                     "yyyy-MM-dd HH:mm:ss") >= Constant.NEW_ORDER_FANLI_RULE_TIME) {
@@ -228,6 +229,9 @@
               } else {
                  elmeOrderMap.put(orderId, list);
               }
            } else if ("口碑".equalsIgnoreCase(list.get(0).getOrderType())
                  && pid.equalsIgnoreCase(TaoBaoConstant.TAOBAO_KOUBEI_PID)) {// 口碑自购
               fanliOrderMap.put(orderId, list);
            } else {
               if (!StringUtil.isNullOrEmpty(list.get(0).getSpecialId())
                     || pid.equalsIgnoreCase(TaoBaoConstant.TAOBAO_RELATION_AS_SPECIAL_PID)) {// 设置渠道ID当做会员运营ID的位置ID
@@ -740,8 +744,9 @@
                  && !StringUtil.isNullOrEmpty(orderList.get(0).getRelationId())) {// 处理非返利商品库的商品
               targetUid = taoBaoBuyRelationMapService.selectUidByRelationId(orderList.get(0).getRelationId());
            } else if (pid.equalsIgnoreCase(TaoBaoConstant.TAOBAO_ELEME_PID)
                  && !StringUtil.isNullOrEmpty(orderList.get(0).getRelationId())) {// 处理饿了么的订单
            } else if ((pid.equalsIgnoreCase(TaoBaoConstant.TAOBAO_ELEME_PID)
                  || pid.equalsIgnoreCase(TaoBaoConstant.TAOBAO_KOUBEI_PID))
                  && !StringUtil.isNullOrEmpty(orderList.get(0).getRelationId())) {// 处理饿了么,口碑的订单
               UserExtraTaoBaoInfo extraInfo = userExtraTaoBaoInfoService
                     .getByRelationId(orderList.get(0).getRelationId());
               if (extraInfo != null) {
@@ -1301,7 +1306,7 @@
            // 查询主红包
            HongBaoOrder hongBaoOrder = hongBaoOrderMapper.selectByCommonOrderId(commonOrder.getId());
            if (hongBaoOrder != null && hongBaoOrder.getHongBaoV2() != null) {
            if (hongBaoOrder.getHongBaoV2().getState() == HongBaoV2.STATE_BUKELINGQU) {
            if (hongBaoOrder.getHongBaoV2().getState() == HongBaoV2.STATE_BUKELINGQU || hongBaoOrder.getHongBaoV2().getState() == HongBaoV2.STATE_SHIXIAO) {
            // 订单失效,赠送金币
            try {
            invalidHongBaoV2AndGiveGodenCorn(hongBaoOrder.getHongBaoV2().getId(), hongBaoOrder.getHongBaoV2().getUserInfo().getId(), commonOrder.getOrderNo(), commonOrder.getSourceType(), "订单成功,商家未打款");