IUserAuthorizeInfoDao.xml 1.65 KB
<?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.yohoufo.dal.user.IUserAuthorizeInfoDao" >
  <resultMap id="BaseResultMap" type="com.yohoufo.dal.user.model.UserAuthorizeInfo" >
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="uid" property="uid" jdbcType="INTEGER" />
    <result column="valid_status" property="validStatus" jdbcType="INTEGER" />
    <result column="card_no" property="cardNo" jdbcType="VARCHAR" />
    <result column="cert_no" property="certNo" jdbcType="VARCHAR" />
    <result column="cert_name" property="certName" jdbcType="VARCHAR" />
    <result column="create_time" property="createTime" jdbcType="INTEGER" />
    <result column="update_time" property="updateTime" jdbcType="INTEGER" />
  </resultMap>

  <sql id="Base_Column_List" >
    id, uid, valid_status, card_no, cert_no, cert_name, create_time, update_time
  </sql>

  <select id="selectValidAuthorizeInfoByUid" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    select
    <include refid="Base_Column_List" />
    from authorize_info
    where valid_status = 1 and uid = #{uid,jdbcType=INTEGER}
  </select>

  <insert id="insert" parameterType="com.yohoufo.dal.user.model.UserAuthorizeInfo" >
    insert into authorize_info (uid, valid_status, card_no, cert_no, cert_name, create_time, update_time)
    values (#{uid,jdbcType=INTEGER},#{validStatus,jdbcType=INTEGER},
    #{cardNo,jdbcType=VARCHAR},#{certNo,jdbcType=VARCHAR},#{certName,jdbcType=VARCHAR},
    #{createTime,jdbcType=BIGINT},#{updateTime,jdbcType=BIGINT})
  </insert>


</mapper>