package co.yixiang.yshop.module.product.service.campaigninfo;

import co.yixiang.yshop.framework.common.pojo.PageResult;
import co.yixiang.yshop.module.product.controller.app.campaigninfo.vo.CampaignNumberJudgeVO;
import co.yixiang.yshop.module.product.controller.app.campaigninfo.vo.CampaignProductReqVO;
import co.yixiang.yshop.module.product.controller.app.campaigninfo.vo.CampaignProductRespVO;
import co.yixiang.yshop.module.product.controller.app.campaigninfo.vo.CampaignSkuVO;

import java.util.List;

/**
 * 活动信息 APP Service 接口
 *
 * @author moxiangrong
 */
public interface AppCampaignInfoService {

    PageResult<CampaignProductRespVO> getCampaignProductPage(CampaignProductReqVO reqVO);

    List<CampaignSkuVO> getCampaignsByProductAttrUniques(List<String> productAttrUniques);

    /**
     * 活动商品购买数量限制
     *
     * @param vo
     */
    void numberJudge(CampaignNumberJudgeVO vo);

    /**
     * 减少活动库存
     *
     * @param productAttrUnique
     * @param number
     */
    void deStock(String productAttrUnique, Integer number);

    /**
     * 回退活动库存
     *
     * @param productAttrUnique
     * @param number
     */
    void backStock(String productAttrUnique, Integer number);
}
