package com.cyksj.service.exchange;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cyksj.dto.Result;
import com.cyksj.model.entity.ExchangeCode;
import com.cyksj.model.entity.GoodsDonSku;
import com.cyksj.model.entity.GroupsRelation;
import com.cyksj.model.entity.OrderDon;
import com.cyksj.model.excel.ExcelExchangeCodeData;
import com.cyksj.model.request.ExchangeCodeReq;
import com.cyksj.model.request.ExchangeCodeTicket;

import java.util.List;

/*
 *项目名: netflix
 *文件名: ExchangeCodeService
 *创建者: JavaZou
 *创建时间:2022/11/7 15:41
 */
public interface ExchangeCodeService extends IService<ExchangeCode> {
	/**
	 * 生成兑换码
	 */
	List<ExcelExchangeCodeData> createExchangeCode(ExchangeCodeReq exchangeCodeReq) throws Exception;

	/**
	 * 兑换码兑换
	 */
	Result<String> getTicketByExchangeCode(ExchangeCodeTicket exchangeCodeTicket, Long userId) throws Exception;

	/**
	 * 获取兑换码
	 */
	String getExCode(Long goodsId, Long skuId, Integer type);

	/**
	 * 获取车票
	 */
	GroupsRelation getGroupTripsTicket(Long yhsId, GoodsDonSku sku, Long userId, OrderDon exCodeOrderDon, OrderDon.Type orderDonTye, String exCode);

	/**
	 * 获取车票车位
	 */
	GroupsRelation getRelationNoOrder(GoodsDonSku sku, Long userId, Long yhsId);
}
