package com.wzj.soopin.goods.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wzj.soopin.goods.domain.entity.ProductCategory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 商品分类Mapper接口
 *
 * @author zcc
 */
@Mapper
public interface ProductCategoryMapper extends BaseMapper<ProductCategory> {

    /**
     * 查询所有子分类
     *
     * @param categoryId
     * @return
     */
    @Select("select * from pms_product_category where parent_id = #{categoryId}")
    List<ProductCategory> selectByParentId(Long categoryId);
}
