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

package com.yami.shop.groupbuy.comment.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yami.shop.groupbuy.comment.api.dto.ApiGroupSkuDto;
import com.yami.shop.groupbuy.comment.api.dto.ApiGroupSkuInfoDto;
import com.yami.shop.groupbuy.comment.model.GroupSku;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 拼团活动商品规格
 *
 * @author LGH
 * @date 2019-08-27 17:55:57
 */
public interface GroupSkuMapper extends BaseMapper<GroupSku> {

    /**
     * 批量保存活动规格
     */
    void saveBatchGroupSku(@Param("groupSkuList") List<GroupSku> groupSkuList);

    /**
     * 获取SKU列表数据
     *
     * @param groupActivityId 拼团活动ID
     * @param prodId          商品ID
     * @return SKU列表
     */
    List<ApiGroupSkuDto> getApiByGroupActivityIdAndProdId(@Param("groupActivityId") Long groupActivityId, @Param("prodId") Long prodId);

    /**
     * 通过skuId获取活动规格详情
     */
    ApiGroupSkuInfoDto getSkuInfoByGroupSkuId(@Param("groupSkuId") Long groupSkuId);
}
