<?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.winsun.mapper.NetworkInfoMapper">


    <select id="queryMap" parameterType="String" resultType="HashMap">
        select * from hhr_network_info where network_code = #{networkCode}
    </select>

    <insert id="insertMap">
        INSERT INTO hhr_network_info
        (network_code,network_name,school_name,area_name,spring_start_time,spring_end_time,greater_fifty,greater_hundred)
        VALUES (#{a},#{b},#{c},#{d},#{e},#{f},#{g},#{h})
    </insert>

    <update id="updateMap">
        update hhr_network_info set
        <if test="e != null and e != ''">
            spring_start_time = #{e},
        </if>
        <if test="f != null and f != ''">
            spring_end_time = #{f},
        </if>
        <if test="g != null and g != ''">
            greater_fifty = #{g},
        </if>
        <if test="h != null and h != ''">
            greater_hundred = #{h},
        </if>
        network_code = #{a},
        network_name = #{b},
        school_name = #{c},
        area_name = #{d}
        where
        area_name = #{d}
        and
        school_name = #{c}
    </update>


</mapper>