package com.kym.service;

import com.kym.entity.WashOrder;
import com.kym.entity.common.PageBean;
import com.kym.entity.common.PageParams;
import com.kym.entity.queryParams.DeviceQueryParams;
import com.kym.entity.queryParams.StatQueryParam;
import com.kym.entity.queryParams.WashOrderQueryParams;
import com.kym.entity.vo.StationTrendVo;
import com.kym.entity.vo.WashOrderVo;
import com.kym.service.mybatisplus.MyBaseService;

import java.time.LocalDate;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 洗车订单表 服务类
 * </p>
 *
 * @author skyline
 * @since 2024-09-11
 */
public interface WashOrderService extends MyBaseService<WashOrder> {

    String createOrder(DeviceQueryParams params);

    void closeOrder(DeviceQueryParams params);

    WashOrder queryOrder(WashOrderQueryParams params);


    String getParkingDiscounts(String unionid);

    PageBean<WashOrderVo> listMyWashOrder(PageParams params);

    Object list(WashOrderQueryParams query);

    /**
     * 获取订单详情
     * @param orderId 订单号
     * @return 订单详情
     */
    WashOrderVo detail(String orderId);

    void forceSettleOrder(String orderId);

    Map<String, Integer> sumAmountByDate(LocalDate statDay);

    Map<String, Integer> sumMonthAmount(LocalDate statDay);

    Map<String, Integer> countDailyOrders(LocalDate statDay);

    Map<String, Integer> countMonthOrders(LocalDate statDay);

    Map<String, Integer> countDailyActiveUsers(LocalDate statDay);

    Map<String, Integer> countMonthActiveUsers(LocalDate statDay);

    /**
     * 统计时间段内站点活跃用户（去重），用于跨天汇总
     */
    Map<String, Integer> countDistinctActiveUsers(LocalDate startDate, LocalDate endDate);

    WashOrder getOrderInProgressByUserId(long userId);

    List<StationTrendVo> stationTrend(StatQueryParam params);

    String checkParkingCoupon(String mobilePhone);
}
