一直都是注冊(cè)失敗,原因?yàn)槲粗e(cuò)誤
錯(cuò)誤代碼 sql語句錯(cuò)誤
### Error updating database.? Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
### The error may involve com.miaoshaproject.dao.UserDOMapper.insertSelective-Inline
### The error occurred while setting parameters
### SQL: insert into user_info
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1


<insert?id="insert"?parameterType="com.miaoshaproject.dataobject.UserDO">
??<!--
????WARNING?-?@mbg.generated
????This?element?is?automatically?generated?by?MyBatis?Generator,?do?not?modify.
????This?element?was?generated?on?Wed?Apr?17?16:27:48?CST?2019.
??-->
??insert?into?user_info?(id,?name,?gender,?
????age,?talphone,?register_mode,?
????third_party_id)
??values?(#{id,jdbcType=INTEGER},?#{name,jdbcType=VARCHAR},?#{gender,jdbcType=TINYINT},
????#{age,jdbcType=INTEGER},?#{talphone,jdbcType=VARCHAR},?#{registerMode,jdbcType=VARCHAR},
????#{thirdPartyId,jdbcType=VARCHAR})
</insert><insert?id="insertSelective"?parameterType="com.miaoshaproject.dataobject.UserDO"?keyProperty="id"?useGeneratedKeys="true">
??<!--
????WARNING?-?@mbg.generated
????This?element?is?automatically?generated?by?MyBatis?Generator,?do?not?modify.
????This?element?was?generated?on?Wed?Apr?17?16:27:48?CST?2019.
??-->
insert?into?user_info
??<trim?prefix="("?suffix=")"?suffixOverrides=",">
????<if?test="id?!=?null">
??????id,
????</if>
????<if?test="name?!=?null">
??????name,
????</if>
????<if?test="gender?!=?null">
??????gender,
????</if>
????<if?test="age?!=?null">
??????age,
????</if>
????<if?test="talphone?!=?null">
??????talphone,
????</if>
????<if?test="registerMode?!=?null">
??????register_mode,
????</if>
????<if?test="thirdPartyId?!=?null">
??????third_party_id,
????</if>
??</trim>
??<trim?prefix="values?("?suffix=")"?suffixOverrides=",">
????<if?test="id?!=?null">
??????#{id,jdbcType=INTEGER},
????</if>
????<if?test="name?!=?null">
??????#{name,jdbcType=VARCHAR},
????</if>
????<if?test="gender?!=?null">
??????#{gender,jdbcType=TINYINT},
????</if>
????<if?test="age?!=?null">
??????#{age,jdbcType=INTEGER},
????</if>
????<if?test="talphone?!=?null">
??????#{talphone,jdbcType=VARCHAR},
????</if>
????<if?test="registerMode?!=?null">
??????#{registerMode,jdbcType=VARCHAR},
????</if>
????<if?test="thirdPartyId?!=?null">
??????#{thirdPartyId,jdbcType=VARCHAR},
????</if>
??</trim>
</insert>字段名都正確
2020-08-06
怎么解決的啊?分享以下啊
2020-03-07
求助怎么解決呀
2019-04-24
怎么解決的?我也有這個(gè)問題
2019-04-19
已解決