package com.ruoyi.mall.mapper;

import java.math.BigDecimal;
import java.util.List;
import com.ruoyi.mall.domain.MallOrderOrder;
import org.apache.ibatis.annotations.Param;

/**
 * 订单Mapper接口
 *
 * @author chang
 * @date 2021-11-25
 */
public interface MallOrderOrderMapper
{
    /**
     * 查询订单
     *
     * @param id 订单主键
     * @return 订单
     */
    public MallOrderOrder selectMallOrderOrderById(Long id);

    /**
     * 查询订单列表
     *
     * @param mallOrderOrder 订单
     * @return 订单集合
     */
    public List<MallOrderOrder> selectMallOrderOrderList(MallOrderOrder mallOrderOrder);

    /**
     * 新增订单
     *
     * @param mallOrderOrder 订单
     * @return 结果
     */
    public int insertMallOrderOrder(MallOrderOrder mallOrderOrder);

    /**
     * 修改订单
     *
     * @param mallOrderOrder 订单
     * @return 结果
     */
    public int updateMallOrderOrder(MallOrderOrder mallOrderOrder);

    /**
     * 删除订单
     *
     * @param id 订单主键
     * @return 结果
     */
    public int deleteMallOrderOrderById(Long id);

    /**
     * 批量删除订单
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteMallOrderOrderByIds(Long[] ids);

    public MallOrderOrder queryByOrderSn(String orderNo);

    /*
    * 查状态订单
    * */
    public List<MallOrderOrder> selectOrdersByStatus(@Param("type") String type, @Param("userId") String userId);

    public void taskCancleOrder(String compareTime);

    public List<MallOrderOrder> selectMallOrderByTime(String compareTime);

    public int checkTotleCount();

    public BigDecimal checkTotlePrice();

    public BigDecimal checkYearDate(String year);

    public BigDecimal checkYearAndMonth(@Param("year") String year, @Param("month") String month, @Param("day") String day);
    public int checkCountYearAndMonth(@Param("year") String year, @Param("month") String month, @Param("day") String day);

}
