Helius
2021-05-28 9c8214358fc62aae6f610bdf0c6f3d49ddfbe266
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()));
                }
            }
        }
@@ -267,7 +267,7 @@
        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));
                    }