package com.cool.store.mapper;

import com.cool.store.entity.PointAuditRecordDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface PointAuditRecordMapper extends Mapper<PointAuditRecordDO> {

    /**
     * 批量插入
     * @param addList
     * @return
     */
    Integer batchInsertSelective(@Param("addList") List<PointAuditRecordDO> addList);

    /**
     * 获取处理记录
     * @param pointId
     * @param cycleCount
     * @return
     */
    List<PointAuditRecordDO> getPointAuditRecord(@Param("pointId") Long pointId, @Param("cycleCount")Integer cycleCount);

    /**
     * 删除未完成的处理记录
     * @param pointId
     * @param cycleCount
     * @return
     */
    Integer deletePointAuditRecord(@Param("pointId") Long pointId, @Param("cycleCount") Integer cycleCount);

    /**
     * 获取点位所有的审批记录
     * @param pointId
     * @return
     */
    List<PointAuditRecordDO> getPointAllAuditRecord(@Param("pointId") Long pointId);

    /**
     * 获取提交时间
     * @param pointIds
     * @return
     */
    List<PointAuditRecordDO> getPointSubmitAuditTime(@Param("pointIds") List<Long> pointIds);
}