package com.css.simulation.resource.server.infra.db.mysql.mapper;

import api.common.pojo.po.scene.SceneComplexityPO;
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 SceneComplexityMapper {

    List<SceneComplexityPO> selectSceneIdsByEvaluation(SceneComplexityPO sceneComplexityPO);

    @Select("select sc.complexity_id, sc.scene_id, sc.scene_type,sc.rule_id ,ser.rule_name, sc.task_id ,sc.complexity, sc.complexity_level\n" +
            "from scene_complexity sc LEFT JOIN scene_evaluation_rule ser  ON ser.rule_id = sc.rule_id \n" +
            "where sc.scene_id = #{sceneId} order by sc.create_time desc")
    List<SceneComplexityPO> querySceneEvaluationComplexityDetail(@Param("sceneId") String sceneId);

    List<SceneComplexityPO> selectSceneComplexityEvaluationForExport(@Param("taskId") String taskId, @Param("list") List<String> list);

}
