package com.gree.mall.miniapp.commonmapper;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gree.mall.miniapp.annotation.DataPermission;
import com.gree.mall.miniapp.bean.settle.OrderShareBean;
import com.gree.mall.miniapp.bean.user.MyProfitBean;
import com.gree.mall.miniapp.plus.entity.OrderShare;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface MyProfitMapper {
    @SqlParser(filter = true)
    MyProfitBean queryProfitSum(@Param("userId") String userId);

    @DataPermission
    @SqlParser(filter = true)
    IPage<OrderShareBean> queryOrderShareList(IPage page, @Param("userId") String userId, @Param("status") String status);

    @SqlParser(filter = true)
    BigDecimal queryProfitSumByTime(@Param("userId") String userId,@Param("startTime") String startTime,@Param("endTime") String endTime);

}
