package com.gic.haoban.manage.service.dao.mapper;

import com.gic.haoban.manage.service.entity.TabHaobanMaterial;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TabHaobanMaterialMapper {

    int insert(TabHaobanMaterial record);

    int batchInsert(@Param("records") List<TabHaobanMaterial> records);

    TabHaobanMaterial selectByPrimaryKey(String materialId);

    List<TabHaobanMaterial> listByids(@Param("materialIds") List<String> materialIds);

    int updateByPrimaryKeySelective(TabHaobanMaterial record);

    List<TabHaobanMaterial> listMaterialByCategoryId(String categoryId);

    Page<TabHaobanMaterial> listMaterial(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("keyword") String keyword, @Param("categoryId") String categoryId, @Param("materialType") Integer materialType);

    List<TabHaobanMaterial> listMaterialByCategoryIds(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("keyword") String keyword, @Param("categoryIds") List<String> categoryIds, @Param("materialType") Integer materialType);

    TabHaobanMaterial selectByfromMaterialId(@Param("fromMaterialId") String fromMaterialId, @Param("wxEnterpriseId") String wxEnterpriseId);

    List<TabHaobanMaterial> listByfromMaterialId(@Param("fromMaterialId") String fromMaterialId);

    /**
     * 删除
     */
    int delMaterialByIds(@Param("ids") List<String> ids);
}