<?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.xxfc.platform.activity.mapper.IntegralUserTotalMapper" >
  <resultMap id="BaseResultMap" type="com.xxfc.platform.activity.entity.IntegralUserTotal" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="user_id" property="userId" jdbcType="INTEGER" />
    <result column="total_point" property="totalPoint" jdbcType="INTEGER" />
    <result column="rest_point" property="restPoint" jdbcType="INTEGER" />
    <result column="crt_time" property="crtTime" jdbcType="BIGINT" />
    <result column="upd_time" property="updTime" jdbcType="BIGINT" />
  </resultMap>

  <select id="selectAllByParam" parameterType="com.xxfc.platform.activity.vo.IntegralUserTotalDto" resultType="com.xxfc.platform.activity.entity.IntegralUserTotal">
        select * from integral_user_total
        <where>
          <if test="userId != null">
            and user_id = #{userId}
          </if>
        </where>
        order by upd_time DESC
  </select>

</mapper>