luofl
2025-02-20 e4eaabefaaa2ca95f809c47a11712c3bee56e1b5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package com.ruoyi.order.mapper;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.core.web.page.PageInfo;
import com.ruoyi.order.vo.OrderPageList;
import com.ruoyi.order.vo.OrderPageListVo;
import com.ruoyi.order.vo.OrderStatistics;
import com.ruoyi.order.vo.OrderVO;
import com.ruoyi.order.model.Order;
import org.apache.ibatis.annotations.Param;
 
import java.time.LocalDateTime;
import java.util.List;
 
/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author luodangjia
 * @since 2024-11-21
 */
public interface OrderMapper extends BaseMapper<Order> {
    /**
     * 查询用户id
     */
    List<OrderVO> selectOrderListByUserId(@Param("status") Integer status, @Param("userId") Long userId);
    
    
    /**
     * 管理后台获取订单列表数据
     * @param orderPageList
     * @return
     */
    List<OrderPageListVo> getOrderPageList(PageInfo<OrderPageListVo> pageInfo,  @Param("item") OrderPageList orderPageList);
 
    OrderStatistics getOrderStatistics(@Param("startTime")String startTime,
                                       @Param("endTime") String endTime, @Param("shopId") Integer shopId);
 
 
    /**
     * 获取商品销售数量
     * @param goodsId
     * @return
     */
    Integer getGoodsSaleNum(@Param("goodsId") Integer goodsId,
                            @Param("type") Integer type,
                            @Param("userId") Long userId);
 
 
    /**
     * 获取店铺订单数量
     * @param shopId
     * @param type
     * @return
     */
    Integer getShopSaleNum(@Param("shopId") Integer shopId, @Param("type") Integer type);
 
    Integer getShopSaleNumByShopIds(@Param("shopIds") List<Integer> shopIds, @Param("type") Integer type);
}