<?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.yinet.wsyy.mapper.WsyyQuantumMapper">

    <resultMap type="WsyyQuantum" id="WsyyQuantumResult">
        <result property="wsyyQuantumId" column="wsyy_quantum_id"/>
        <result property="timeQuantum" column="time_quantum"/>
        <result property="status" column="status"/>
    </resultMap>

    <sql id="selectWsyyQuantumVo">
        select wsyy_quantum_id, time_quantum, status from wsyy_quantum
    </sql>

    <select id="selectWsyyQuantumList" parameterType="String" resultMap="WsyyQuantumResult">
        <include refid="selectWsyyQuantumVo"/>
        <where>
            <if test="status != null  and status != ''">and status = #{status}</if>
        </where>
    </select>

    <update id="changeStatus" parameterType="WsyyQuantum">
        update wsyy_quantum
        <trim prefix="SET" suffixOverrides=",">
            <if test="timeQuantum != null  and timeQuantum != ''">time_quantum = #{timeQuantum},</if>
            <if test="status != null  and status != ''">status = #{status},</if>
        </trim>
        where wsyy_quantum_id = #{wsyyQuantumId}
    </update>
    <select id="selectWsyyQuantumById" resultMap="WsyyQuantumResult">
        <include refid="selectWsyyQuantumVo"/>
        <where>
            wsyy_quantum_id = #{wsyyQuantumId}
        </where>
    </select>
</mapper>