发布时间:2019-08-01 11:04:42
错误:
SQL: update t_shop_auth SET business_license=? identity_negative=? where shop_id=?
### Cause: .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 'identity_negative='D:/upload/img/20190706/20190706133253.jpg'
where sho' at line 3
mybatis文件:
update t_shop_auth<set> <if test="panyName!=null">pany_name=#{panyName}</if> <if test="addr!=null">addr=#{addr}</if> <if test="legalUser!=null">legal_user=#{legalUser}</if> <if test="legalIdentity!=null">legal_identity=#{legalIdentity}</if> <if test="legalMobile!=null">legal_mobile=#{legalMobile}</if> <if test="businessLicense!=null">business_license=#{businessLicense}</if> <if test="identityNegative!=null">identity_negative=#{identityNegative}</if> <if test="identityPositive!=null">identity_positive=#{identityPositive}</if> <if test="credentials1!=null">credentials1=#{credentials1}</if> <if test="credentials2!=null">credentials2=#{credentials2}</if> <if test="createdTime!=null">created_time=#{createdTime}</if> <if test="createdBy!=null">created_by=#{createdBy}</if> <if test="updatedTime!=null">updated_time=#{updatedTime}</if> <if test="updatedBy!=null">updated_by=#{updatedBy}</if></set>where shop_id=#{shopId}
business_license=? identity_negative=? 这两个中间缺少逗号
简单的方法就是直接去数据库里运行你哪一行sql代码 欧克