package com.cyksj.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cyksj.model.entity.GoodsDonQaRelate;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 项目名: yhlxj2
 * 文件名: GoodsDonQaRelateMapper
 * 创建者: JavaZou
 * 创建时间:2024/5/24 16:13
 */
public interface GoodsDonQaRelateMapper extends BaseMapper<GoodsDonQaRelate> {

	@Select("select g.id from (select goods_id from goods_don_qa_relate where question_id = #{questionId}) gqr inner join goods_don g on g.id = gqr.goods_id")
	List<Long> getQaGoodsByQaId(Long questionId);

	void batchInsert(@Param("id") Long id, @Param("list") List<Long> goodsIds);
}
