记录: update方法在service 中写为代码先执行查询方法,再对数据进行update。 1、将select方法和update方法放在不同业务方法中。 2、这个select方法在xml的SQL语句中加for update