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

import api.common.pojo.param.scene.ScenePackageParam;
import api.common.pojo.po.scene.SceneEvaluationRulePO;
import api.common.pojo.po.scene.ScenePackagePO;
import api.common.pojo.po.scene.ScoringRulesPO;
import api.common.pojo.vo.scene.ScenePackageNewVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;


@Mapper
@Repository
public interface ScenePackageMapper {
    void saveScenePackage(ScenePackagePO params);
    void updateScenePackage(ScenePackagePO params);
    void deleteScenePackage(ScenePackagePO params);
    ScenePackagePO queryScenePackage(ScenePackageParam params);
    List<ScenePackagePO> queryScenePackageList(ScenePackageParam params);
    ScenePackageNewVO queryScenePackageBySublist(String packageId);
    ScenePackageNewVO queryByPackageName(ScenePackagePO params);
    ScenePackageNewVO querySelfOnly(@Param("packageName") String packageName, @Param("createUserId") String createUserId);
    Integer queryPackageCount(ScenePackagePO params);
    void updateIsUnavailable(ScenePackagePO params);
    void updateIsUnavailable2(ScenePackagePO params);
    @Select("select is_unavailable from scene_package where package_id = #{packageId}")
    String selectIsUnavailableByPackageId(@Param("packageId") String packageId);
    @Select("select is_deleted from scene_package where package_id = #{packageId}")
    String selectIsDeletedByPackageId(@Param("packageId") String packageId);
    void updateIsUnavailable3(ScoringRulesPO params);
    void updateIsUnavailableBySceneEvaluationRuleId(SceneEvaluationRulePO params);
    List<ScenePackagePO> selectByIndexIds(ScenePackageParam scenePackageParam);
    void update(@Param("testPackages") List<ScenePackagePO> testPackages);
}
