package com.czg.product.service;

import com.czg.product.dto.ShopProdCategoryDTO;
import com.czg.product.entity.ShopProdCategory;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import jakarta.servlet.http.HttpServletResponse;

import java.util.List;
import java.util.Map;

/**
 * 店铺商品分类
 *
 * @author Tankaikai tankaikai@aliyun.com
 * @since 1.0 2025-02-10
 */
public interface ShopProdCategoryService extends IService<ShopProdCategory> {

    /**
     * 获取店铺商品分类分页
     *
     * @param param 查询参数
     * @return 店铺商品分类分页
     */
    Page<ShopProdCategoryDTO> getShopProdCategoryPage(ShopProdCategoryDTO param);

    /**
     * 获取店铺商品分类列表
     *
     * @param param 查询参数
     * @return 店铺商品分类列表
     */
    List<ShopProdCategoryDTO> getShopProdCategoryList(ShopProdCategoryDTO param);

    /**
     * 根据店铺id获取分类id和名称的映射
     */
    Map<Long, String> getCategoryIdNameMap(Long shopId);

    void exportShopProdCategory(ShopProdCategoryDTO param, HttpServletResponse response);

    /**
     * 获取店铺商品分类详情
     *
     * @param id id
     * @return 店铺商品分类详情
     */
    ShopProdCategoryDTO getShopProdCategoryById(Long id);

    /**
     * 添加店铺商品分类
     *
     * @param dto 商品分类信息
     */
    void addShopProdCategory(ShopProdCategoryDTO dto);

    /**
     * 更新店铺商品分类
     *
     * @param dto 商品分类信息
     */
    void updateShopProdCategory(ShopProdCategoryDTO dto);

    /**
     * 删除店铺商品分类
     *
     * @param id 商品分类id
     */
    void deleteShopProdCategory(Long id);

    /**
     * 禁用店铺商品分类
     *
     * @param id 商品分类id
     */
    void disableShopProdCategory(Long id);

    /**
     * 启用店铺商品分类
     *
     * @param id 商品分类id
     */
    void enableShopProdCategory(Long id);

}