package com.foreverwin.mesnac.meapi.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.meapi.model.Item;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Ervin Chen
 * @since 2020-10-19
 */
@Repository
public interface ItemMapper extends BaseMapper<Item> {

    List<Item> selectList(@Param("locale") String locale, @Param("ew") Wrapper<Item> wrapper);

    List<Item> selectPage(@Param("locale") String locale, IPage<Item> page, @Param("ew") Wrapper<Item> wrapper);

    Item selectCurrentRevision(@Param("site") String site, @Param("item") String item);

    Item selectById(@Param("locale") String locale, @Param("handle") String handle);

    List<Item> selectListByCriteria(@Param("locale") String locale, @Param("ew") Wrapper<Item> wrapper);

    Map<String,Object> findMapByItem(@Param("itemBo")String itemBo);


}