package com.yami.shop.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yami.shop.bean.model.Category;
import com.yami.shop.bean.model.ShopCategory;
import com.yami.shop.bean.param.CategoryProductDTO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;


/**
 * 门店前台类目服务接口
 *
 * @author YourName
 * @since 2025-09-XX
 */
public interface IShopCategoryService extends IService<ShopCategory> {
    /**
     * 查询全部（树形）
     * @return List<FrontCategory>
     */
    List<ShopCategory> treeShopCategory(Long shopId, String name);

    /**
     * 导出门店前台类目导入模板
     *
     * @param response HTTP响应对象
     * @throws Exception 导出异常
     */
    void exportTemplate(HttpServletResponse response) throws Exception;
    /**
     * 导入类目
     * @param file  文件
     */
    void importCategory(MultipartFile file, Long userId);
    /**
     * 根据店铺id和顶级分类id，获取分类
     * @param parentId
     * @param shopId
     * @return
     */
    IPage<Category> listByParentIdAndShopId(Long parentId, Long shopId, Integer current, Integer size);

    /**
     * 删除分类
     * @param id 分类id
     */
    void delete(Long id);
}
