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

package com.yami.shop.groupbuy.comment.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yami.shop.groupbuy.comment.api.dto.ApiGroupSkuDto;
import com.yami.shop.groupbuy.comment.api.dto.ApiGroupSkuInfoDto;
import com.yami.shop.groupbuy.comment.dao.GroupSkuMapper;
import com.yami.shop.groupbuy.comment.model.GroupSku;
import com.yami.shop.groupbuy.comment.service.GroupSkuService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 拼团活动商品规格
 *
 * @author LGH
 * @date 2019-08-27 17:55:57
 */
@Service
@AllArgsConstructor
public class GroupSkuServiceImpl extends ServiceImpl<GroupSkuMapper, GroupSku> implements GroupSkuService {

    private final GroupSkuMapper groupSkuMapper;

    /**
     * 获取SKU列表数据
     * @param groupActivityId 拼团活动ID
     * @param prodId 商品ID
     * @return SKU列表
     */
    @Override
    public List<ApiGroupSkuDto> getApiByGroupActivityIdAndProdId(Long groupActivityId, Long prodId) {
        return groupSkuMapper.getApiByGroupActivityIdAndProdId(groupActivityId, prodId);
    }

    @Override
    public ApiGroupSkuInfoDto getSkuInfoByGroupSkuId(Long groupSkuId) {
        return groupSkuMapper.getSkuInfoByGroupSkuId(groupSkuId);
    }
}
