<?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.hbzwfw.mapper.HbzwfwMapper">

    <resultMap type="com.yinet.hbzwfw.domain.HbzwfwUser" id="HbzwfwUserResult">
        <result property="hbzwfwUserId" column="hbzwfw_user_id"/>
        <result property="loginname" column="loginname"/>
        <result property="pwd" column="pwd"/>
        <result property="name" column="name"/>
        <result property="papersnumber" column="papersnumber"/>
        <result property="paperstype" column="paperstype"/>
        <result property="cardstartime" column="cardstartime"/>
        <result property="cardendtime" column="cardendtime"/>
        <result property="mobile" column="mobile"/>
        <result property="email" column="email"/>
        <result property="appmark" column="appmark"/>
        <result property="phone" column="phone"/>
        <result property="age" column="age"/>
        <result property="sex" column="sex"/>
        <result property="address" column="address"/>
        <result property="submitTime" column="submit_time"/>
    </resultMap>

    <insert id="insertHbzwfwUser" parameterType="HbzwfwUser">
        insert into hbzwfw_user(
        loginname,
        pwd,
        name,
        papersnumber,
        paperstype,
        cardstartime,
        cardendtime,
        mobile,
        email,
        appmark,
        phone,
        age,
        sex,
        address,
        type,
        msg,
        submit_time
        )values (
        #{user.loginname},
        #{user.pwd},
        #{user.name},
        #{user.papersnumber},
        #{user.paperstype},
        #{user.cardstartime},
        #{user.cardendtime},
        #{user.mobile},
        #{user.email},
        #{user.appmark},
        #{user.phone},
        #{user.age},
        #{user.sex},
        #{user.address},
        #{user.type},
        #{user.msg},
        #{user.submitTime}
        );
    </insert>
    <select id="selectCountByIdCard" resultType="Integer">
        select count(1) from hbzwfw_user where papersnumber=#{idCard}
    </select>
</mapper>