package com.yiqi.core.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yiqi.core.domain.GoodsSkuStore;
import com.yiqi.core.domain.GoodsSpec;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GoodsSpecMapper extends BaseMapper<GoodsSpec> {

    /**
     * 批量新增商品规格
     */
    int batchInsert(@Param("goodsId") Long goodsId, @Param("specList") List<GoodsSpec> specList);

    /**
     * 根据商品ID删除规格
     */
    int deleteByGoodsId(Long goodsId);

    /**
     * 查询商品规格列表
     */
    List<GoodsSpec> selectByGoodsId(Long goodsId);
}