admin管理员组

文章数量:1654032

1.错误提示

Error updating database.  Cause: java.sql.SQLException: Data truncated for column 'identify_type' at row 1
### The error may involve star.vipuser.mapper.VipUserMapper.updateVipUser-Inline
### The error occurred while setting parameters
### SQL: update vip_user    SET merchant_id = ?,             user_id = ?,             telphone = ?,             realname = ?,             sex = ?,             contact_name = ?,             contact_tel = ?,             identify_type = ?,             identify_card = ?,             img_uidentify = ?,             img_uidentifyback = ?,             img_uidentifyhandheld = ?,             `desc` = ?,        modify_time = sysdate(),         realname_py = ?,             invite_code = ?    where id = ?
### Cause: java.sql.SQLException: Data truncated for column 'identify_type' at row 1

2.解决

   其实错误已经很明显,"The error occurred while setting parameters",参数设置错误,传入的参数不对," Data truncated",传入参数格式不符合,

   我的错误:前端页面 identify_type用的input输入框,而数据库identify_type字段为enum只有特定的两个值,所以报错,故将input框改成radio,或者select选择框,即传入的值是固定的,那就不会报错了

本文标签: SQLExceptionDataJavasqlidentifytype