package com.crm.manager.dao.mapper;

import com.crm.rely.backend.model.entity.market.record.MarketEmailRecordSearchPageEntity;
import com.crm.rely.backend.model.entity.market.record.MarketEmailRecordStatusNumberEntity;
import com.crm.rely.backend.model.pojo.table.MarketEmailRecordTable;
import com.crm.rely.backend.model.pojo.view.MarketEmailStatusNumberView;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MarketEmailRecordMapper {

    Integer insertSaves(@Param("emailId") Long emailId);

    Integer countList(MarketEmailRecordSearchPageEntity entity);

    List<MarketEmailRecordTable> pageList(MarketEmailRecordSearchPageEntity entity);

    MarketEmailStatusNumberView statusNumber(MarketEmailRecordStatusNumberEntity entity);

    List<MarketEmailRecordTable> selectLimitByStatus(@Param("status") Integer status, @Param("limit") Integer limit);

    void updateStatus(@Param("status") Integer status, @Param("id") Long id);

    void updateStatusByIdIn(@Param("status") Integer status, @Param("ids") List<Long> ids);
}
