From 59399f8ee603592308de49fb8bc71823ffd8aee0 Mon Sep 17 00:00:00 2001 From: wangfukang <15630117759@163.com> Date: Fri, 17 Apr 2026 18:18:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=8B=BC=E5=9B=A2=E6=95=B0?= =?UTF-8?q?=E6=8D=AE1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/cc/hiver/mall/dao/mapper/MallOrderMapper.java | 3 ++- .../hiver/mall/serviceimpl/mybatis/MallOrderServiceImpl.java | 2 +- .../hiver-mall/src/main/resources/mapper/MallOrderMapper.xml | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/MallOrderMapper.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/MallOrderMapper.java index cc54064e..7800c230 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/MallOrderMapper.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/MallOrderMapper.java @@ -10,6 +10,7 @@ import org.springframework.stereotype.Repository; import java.time.LocalDateTime; import java.util.HashMap; +import java.util.List; /** * 核心订单 Mapper 接口 @@ -24,7 +25,7 @@ public interface MallOrderMapper extends BaseMapper { MallOrder selectMallOrderByGroupId(@Param("groupId") String groupId); - HashMap selectOrderStatusCount(@Param("shopId") String shopId); + List> selectOrderStatusCount(@Param("shopId") String shopId); HashMap selectOrderRevenueAndCount(@Param("shopId") String shopId,@Param("startTime") LocalDateTime startTime,@Param("endTime") LocalDateTime endTime); diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/MallOrderServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/MallOrderServiceImpl.java index 80fb82d6..68844e1e 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/MallOrderServiceImpl.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/MallOrderServiceImpl.java @@ -920,7 +920,7 @@ public class MallOrderServiceImpl extends ServiceImpl countByShop(String shopId) { Map result = new HashMap(); - HashMap orderStatusCount = this.baseMapper.selectOrderStatusCount(shopId); + List> orderStatusCount = this.baseMapper.selectOrderStatusCount(shopId); result.put("orderStatusCount", orderStatusCount); // 1. 获取指定日期(例如:今天) LocalDate date = LocalDate.now(); diff --git a/hiver-modules/hiver-mall/src/main/resources/mapper/MallOrderMapper.xml b/hiver-modules/hiver-mall/src/main/resources/mapper/MallOrderMapper.xml index d36d43a9..60d16ed8 100644 --- a/hiver-modules/hiver-mall/src/main/resources/mapper/MallOrderMapper.xml +++ b/hiver-modules/hiver-mall/src/main/resources/mapper/MallOrderMapper.xml @@ -61,7 +61,7 @@ FROM mall_order AND `status` IN (5, 12) - + AND create_time BETWEEN #{startTime} AND #{endTime} @@ -80,7 +80,7 @@