package com.cool.store.mapper;

import com.cool.store.dto.pre.fry.DailyFryCountDTO;
import com.cool.store.dto.pre.fry.PreFryRecordQueryDTO;
import com.cool.store.dto.pre.fry.PreFryRecordsDTO;
import com.cool.store.dto.pre.fry.ViolationDTO;
import com.cool.store.entity.PreFryRecordsDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.Date;
import java.util.List;

public interface PreFryRecordsMapper extends Mapper<PreFryRecordsDO> {

    int batchInsert(List<PreFryRecordsDO> records);

    int batchUpdateStageByIds(@Param("ids") List<Long> ids,
                              @Param("currentStage") Integer currentStage);

    List<PreFryRecordsDO> selectByIds(@Param("ids") List<Long> ids);

    List<PreFryRecordsDO> selectByStoreAndDateStage(
            @Param("storeCode") String storeCode,
            @Param("applyType") Integer applyType,
            @Param("queryDate") String queryDate);


    List<DailyFryCountDTO> selectDailyFryCountInCurrentMonth(@Param("storeCode") String storeCode,@Param("time") Long time);


    List<PreFryRecordsDTO> selectByQueryDTO(@Param("query") PreFryRecordQueryDTO dto);

    void batchUpdateViolation(@Param("list") List<ViolationDTO> violationList);

}