package com.mcwl.communityCenter.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mcwl.communityCenter.domain.IncomeInfo;
import com.mcwl.communityCenter.domain.PublishCollect;
import com.mcwl.communityCenter.domain.dto.IncomeInfoListPageRes;
import com.mcwl.communityCenter.domain.dto.IncomeInfoRes;
import com.mcwl.communityCenter.domain.dto.MyPublishCollectPageRes;
import com.mcwl.communityCenter.domain.vo.IncomeAmountVo;
import com.mcwl.communityCenter.domain.vo.IncomeInfoListVo;
import com.mcwl.communityCenter.domain.vo.PublishVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface IncomeInfoMapper extends BaseMapper<IncomeInfo> {

    @InterceptorIgnore(tenantLine = "true")
    IncomeAmountVo communityIncome(@Param("userId") Long userId);

    @InterceptorIgnore(tenantLine = "true")
    IncomeAmountVo questionIncome(@Param("userId") Long userId);

    Double totalIncome(@Param("userId") Long userId);

    @InterceptorIgnore(tenantLine = "true")
    List<IncomeInfoListVo> incomeList(Page<IncomeInfo> page,
                                      @Param("incomeInfoListPageRes") IncomeInfoListPageRes incomeInfoListPageRes,
                                      @Param("userId") Long userId);
}
