package shop.alien.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import shop.alien.entity.store.LifeDiscountCoupon;
import shop.alien.entity.store.ManagementInfo;
import shop.alien.entity.store.vo.ManagementInfoVo;

import java.util.List;

public interface ManagementInfoMapper {

    IPage<ManagementInfo> getAllManagementInfo(IPage<LifeDiscountCoupon> page, @Param("storeName") String storeName);

    List<ManagementInfoVo> getBillingRanking(@Param("startDate") String startDate, @Param("endDate") String endDate);

    ManagementInfoVo getAmountPaid(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("storeId") String storeId);

    ManagementInfoVo getTotalTransactionAmount(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("storeId") String storeId);

    ManagementInfoVo getTransactionNumber(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("storeId") String storeId);

    ManagementInfoVo getAllOrderAmount(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("storeId") String storeId);

    ManagementInfoVo getAllWrittenOffAmount(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("storeId") String storeId);

    ManagementInfoVo getTotalWithdrawalAmount(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("storeId") String storeId);

    ManagementInfoVo getUserCount(@Param("storeId") String storeId);

    ManagementInfoVo getOrderTransactionNumber(@Param("storeId") String storeId);

    ManagementInfoVo getVerificationAmount(@Param("storeId") String storeId);

    IPage<ManagementInfoVo> getApplicationForWithdrawal(IPage<ManagementInfoVo> iPage, @Param("storeId") Integer storeId, @Param("storeName") String storeName);

    ManagementInfoVo getCashOutDetail( @Param("id") Integer id);

    IPage<ManagementInfoVo> getStoreOrderDetail(IPage<ManagementInfoVo> iPage, @Param("storeId") String storeId, @Param("orderNo") String orderNo, @Param("userId") String userId, @Param("userName") String userName);

    //获取平台净利润
    ManagementInfoVo getPlatformNetProfit(@Param("dataTime") String dataTime);

    //获取订单量
    ManagementInfoVo getOrderQuantity(@Param("dataTime") String dataTime);

    //获取成交金额
    ManagementInfoVo getTradingVolume(@Param("dataTime") String dataTime);

    //查询当日净利润
    List<ManagementInfoVo> getQueryNetProfitDay(@Param("dataTime") String dataTime);

    //查询当周净利润
    List<ManagementInfoVo> getQueryNetProfitWeek(@Param("dataTime") String dataTime);

    //查询当月净利润
    List<ManagementInfoVo> getQueryNetProfitMonth(@Param("dataTime") String dataTime);

    //查询当年净利润
    List<ManagementInfoVo> getQueryNetProfitYear(@Param("dataTime") String dataTime);

    //查询当日成交金额
    List<ManagementInfoVo> getTradingVolumeDay(@Param("dataTime") String dataTime);

    //查询当周成交金额
    List<ManagementInfoVo> getTradingVolumeWeek(@Param("dataTime") String dataTime);

    //查询当月成交金额
    List<ManagementInfoVo> getTradingVolumeMonth(@Param("dataTime") String dataTime);

    //查询当年成交金额
    List<ManagementInfoVo> getTradingVolumeYear(@Param("dataTime") String dataTime);

    //查询当日订单量
    List<ManagementInfoVo> getOrderQuantityDay(@Param("dataTime") String dataTime);

    //查询当周订单量
    List<ManagementInfoVo> getOrderQuantityWeek(@Param("dataTime") String dataTime);

    //查询当月订单量
    List<ManagementInfoVo> getOrderQuantityMonth(@Param("dataTime") String dataTime);

    //查询当年订单量
    List<ManagementInfoVo> getOrderQuantityYear(@Param("dataTime") String dataTime);

    //查询商铺订单销量排行榜前十
    List<ManagementInfoVo> getSalesVolume(@Param("startTime") String startTime, @Param("endTime") String endTime);

    //查询平台利润详情
    IPage<ManagementInfoVo> getStorePlatformProfitDetails(IPage<ManagementInfoVo> iPage, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") String storeId, @Param("storeName") String storeName);

    //查询平台订单量详情
    IPage<ManagementInfoVo> getStorePlatformOrderVolume(IPage<ManagementInfoVo> iPage, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("orderId") String orderId, @Param("orderType") String orderType, @Param("couponName") String couponName, @Param("couponType") String couponType, @Param("storeName") String storeName);

    //获取退款订单量
    ManagementInfoVo getRefundOrderQuantity(@Param("dataTime") String dataTime);

    //获取总订单量
    ManagementInfoVo getTotalOrderVolume(@Param("dataTime") String dataTime);

    //获取退款金额
    ManagementInfoVo getRefundAmount(@Param("dataTime") String dataTime);

    ManagementInfoVo getWithdrawalAmount(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("storeId") String storeId);
    ManagementInfoVo getOrderAmount(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("storeId") String storeId);
    ManagementInfoVo getTransactionAmount(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("storeId") String storeId);
    ManagementInfoVo getWrittenOffAmount(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("storeId") String storeId);

}