<?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.community.huiju.dao.TaBriskUserMapper" >

    <resultMap id="BaseResultMap" type="com.community.huiju.model.TaBriskUser" >
        <id column="id" property="id" jdbcType="INTEGER" />
        <result column="community_id" property="communityId" jdbcType="INTEGER" />
        <result column="ta_user_verify_id" property="taUserVerifyId" jdbcType="INTEGER" />
        <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
    </resultMap>

    <select id="selectByParams" resultMap="BaseResultMap">
        select
          id,community_id,ta_user_verify_id,create_date
        from ta_brisk_user
        where ta_user_verify_id = #{userVerifyId}
        AND community_id = #{communityId}
        AND to_days(create_date) = to_days(#{nowDate})
    </select>

    <insert id="saveBriskUser" parameterType="com.community.huiju.model.TaBriskUser" >
    insert into ta_brisk_user (id, community_id, ta_user_verify_id,create_date
      )
    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{taUserVerifyId,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}
      )
  </insert>
</mapper>