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

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.gic.haoban.manage.api.dto.MaterialCategoryDTO;
import com.gic.haoban.manage.service.entity.TabHaobanMaterialCategory;

public interface TabHaobanMaterialCategoryMapper {

    int insert(TabHaobanMaterialCategory record);

    int getMaxSortNum(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("parentId")String parentId) ;

    TabHaobanMaterialCategory selectByPrimaryKey(String categoryId);

    int updateByPrimaryKeySelective(TabHaobanMaterialCategory record);

	TabHaobanMaterialCategory selectByCategoryNameAndParentId(@Param("categoryName")String categoryName,
                                                              @Param("categoryParentId")String categoryParentId,
                                                              @Param("wxEnterpriseId")String wxEnterpriseId);

	List<TabHaobanMaterialCategory> listCategory(@Param("wxEnterpriseId")String wxEnterpriseId);

	List<TabHaobanMaterialCategory> listByParentCategory(@Param("categoryId")String categoryId);

    void updateSortNum(@Param("list")List<MaterialCategoryDTO> list);
}