<?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">
<mapper namespace="com.hdkj.lt.mq.mapper.fault.FhzgFaultStrategyDetialMapper">

    <select id="getStrategyDetialByTime" resultType="com.hdkj.lt.core.bizms.modle.po.fault.FaultTransferStrategyConfigDetail">
        select cd.id,cd.indicator_name,cd.priority,cd.enable
        from fhzg_fault_transfer_strategy_config_detail cd
                 left join fhzg_fault_transfer_strategy_config sc on cd.strategy_id = sc.id
        where transfer_strategy = #{transferStrategy}
          and enable = 0
        order by priority asc
    </select>

    <select id="getConfigDetailListByFaultType"
            resultType="com.hdkj.lt.core.bizms.modle.po.fault.FaultTransferStrategyConfigDetail">
        select scd.id,
               scd.strategy_id,
               scd.indicator_code,
               scd.indicator_name,
               scd.priority,
               scd.enable
        from fhzg_fault_transfer_strategy_config sc
                 left join fhzg_fault_transfer_strategy_config_detail scd on scd.strategy_id = sc.id
        where sc.transfer_strategy = #{type}
          and sc.status = 0
          and scd.enable = 0
        order by priority
    </select>
</mapper>