18582019636
2024-06-25 e90151755c2b534bd509cf93daa55147d61cb7da
ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/service/impl/UserServiceImpl.java
@@ -48,7 +48,7 @@
    @Override
    public Object userDataCount(UserDataCountRequest userDataCountRequest) {
        List<String> cityIdList = userDataCountRequest.getCityIdList();
        List<String> cityList = userDataCountRequest.getCityList();
        List<User> userList = lambdaQuery().eq(User::getIsDelete, 0).list();
        // 用户总量
        Integer userNumber = null == userList ? 0 : userList.size();
@@ -68,25 +68,25 @@
        if (OrderConstants.QUARTER.equals(userDataCountRequest.getCountType())) {
            // 用户增长数
            increaseNumber = lambdaQuery().ge(User::getCreateTime, startDateStr).le(User::getCreateTime, endDateStr)
                    .in(User::getCityId, cityIdList).eq(User::getIsDelete, 0).count();
                    .in(User::getCity, cityList).eq(User::getIsDelete, 0).count();
            // 用户总交易额
            totalMoney = orderService.totalMoneyByQuarter(startDateStr, endDateStr, cityIdList);
            totalMoney = orderService.totalMoneyByQuarter(startDateStr, endDateStr, cityList);
            // 用户提现总额
            withdrawalTotalMoney = withdrawService.withdrawalTotalMoney(cityIdList);
            withdrawalTotalMoney = withdrawService.withdrawalTotalMoney(cityList);
        } else if (OrderConstants.YEAR.equals(userDataCountRequest.getCountType())) {
            // 用户增长数
            increaseNumber = baseMapper.increaseNumberByYear(cityIdList);
            increaseNumber = baseMapper.increaseNumberByYear(cityList);
            // 用户总交易额
            totalMoney = orderService.totalMoneyByYear(cityIdList);
            totalMoney = orderService.totalMoneyByYear(cityList);
            // 用户提现总额
            withdrawalTotalMoney = withdrawService.withdrawalTotalMoneyByYear(cityIdList);
            withdrawalTotalMoney = withdrawService.withdrawalTotalMoneyByYear(cityList);
        } else if (OrderConstants.MONTH.equals(userDataCountRequest.getCountType())) {
            // 用户增长数
            increaseNumber = baseMapper.increaseNumberByMonth(cityIdList);
            increaseNumber = baseMapper.increaseNumberByMonth(cityList);
            // 用户总交易额
            totalMoney = orderService.totalMoneyByMonth(cityIdList);
            totalMoney = orderService.totalMoneyByMonth(cityList);
            // 用户提现总额
            withdrawalTotalMoney = withdrawService.withdrawalTotalMoneyByMonth(cityIdList);
            withdrawalTotalMoney = withdrawService.withdrawalTotalMoneyByMonth(cityList);
        } else {
            // 数量初始化
            increaseNumber = 0L;