package com.fs.hisStore.service;

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

import com.fs.common.core.domain.R;
import com.fs.his.domain.FsStoreProduct;
import com.fs.hisStore.domain.FsStoreProductScrm;
import com.fs.hisStore.domain.FsStoreProductRuleScrm;
import com.fs.his.param.FsStoreProductListSParam;
import com.fs.his.vo.FsStoreProductExcelVO;
import com.fs.his.vo.FsStoreProductListSVO;
import com.fs.his.vo.OptionsVO;
import com.fs.hisStore.vo.*;
import com.fs.live.domain.LiveGoods;
import com.fs.statis.dto.ModifyMoreDTO;
import com.fs.hisStore.domain.FsStoreProductScrm;
import com.fs.hisStore.param.FsStoreProductAddEditParam;
import com.fs.hisStore.param.FsStoreProductQueryParam;
import com.fs.statis.dto.ProductAuditDTO;

/**
 * 商品Service接口
 *
 * @author fs
 * @date 2022-03-15
 */
public interface IFsStoreProductScrmService
{
    /**
     * 查询商品
     *
     * @param productId 商品ID
     * @return 商品
     */
    public FsStoreProductScrm selectFsStoreProductById(Long productId);

    /**
     * 查询商品列表
     *
     * @param fsStoreProduct 商品
     * @return 商品集合
     */
    public List<FsStoreProductScrm> selectFsStoreProductList(FsStoreProductScrm fsStoreProduct);

    /**
     * 新增商品
     *
     * @param fsStoreProduct 商品
     * @return 结果
     */
    public int insertFsStoreProduct(FsStoreProductScrm fsStoreProduct);

    /**
     * 修改商品
     *
     * @param fsStoreProduct 商品
     * @return 结果
     */
    public int updateFsStoreProduct(FsStoreProductScrm fsStoreProduct);

    /**
     * 批量删除商品
     *
     * @param productIds 需要删除的商品ID
     * @return 结果
     */
    public int deleteFsStoreProductByIds(Long[] productIds);

    /**
     * 删除商品信息
     *
     * @param productId 商品ID
     * @return 结果
     */
    public int deleteFsStoreProductById(Long productId);

    List<FsStoreProductListVO> selectFsStoreProductListVO(FsStoreProductScrm fsStoreProduct);

    List<FsStoreProductListVO> selectFsStoreProductBarCodeListVO(FsStoreProductScrm fsStoreProduct);

    Map<String,Object> getFormatAttr(Long productId, String jsonStr,Long[] stores);


    R addOrEdit(FsStoreProductAddEditParam fsStoreProduct);

    List<FsStoreProductListQueryVO> selectFsStoreProductTuiQuery(int count);


    List<FsStoreProductListQueryVO> selectFsStoreProductListQuery(FsStoreProductQueryParam param);

    FsStoreProductQueryVO selectFsStoreProductByIdQuery(Long productId,String storeId);

    void decProductStock(Long productId, Long productAttrValueId, Integer cartNum);

    void incProductStock(Long num, Long productId, Long productAttrValueId);


    List<FsStoreProductListQueryVO> selectFsStoreProductNewQuery(int count);

    List<FsStoreProductListQueryVO> selectFsStoreProductHotQuery(int count);

    List<FsStoreProductListQueryVO> selectFsStoreProductGoodQuery(int count);

    List<FsStoreProductListQueryVO> selectFsStoreProductTuiListQuery();

    List<FsStoreProductListQueryVO> selectFsStoreProductGoodListQuery();

    Long selectFsStoreProductCount(int type);
    Long selectFsStoreProductCount(int type,Long companyId);

    List<FsStoreProductActivityListVO> selectFsStoreProductByIds(String productIds);

    int updateStock(Long productId);

    List<FsStoreProductExportVO> selectFsStoreProductExportList(FsStoreProductScrm fsStoreProduct);

    String importStoreProduct(List<FsStoreProductExportVO> list, boolean updateSupport);

    void batchModify(ModifyMoreDTO modifyMoreDTO);

    List<FsStoreProductListSVO> selectFsStoreProductListSVO(FsStoreProductListSParam fsStoreProduct);

    String importSrorePeoduct(List<FsStoreProductExcelVO> list, boolean updateSupport);

    int updateFsStoreProductPrice(FsStoreProductScrm fsStoreProduct, Integer price);

    List<OptionsVO> selectFsStoreProductStoreList();

    FsStoreProductScrm selectFsStoreProductByProductId(Long productId);

    List<FsStoreProductRuleScrm> selectFsStoreProductRuleList();


    void batchAudit(ProductAuditDTO auditDTO);

    FsStoreProductScrm selectFsStoreProductByIdAudit(Long productId);

    List<FsStoreProductActivityListVO> selectFsStoreProductByIdsAudit(String productIds);

    R bulkCopyFsStoreProductByIds(Long[] productIds);

    List<FsStoreProductScrm> getStoreProductInProductIds(List<Long> storeProductIds);

    List<FsStoreProductListVO> liveList(LiveGoods liveId);
}
