<?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.qxgmat.data.relation.SentenceQuestionRelationMapper">
  <resultMap id="IdMap" type="com.qxgmat.data.dao.entity.SentenceQuestion">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" jdbcType="INTEGER" property="id" />
  </resultMap>
  <sql id="Id_Column_List">
    <!--
      WARNING - @mbg.generated
    -->
    sq.`id`
  </sql>

  <!--累加做题记录-->
  <update id="accumulation">
    UPDATE `sentence_question`
    <trim prefix="set" suffixOverrides=",">
      `total_number`=`total_number`+#{number, jdbcType=INTEGER},
      `total_time`=`total_time`+#{time, jdbcType=INTEGER},
      `total_correct`=`total_correct`+#{correct, jdbcType=INTEGER},
    </trim>
    WHERE `id` = #{id, jdbcType=VARCHAR}
  </update>

</mapper>