package com.yonge.cooleshow.biz.dal.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yonge.cooleshow.biz.dal.dto.search.PlatformCashAccountRecordSearch;
import com.yonge.cooleshow.biz.dal.entity.PlatformCashAccountRecord;
import com.yonge.cooleshow.biz.dal.vo.PlatformCashAccountRecordSummaryVo;

import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 平台账户流水表(PlatformCashAccountRecord)表数据库访问层
 *
 * @author zx
 * @since 2022-07-21 10:32:06
 */
public interface PlatformCashAccountRecordDao extends BaseMapper<PlatformCashAccountRecord> {

    int insertBatch(@Param("entities") List<PlatformCashAccountRecord> entities);
    
    int batchUpdate(List<PlatformCashAccountRecord> list);

    IPage<PlatformCashAccountRecord> queryPage(@Param("page") IPage<PlatformCashAccountRecord> page, @Param("param") PlatformCashAccountRecordSearch query);

    List<PlatformCashAccountRecord> queryAll(@Param("param")PlatformCashAccountRecordSearch query);

    PlatformCashAccountRecordSummaryVo querySummary(@Param("param") PlatformCashAccountRecordSearch query);

    List<PlatformCashAccountRecord> queryCanAccountByBizType(@Param("bizTypes")List<String> bizTypes);

    List<PlatformCashAccountRecord> queryByBizTypeAndPaymentDays(@Param("bizType")String bizType, @Param("paymentDays")int paymentDays);

    Integer cancelRecord(@Param("orderNo")String orderNo,@Param("bizType") String bizType, @Param("bizId") Long bizId);

    Integer mallRecordedRecord(@Param("orderNo")String orderNo,@Param("bizType") String bizType, @Param("bizId") Long bizId);

    /**
     * 平台收益批量入账
     * @param recordIds
     */
    void batchRecorded(@Param("recordIds") List<Long> recordIds);
}

