package com.simuwang.base.mapper;

import com.simuwang.base.common.enums.DistributeType;
import com.simuwang.base.pojo.dos.DistributionDO;
import com.simuwang.base.pojo.dos.DistributionTablePageDO;
import com.simuwang.base.pojo.dto.query.DistributionPageQuery;
import com.simuwang.base.pojo.vo.IdListVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

/**
 * FileName: DistributionMapper
 * Author:   chenjianhua
 * Date:     2024/9/15 14:09
 * Description: ${DESCRIPTION}
 */
@Mapper
public interface DistributionMapper {
    List<DistributionTablePageDO> searchDistributionList(DistributionPageQuery distributionPageQuery);

    long countDistributionList(DistributionPageQuery distributionPageQuery);

    DistributionDO selectDistributionById(@Param("id") Integer id);

    void updateDistributionById(DistributionDO distributionDO);

    DistributionDO selectDistributionByDate(@Param("fundId") String fundId, @Param("distributeDate") Date distributeDate);

    void saveDistribution(DistributionDO distributionDO);

    void deleteDistribution(@Param("ids") List<Integer> idList);

    List<DistributionDO> getDistributionByFundId(@Param("fundId")String fundId,@Param("distributeType") DistributeType distributeType);

    BigDecimal getSumDistributeByFundId(@Param("fundId")String fundId,@Param("distributeDate") String distributeDate);
}
