mysql 行锁操作值

update sup_payment_setting
           set paid_amount = paid_amount + #{amount}
        where id = #{id} and status = 1 and is_deleted = 0
          and sum_amount >= paid_amount + #{amount}

  

posted @ 2022-07-08 10:37  八英里  阅读(11)  评论(0编辑  收藏  举报