package com.xvji.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xvji.domain.Component;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 组件实体
 */
@Mapper
public interface ComponentMapper extends BaseMapper<Component> {

    @Select("SELECT * FROM component WHERE TASK_ID = #{taskId} AND TASK_TYPE = #{taskType}")
    List<Component> selectByTaskIdAndType(
            @Param("taskId") Long taskId,
            @Param("taskType") Integer taskType
    );
}