package cn.edu.whu.boot.collection.mapper;

import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Map;

@Repository
public interface SearchPageMapper {

    Page<Map<String,Object>> getPageDataByStatus(@Param("tableNameInDB") String tableNameInDB,
                                                 @Param("status") int status);

    Page<Map<String,Object>> getUncheckedPageData(@Param("tableNameInDB") String tableNameInDB);


    Page<Map<String,Object>> getPageDataByFuzzySearch(@Param("tableNameInDB") String tableNameInDB,
                                                      @Param("fieldNameInDB") String fieldNameInDB,
                                                      @Param("searchKey") String searchKey);

    Page<Map<String, Object>> getUncheckedPageDataByWorker(@Param("tableNameInDB") String tableNameInDB, @Param("workerId") Integer workerId);
    Page<Map<String, Object>> getPageDataByWorkerNoStatus(@Param("tableNameInDB") String tableNameInDb);

    Page<Map<String, Object>> getPageDataByStatusAndWorker(@Param("table") String tableNameInDB, @Param("status") int status, @Param("workerId") Integer workerId);
}
