<?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.yeejoin.amos.supervision.business.dao.mapper.RiskSourceMapper">

    <select id="getById" resultType="com.yeejoin.amos.supervision.business.entity.mybatis.RiskSourceBo">
        select
            *
        from
            spc_risk_source
        where
            id = #{id}
        limit 1
    </select>

    <select id="listByParentId" resultType="com.yeejoin.amos.supervision.business.entity.mybatis.RiskSourceBo">
        select
            *
        from
            spc_risk_source
        where
            parent_id = #{id}
    </select>

    <update id="updateDangerState">
        update
            spc_risk_source
        set
            is_danger = #{isDanger},
            danger_level = #{dangerLevel}
        where
            id = #{id}
    </update>
	
</mapper>