diff --git a/src/main/resources/mappers/TopicRecordMapper.xml b/src/main/resources/mappers/TopicRecordMapper.xml index 66e9ddc..998eca7 100644 --- a/src/main/resources/mappers/TopicRecordMapper.xml +++ b/src/main/resources/mappers/TopicRecordMapper.xml @@ -2,7 +2,7 @@ <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.sztzjy.fund_investment.mapper.TopicRecordMapper"> <resultMap id="BaseResultMap" type="com.sztzjy.fund_investment.entity.TopicRecord"> - <id column="id" jdbcType="VARCHAR" property="id" /> + <id column="id" jdbcType="INTEGER" property="id" /> <result column="topic_id" jdbcType="VARCHAR" property="topicId" /> <result column="flow_id" jdbcType="VARCHAR" property="flowId" /> <result column="module" jdbcType="VARCHAR" property="module" /> @@ -75,7 +75,7 @@ </where> </sql> <sql id="Base_Column_List"> - id, topic_id, flow_id, module, topic_content, topic_type, choicesA, choicesB, choicesC, + id, topic_id, flow_id, module, topic_content, topic_type, choicesA, choicesB, choicesC, choicesD, choicesE, user_answer, answer </sql> <select id="selectByExample" parameterType="com.sztzjy.fund_investment.entity.TopicRecordExample" resultMap="BaseResultMap"> @@ -92,15 +92,15 @@ order by ${orderByClause} </if> </select> - <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> - select + <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> + select <include refid="Base_Column_List" /> from topic_record - where id = #{id,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} </select> - <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> + <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> delete from topic_record - where id = #{id,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} </delete> <delete id="deleteByExample" parameterType="com.sztzjy.fund_investment.entity.TopicRecordExample"> delete from topic_record @@ -109,16 +109,16 @@ </if> </delete> <insert id="insert" parameterType="com.sztzjy.fund_investment.entity.TopicRecord"> - insert into topic_record (id, topic_id, flow_id, - module, topic_content, topic_type, - choicesA, choicesB, choicesC, - choicesD, choicesE, user_answer, - answer) - values (#{id,jdbcType=VARCHAR}, #{topicId,jdbcType=VARCHAR}, #{flowId,jdbcType=VARCHAR}, - #{module,jdbcType=VARCHAR}, #{topicContent,jdbcType=VARCHAR}, #{topicType,jdbcType=VARCHAR}, - #{choicesa,jdbcType=VARCHAR}, #{choicesb,jdbcType=VARCHAR}, #{choicesc,jdbcType=VARCHAR}, - #{choicesd,jdbcType=VARCHAR}, #{choicese,jdbcType=VARCHAR}, #{userAnswer,jdbcType=VARCHAR}, - #{answer,jdbcType=VARCHAR}) + insert into topic_record (id, topic_id, flow_id, + module, topic_content, topic_type, + choicesA, choicesB, choicesC, + choicesD, choicesE, user_answer, + answer) + values (#{id,jdbcType=INTEGER}, #{topicId,jdbcType=VARCHAR}, #{flowId,jdbcType=VARCHAR}, + #{module,jdbcType=VARCHAR}, #{topicContent,jdbcType=VARCHAR}, #{topicType,jdbcType=VARCHAR}, + #{choicesa,jdbcType=VARCHAR}, #{choicesb,jdbcType=VARCHAR}, #{choicesc,jdbcType=VARCHAR}, + #{choicesd,jdbcType=VARCHAR}, #{choicese,jdbcType=VARCHAR}, #{userAnswer,jdbcType=VARCHAR}, + #{answer,jdbcType=VARCHAR}) </insert> <insert id="insertSelective" parameterType="com.sztzjy.fund_investment.entity.TopicRecord"> insert into topic_record @@ -165,7 +165,7 @@ </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null"> - #{id,jdbcType=VARCHAR}, + #{id,jdbcType=INTEGER}, </if> <if test="topicId != null"> #{topicId,jdbcType=VARCHAR}, @@ -215,7 +215,7 @@ update topic_record <set> <if test="record.id != null"> - id = #{record.id,jdbcType=VARCHAR}, + id = #{record.id,jdbcType=INTEGER}, </if> <if test="record.topicId != null"> topic_id = #{record.topicId,jdbcType=VARCHAR}, @@ -260,19 +260,19 @@ </update> <update id="updateByExample" parameterType="map"> update topic_record - set id = #{record.id,jdbcType=VARCHAR}, - topic_id = #{record.topicId,jdbcType=VARCHAR}, - flow_id = #{record.flowId,jdbcType=VARCHAR}, - module = #{record.module,jdbcType=VARCHAR}, - topic_content = #{record.topicContent,jdbcType=VARCHAR}, - topic_type = #{record.topicType,jdbcType=VARCHAR}, - choicesA = #{record.choicesa,jdbcType=VARCHAR}, - choicesB = #{record.choicesb,jdbcType=VARCHAR}, - choicesC = #{record.choicesc,jdbcType=VARCHAR}, - choicesD = #{record.choicesd,jdbcType=VARCHAR}, - choicesE = #{record.choicese,jdbcType=VARCHAR}, - user_answer = #{record.userAnswer,jdbcType=VARCHAR}, - answer = #{record.answer,jdbcType=VARCHAR} + set id = #{record.id,jdbcType=INTEGER}, + topic_id = #{record.topicId,jdbcType=VARCHAR}, + flow_id = #{record.flowId,jdbcType=VARCHAR}, + module = #{record.module,jdbcType=VARCHAR}, + topic_content = #{record.topicContent,jdbcType=VARCHAR}, + topic_type = #{record.topicType,jdbcType=VARCHAR}, + choicesA = #{record.choicesa,jdbcType=VARCHAR}, + choicesB = #{record.choicesb,jdbcType=VARCHAR}, + choicesC = #{record.choicesc,jdbcType=VARCHAR}, + choicesD = #{record.choicesd,jdbcType=VARCHAR}, + choicesE = #{record.choicese,jdbcType=VARCHAR}, + user_answer = #{record.userAnswer,jdbcType=VARCHAR}, + answer = #{record.answer,jdbcType=VARCHAR} <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> @@ -317,22 +317,22 @@ answer = #{answer,jdbcType=VARCHAR}, </if> </set> - where id = #{id,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} </update> <update id="updateByPrimaryKey" parameterType="com.sztzjy.fund_investment.entity.TopicRecord"> update topic_record set topic_id = #{topicId,jdbcType=VARCHAR}, - flow_id = #{flowId,jdbcType=VARCHAR}, - module = #{module,jdbcType=VARCHAR}, - topic_content = #{topicContent,jdbcType=VARCHAR}, - topic_type = #{topicType,jdbcType=VARCHAR}, - choicesA = #{choicesa,jdbcType=VARCHAR}, - choicesB = #{choicesb,jdbcType=VARCHAR}, - choicesC = #{choicesc,jdbcType=VARCHAR}, - choicesD = #{choicesd,jdbcType=VARCHAR}, - choicesE = #{choicese,jdbcType=VARCHAR}, - user_answer = #{userAnswer,jdbcType=VARCHAR}, - answer = #{answer,jdbcType=VARCHAR} - where id = #{id,jdbcType=VARCHAR} + flow_id = #{flowId,jdbcType=VARCHAR}, + module = #{module,jdbcType=VARCHAR}, + topic_content = #{topicContent,jdbcType=VARCHAR}, + topic_type = #{topicType,jdbcType=VARCHAR}, + choicesA = #{choicesa,jdbcType=VARCHAR}, + choicesB = #{choicesb,jdbcType=VARCHAR}, + choicesC = #{choicesc,jdbcType=VARCHAR}, + choicesD = #{choicesd,jdbcType=VARCHAR}, + choicesE = #{choicese,jdbcType=VARCHAR}, + user_answer = #{userAnswer,jdbcType=VARCHAR}, + answer = #{answer,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} </update> </mapper> \ No newline at end of file