亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

一直都是注冊失敗,原因為未知錯誤

錯誤代碼 sql語句錯誤

### 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




https://img1.sycdn.imooc.com//5cb898c30001d17015380067.jpg

https://img1.sycdn.imooc.com//5cb898c300016d7512100553.jpg


<insert?id="insert"?parameterType="com.miaoshaproject.dataobject.UserDO">
??<!--
[email protected]
????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">
??<!--
[email protected]
????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>

字段名都正確

正在回答

4 回答

怎么解決的啊?分享以下啊

0 回復 有任何疑惑可以回復我~

求助怎么解決呀

0 回復 有任何疑惑可以回復我~

怎么解決的?我也有這個問題

0 回復 有任何疑惑可以回復我~
#1

qq_Tzz_0 提問者

你看你寫的數據類型是否和老師的一樣?
2019-04-24 回復 有任何疑惑可以回復我~
#2

qq_Tzz_0 提問者

我的是用戶注冊接口里面數據類型寫錯了
2019-04-24 回復 有任何疑惑可以回復我~
#3

雨啊 回復 qq_Tzz_0 提問者

在哪個文件里
2020-01-02 回復 有任何疑惑可以回復我~

已解決

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

一直都是注冊失敗,原因為未知錯誤

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號