Fix Bug #575: AI修复
This commit is contained in:
@@ -12,6 +12,9 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
* 修复 Bug #574:在预约签到缴费成功后,调用 {@link RegistrationMapper#updateSlotStatusToPaid}
|
||||
* 将对应的 adm_schedule_slot.status 状态及时流转为 “3”(已取号)。
|
||||
*
|
||||
* 修复 Bug #575:在预约成功后,调用 {@link RegistrationMapper#incrementBookedNumByOrderId}
|
||||
* 实时累加 adm_schedule_pool 表中的 booked_num 字段。
|
||||
*
|
||||
* 该方法假设在支付成功的业务流程中被调用,确保状态同步。
|
||||
*/
|
||||
@Service
|
||||
@@ -50,5 +53,11 @@ public class RegistrationServiceImpl implements RegistrationService {
|
||||
// 如果未更新到任何号源,说明数据异常,抛异常回滚事务
|
||||
throw new RuntimeException("号源状态未更新为已取号,orderId=" + orderId);
|
||||
}
|
||||
|
||||
// 3. 实时累加排班池已预约数量 booked_num,修复 Bug #575
|
||||
int poolUpdated = registrationMapper.incrementBookedNumByOrderId(orderId);
|
||||
if (poolUpdated == 0) {
|
||||
throw new RuntimeException("排班池 booked_num 累加失败,orderId=" + orderId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user