Invoicing method and system based on distributed lock
The invention discloses an invoicing method and system based on a distributed lock, and the method comprises the steps: connecting an online bill interface, obtaining an invoiced bill, and obtaining the to-be-invoiced amount data according to the invoiced bill; obtaining a bill unique code correspon...
Gespeichert in:
Hauptverfasser: | , , , |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention discloses an invoicing method and system based on a distributed lock, and the method comprises the steps: connecting an online bill interface, obtaining an invoiced bill, and obtaining the to-be-invoiced amount data according to the invoiced bill; obtaining a bill unique code corresponding to the to-be-invoiced amount data; adding lock logic before querying the to-be-invoiced amount data; after the lock logic is added successfully, executing the deduction operation of the invoiced amount; and after the deduction operation of the invoicing amount is completed, updating amount data after deduction to a database, and executing an unlocking operation.
本发明公开了一种基于分布式锁的开票方法和系统,所述方法包括:连接在线票据接口,获取开票完毕的票据,根据所述开票完毕票据获取待开票金额数据;获取所述待开票金额数据对应的票据唯一编码;在查询所述待开票金额数据前添加锁逻辑;添加锁逻辑成功后执行已开票金额的减扣操作;完整所述已开票金额的减扣操作后,将减扣完毕的金额数据更新到数据库,并执行解锁操作。 |
---|