Cui Zhi Feng
2024-10-29 35735b623ef913c1df2686530b9e81ca5ab05265
订单管理:全部订单数量-待付款-已取消-已退款
已修改1个文件
21 ■■■■ 文件已修改
src/main/java/com/mzl/flower/service/statistics/StatisticsService.java 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/mzl/flower/service/statistics/StatisticsService.java
@@ -9,6 +9,7 @@
import com.mzl.flower.dto.request.flower.FlowerQueryDTO;
import com.mzl.flower.dto.request.payment.OrderItemSalesQueryDTO;
import com.mzl.flower.dto.request.payment.OrderQueryDTO;
import com.mzl.flower.dto.response.payment.OrderStatusCountDTO;
import com.mzl.flower.dto.response.statistics.FlowerStatisticsDTO;
import com.mzl.flower.dto.response.statistics.OrderStatisticsDTO;
import com.mzl.flower.dto.response.statistics.RateStatisticsDTO;
@@ -112,12 +113,20 @@
                .eq("deleted", 0));
        dto.setCustomerCount(cc.longValue());//用户管理:统计商户列表已启用的全部用户(点击跳转到商户列表)
        Integer oc = orderMapper.selectCount(new QueryWrapper<Order>()
                .eq("deleted", 0)
                .isNotNull("payment_time")
                .isNull("cancel_time")
                .isNull("refund_time"));
        dto.setOrderCount(oc.longValue());//订单管理:全部订单数量-待付款-已取消-已退款(点击跳转到订单列表)
        //订单管理:全部订单数量-待付款-已取消-已退款(点击跳转到订单列表)
        List<OrderStatusCountDTO> ll = orderMapper.getOrderStatusCount(new OrderQueryDTO());
        Integer oc = 0;
        if (ll != null && ll.size() > 0) {
            for (OrderStatusCountDTO c : ll) {
                if(Constants.ORDER_STATUS_BACKEND.PENDING.name().equals(c.getValue())
                        || Constants.ORDER_STATUS_BACKEND.CANCEL.name().equals(c.getValue())
                        || Constants.ORDER_STATUS_BACKEND.REFUND.name().equals(c.getValue())){
                    continue;
                }
                oc += c.getOrderCount();
            }
        }
        dto.setOrderCount(oc.longValue());
        page = new Page(1, 1);
        OrderQueryDTO oq = new OrderQueryDTO();