问题遇到的现象和发生背景
在使用vue是用数据库update的方法,
@Update("update tb_brand set brand_name=#{brandName} where Id=id,update tb_brand set company_name=#{companyName} where Id=id,update tb_brand set ordered=#{ordered} where Id=id,update tb_brand set description=#{description} where Id=id,update tb_brand set status=#{status} where Id=id")
void update(Brand brand,Integer id);
问题相关代码,请勿粘贴截图
Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error updating database. Cause: org.apache.ibatis.binding.BindingException: Parameter 'brandName' not found. Available parameters are [arg1, arg0, param1, param2]
### The error may exist in com/itheima/mapper/BrandMapper.java (best guess)
### The error may involve com.itheima.mapper.BrandMapper.update-Inline
### The error occurred while setting parameters
### SQL: update tb_brand set brand_name=? where Id=id,update tb_brand set company_name=? where Id=id,update tb_brand set ordered=? where Id=id,update tb_brand set description=? where Id=id,update tb_brand set status=? where Id=id
### Cause: org.apache.ibatis.binding.BindingException: Parameter 'brandName' not found. Available parameters are [arg1, arg0, param1, param2]
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:199)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:67)