1,当Mapper里如下定义:
@Mapper
public interface BizSplashScreenMapper {
int addSplashScreen(BizSplashScreen bizSplashScreen);
List<BizSplashScreen> getSplashScreen();
int updateSplashScreen(BizSplashScreen bizSplashScreen);
int updateStatus(@Param("id") long id, @Param("status") int status);
}
xml如下配置:
<update id="updateStatus">
update biz_launch_image_group
set status = #{status, jdbcType=TINYINT}
where id = #{id, jdbcType=BIGINT}
</update>
则上面的@Param不可省,省了的话什报如下错误:
nested exception is org.apache.ibatis.binding.BindingException: Parameter 'status' not found. Available parameters are [arg1, arg0, param1, param2]