package org.dromara.zhishu.service;

import com.pdd.pop.sdk.http.api.pop.response.PddGoodsCatRuleGetResponse;
import com.pdd.pop.sdk.http.api.pop.response.PddGoodsSpecIdGetResponse;
import com.pdd.pop.sdk.http.api.pop.response.PddMallInfoGetResponse;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.zhishu.domain.bo.TaskBo;
import org.dromara.zhishu.domain.dto.BookPriceInfoDto;
import org.dromara.zhishu.domain.dto.request.BatchSetSoldOutRequest;
import org.dromara.zhishu.domain.vo.*;
import org.springframework.web.multipart.MultipartFile;

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

/**
 * Pdd接口Service
 *
 * @author yxy
 * @date 2025-03-10
 */
public interface IPddService {

    /**
     * 拉取商品，生成csv文件
     *
     * @param shopId   店铺Id
     * @param isOnsale 是否在售
     */
    void createShopGoodsList(ShopVo shopVo, TaskBo taskBo, Integer isOnsale);

    /**
     * 拉取商品详情，生成csv文件
     *
     * @param shopId   店铺Id
     * @param isOnsale 是否在售
     */
    void createShopGoodsDetailList(ShopVo shopVo, TaskBo taskBo, Integer isOnsale);

    /**
     * 获取拉取的数据
     *
     * @param shopId   店铺Id
     * @param page     页
     * @param pageSize 每页数量
     * @return 数据
     */
    TableDataInfo<Map<String, Object>> getShopGoodsList(String shopId, String isOnsale,String isbn,String priceDown,String priceUp,String startDate,String endDate, Integer page, Integer pageSize,String goodsName,String stockDown,String stockUp,String trilateralId,String goodsCode,String skuCode);


    /**
     * 导出
     * @param shopId
     * @param isOnsale
     * @return
     */
    List<Map> emport(String shopId, String isOnsale);
    /**
     * 批量下架
     *
     * @param shopId 店铺ID
     */
    void batchSetSoldOut(Long shopId);

    /**
     * 整店上下架
     */
    void editShopGoodsAllByIsOnSale(ShopVo shopVo,TaskBo taskBo,String isOnSale,String isbn,String priceDown,String priceUp,String startDate,String endDate,String goodsName,String stockDown,String stockUp,String trilateralId,String goodsCode,String skuCode);

    /**
     * 通过csv批量翻新商品上架拼多多
     *
     * @param file   csv文件
     * @param taskBo 任务信息
     * @param shopVo 店铺信息
     */
    void batchRenovateOnSaleByCsv(MultipartFile file, TaskBo taskBo, ShopVo shopVo);

    /**
     * 翻新单个商品上架拼多多
     *
     * @param data   翻新数据
     * @param shopId 店铺ID
     * @param taskId 任务ID
     */
    void renovateOnSale(BookPriceInfoDto data, String shopId, String taskId);

    String getSaleTemplateIdByShopId(Long shopId);


    void  sendPddGoodsToTargetShop(String shopId,String targetShopId,TaskBo taskBo,ShopVo shopVo);

    /**
     * 根据shopId删除redis中的重复记录
     * @param shopId
     * @return
     */
    Boolean clearRedisBuffer(String shopId);
}
