admin
2019-07-19 90ce9c6390613004d24699a80bbbe23f482cf001
淘宝授权添加延时,爬单错误bug解决
2个文件已修改
29 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/AuthCallBackController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoV2ServiceImpl.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/AuthCallBackController.java
@@ -151,7 +151,9 @@
                        }
                    }
                });
                //稍作延迟
                Thread.sleep(50);
            } else if ("zigou".equalsIgnoreCase(source)) {
                String specialId = null;
@@ -192,6 +194,8 @@
                        }
                    }
                });
                //稍作延迟
                Thread.sleep(50);
            } else if ("bind".equalsIgnoreCase(source)) {
fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoV2ServiceImpl.java
@@ -587,17 +587,20 @@
                    if (notificationMap.get(child.getType()) == null) {
                        HongBaoV2 tempHongBao = new HongBaoV2(child.getId());
                        tempHongBao.setUserInfo(child.getUserInfo());
                        tempHongBao.setMoney(childUpdate.getMoney());
                        tempHongBao
                                .setMoney(childUpdate.getMoney() == null ? new BigDecimal(0) : childUpdate.getMoney());
                        CommonOrder tempCommonOrder = new CommonOrder(commonOrder.getId());
                        tempCommonOrder.setPayment(commonOrder.getPayment());
                        notificationMap.put(child.getType(), new HongBaoOrder(tempCommonOrder, tempHongBao));
                    } else {
                        // 增加付款金额与资金
                        HongBaoOrder tempHongBaoOrder = notificationMap.get(child.getType());
                        tempHongBaoOrder.getCommonOrder().setPayment(
                                tempHongBaoOrder.getCommonOrder().getPayment().add(commonOrder.getPayment()));
                        tempHongBaoOrder.getHongBaoV2()
                                .setMoney(tempHongBaoOrder.getHongBaoV2().getMoney().add(childUpdate.getMoney()));
                        if (commonOrder.getPayment() != null)
                            tempHongBaoOrder.getCommonOrder().setPayment(
                                    tempHongBaoOrder.getCommonOrder().getPayment().add(commonOrder.getPayment()));
                        if (childUpdate.getMoney() != null)
                            tempHongBaoOrder.getHongBaoV2()
                                    .setMoney(tempHongBaoOrder.getHongBaoV2().getMoney().add(childUpdate.getMoney()));
                        notificationMap.put(child.getType(), tempHongBaoOrder);
                    }
@@ -726,7 +729,7 @@
                    firstHongbao.setMoney(
                            MoneyBigDecimalUtil.mul(hongBao.getMoney(), firstRate.divide(new BigDecimal(100))));
                }
                //返利为0的不通知
                // 返利为0的不通知
                if (firstHongbao.getMoney() == null || firstHongbao.getMoney().compareTo(new BigDecimal(0)) <= 0)
                    return;
@@ -777,8 +780,8 @@
                        secondHongbao.setMoney(
                                MoneyBigDecimalUtil.mul(hongBao.getMoney(), secondRate.divide(new BigDecimal(100))));
                    }
                    //返利为0的不统计
                    // 返利为0的不统计
                    if (secondHongbao.getMoney() == null || secondHongbao.getMoney().compareTo(new BigDecimal(0)) <= 0)
                        return;
@@ -1034,9 +1037,9 @@
    public List<HongBaoV2> listChildrenById(Long id) {
        return hongBaoV2Mapper.listChildrenById(id);
    }
    @Override
    public List<Long> getUidByNear30DayShareSucceed(){
    public List<Long> getUidByNear30DayShareSucceed() {
        return hongBaoV2Mapper.getUidByNear30DayShareSucceed();
    }
}