/*
 * Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 */

package com.yami.shop.seckill.comment.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yami.shop.bean.param.OfflineHandleEventAuditParam;
import com.yami.shop.common.util.PageParam;
import com.yami.shop.seckill.comment.dto.SeckillProductSimpleDto;
import com.yami.shop.seckill.comment.model.Seckill;
import com.yami.shop.seckill.comment.model.SeckillSku;

import java.util.List;

/**
 * 秒杀信息
 *
 * @author LGH
 * @date 2019-08-28 09:36:59
 */
public interface SeckillService extends IService<Seckill> {

    /**
     * 保存秒杀信息
     *
     * @param seckill
     * @param seckillSkus
     */
    void saveSeckill(Seckill seckill, List<SeckillSku> seckillSkus);

    /**
     * 根据秒杀id获取秒杀信息
     *
     * @param seckillId
     * @return
     */
    Seckill getSeckillById(Long seckillId);

    void removeSeckillCacheById(Long seckillId);

    void invalidById(Seckill seckill);

    IPage<SeckillProductSimpleDto> pageSeckillProd(PageParam<SeckillProductSimpleDto> page, String lat, String lon, String distance);

    /**
     * 平台 --获取分页秒杀数据
     */
    IPage<Seckill> getPlatformSeckillPage(PageParam<Seckill> page, Seckill seckill);

    /**
     * 平台 --下线活动
     */
    void offline(Seckill seckill, String offlineReason, Long sysUserId);

    /**
     * 平台 --审核秒杀操作
     */
    void auditSeckill(OfflineHandleEventAuditParam offlineHandleEventAuditParam, Long sysUserId);

    /**
     * 商家申请审核
     *
     */
    void auditApply(Long eventId, Long seckillId, String reapplyReason);

    void changeProdTypeBySeckillIdList(List<Long> seckillIds);
}
