<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!--  Copyright (c) 京北方信息技术股份有限公司 Corporation 2022 . All rights reserved. -->
<!--  Mybatis数据库持久层（业务层映射文件）：脚本信息同步表 -->
<!--  version: 1.0  -->
<!--  author:  maven-cctp-plugin    -->
<!--  date:  2022-11-25 11:15:19  -->
<mapper namespace="net.northking.cctp.dw.db.dao.DwAtuPlanEnvLinkDao">
    <delete id="deleteByPlanIdAndEnvId">
        delete from dw_atu_plan_env_link where plan_id=#{planId} and env_id=#{envId}
    </delete>

    <select id="getEnvList" resultType="net.northking.cctp.dw.dto.atu.DwOptionDto">
        select DISTINCT env_id as value ,env_name as label from dw_atu_plan_env_link
    </select>

    <select id="getEnvById" resultType="net.northking.cctp.dw.db.entity.DwAtuPlanEnvLink">
        select id,plan_id planId,env_id envId,env_name envName from dw_atu_plan_env_link where env_id=#{envId} limit 1
    </select>
</mapper>