并发更新数据的思想 January 8, 2018 ### Java代码: ```java while ( true ) { if ( null != upCount && 0 < upCount ) { break; } UserInfoDO newUserInfo = userInfoDAO.getById(userInfoDO.getId()); upCount = userInfoDAO.updateFollowerNumDesc(newUserInfo); } ``` ### SQL代码: ```xml update user_center set gmt_modified=now(),total_follower_num=total_follower_num + 1 where id=#id# total_follower_num=#totalFollowerNum# ```