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 @@