报return null from a method with a primitive return type (int).
1.报错信息:
org.apache.ibatis.binding.BindingException: Mapper method 'com.jack.all.mapper.TUserMapper.deleteById attempted to return null from a method with a primitive return type (int). at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:105) ~[mybatis-plus-core-3.2.0.jar:3.2.0] at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:61) ~[mybatis-plus-core-3.2.0.jar:3.2.0] at com.sun.proxy.$Proxy57.deleteById(Unknown Source) ~[na:na] at com.jack.all.service.impl.TUserServiceImpl.deleteId(TUserServiceImpl.java:62) ~[classes/:na]
2.解决办法:xml要写对应的,之前执行更新用的还是select所以报错
<update id="deleteById" parameterType="string"> update t_user set isdelete=1id=#{id}