KKSU
2024-04-17 829f629756e5402bcd3e9f6ef1f9c6dbffbabb11
src/main/java/com/xcong/excoin/modules/yunding/service/Impl/XchProfitServiceImpl.java
@@ -103,9 +103,9 @@
        if (CollUtil.isNotEmpty(orders)) {
            for (YdOrderEntity order : orders) {
                if ("P".equals(order.getYdProductEntity().getProUnit())) {
                    totalPower = totalPower.add(BigDecimal.valueOf(order.getQuantity() * 1024));
                    totalPower = totalPower.add(BigDecimal.valueOf(order.getQuantity() * order.getYdProductEntity().getProNum() * 1024));
                } else {
                    totalPower = totalPower.add(BigDecimal.valueOf(order.getQuantity()));
                    totalPower = totalPower.add(BigDecimal.valueOf(order.getQuantity() * order.getYdProductEntity().getProNum()));
                }
            }
        }
@@ -263,11 +263,11 @@
    @Transactional(rollbackFor = Exception.class)
    public void xchProfitDistributor(BigDecimal totalProfit) {
        Date currentDate = new Date();
        List<YdProductEntity> products = ydProductDao.selectList(null);
        List<YdProductEntity> products = ydProductDao.selectXchProductList();
        if (CollUtil.isNotEmpty(products)) {
            BigDecimal totalCount = BigDecimal.ZERO;
            for (YdProductEntity product : products) {
                BigDecimal count = product.getTotalT();
                BigDecimal count = product.getTotalT().multiply(BigDecimal.valueOf(product.getProNum()));
                if ("P".equals(product.getProUnit())) {
                    count = count.multiply(BigDecimal.valueOf(1024));
                }
@@ -294,7 +294,7 @@
                    List<String> inviteIds = StrUtil.split(memberEntity.getRefererIds(), ',');
                    List<MemberEntity> agents = memberDao.selectYdParentAgent(inviteIds);
                    BigDecimal count = BigDecimal.valueOf(order.getQuantity());
                    BigDecimal count = BigDecimal.valueOf(order.getQuantity() * order.getYdProductEntity().getProNum());
                    if ("P".equals(order.getYdProductEntity().getProUnit())) {
                        count = count.multiply(BigDecimal.valueOf(1024));
                    }