package com.jeesharp.business.modules.mall.service;

import com.jeesharp.business.modules.mall.entity.MallSeckillSku;
import com.jeesharp.business.modules.mall.vo.MallSeckillSkuQueryVO;
import com.jeesharp.framework.mybatis.core.service.BaseInterface;

import java.util.List;

/**
 * 秒杀商品 Service 接口
 */
public interface MallSeckillSkuService extends BaseInterface<MallSeckillSku, MallSeckillSkuQueryVO> {

    void createSeckillSku(MallSeckillSku entity);

    void updateSeckillSku(MallSeckillSku entity);
List<MallSeckillSku> getSessionSkus(String sessionId);

    boolean hasSeckillStock(String skuId, Integer quantity);

    boolean deductSeckillStock(String skuId, Integer quantity);
}
