package com.yeshi.fanli.dao.mybatis; import java.util.List; import org.apache.ibatis.annotations.Param; import com.yeshi.fanli.entity.bus.clazz.GoodsSubClass; public interface GoodsSubClassMapper { int deleteByPrimaryKey(Long id); int insert(GoodsSubClass record); int insertSelective(GoodsSubClass record); GoodsSubClass selectByPrimaryKey(Long id); int updateByPrimaryKeySelective(GoodsSubClass record); int updateByPrimaryKey(GoodsSubClass record); /** * 查询一级之下的所有二级分类 * @param rootId 一级id * @returnL */ List queryByRootId(@Param("rootId") Long rootId, @Param("state") Integer state); /** * 查询二级分类之下其他分类 * @param rootId 一级id * @return */ List queryByPid(@Param("pid") Long pid, @Param("state") Integer state); List queryByRootIdAndWeight(@Param("rootId") Long rootId, @Param("type") int type, @Param("weight") int weight); List queryByPidAndWeight(@Param("pid") Long pid, @Param("type") int type, @Param("weight") int weight); /** * 统计一级之下的所有二级分类 * @param rootId 一级id * @returnL */ int countByRootId(@Param("rootId") Long rootId); /** * 统计二级分类之下其他分类 * @param rootId 一级id * @return */ int countByPid(@Param("pid") Long pid); /** * 统计一级之下最大权重 * @param rootId 一级id * @returnL */ int getMaxWeightByRootId(@Param("rootId") Long rootId); /** * 统计二级分类之最大权重 * @param rootId 一级id * @return */ int getMaxWeightByPid(@Param("pid") Long pid); }