— 01 —
背景
Background
B端用户通常需共同维护同一数据,如产品参数,因而并发编辑是可能存在的,通常业务会设计为先查询再编辑,这是一个闭环,若中间有第二人介入后并率先完成编辑后提交则会打破这个闭环,就像数据库事务的原子性被打破,若此时不能给第一人以提示,其再提交时会无意覆盖后者维护的结果。
B-end users often need to jointly maintain the same data, such as product parameters, hence concurrent editing is possible. Typically, the business process is designed to query first and then edit, forming a closed loop. If a second person intervenes in the middle and completes the edit and submits it first, this loop is broken, much like the atomicity of a database transaction is compromised. If the first person is not alerted at this point, they may inadvertently overwrite the results maintained by the second person when they submit.
— 02 —
防止无意识地覆盖他人数据
Preventing Unintentional Overwriting of Others' Data
通常处理方式为:拒绝第一个人(“先获得了查询结果但后提交”)的提交动作,提示其数据已被更新,需重新查询核实后再修改,一个简单的流程示例如下:
The usual approach is to reject the submission from the first person (who "obtained the query results first but submitted later"), displaying a prompt that the data has been updated and they need to re-query and verify before making changes. A simple process example is as follows:
— End —
领取专属 10元无门槛券
私享最新 技术干货