当前卡的逻辑变更
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m53s

This commit is contained in:
2026-04-24 09:25:44 +08:00
parent a44c88005d
commit ba73913a41
3 changed files with 21 additions and 41 deletions

View File

@@ -611,13 +611,12 @@ func (s *Service) updateDeviceFromSyncInfo(ctx context.Context, deviceID uint, r
return
}
if string(resp.CurrentIccid) != "" {
// 更新 is_current 标识事务原子操作per D-14 决策)
if err := s.deviceSimBindingStore.UpdateIsCurrentByDeviceID(ctx, deviceID, string(resp.CurrentIccid)); err != nil {
logger.GetAppLogger().Warn("sync-info 更新 is_current 失败",
zap.Uint("device_id", deviceID),
zap.Error(err))
}
// 更新 is_current 标识(事务原子操作,按 current_slot_number 逻辑槽位更新)
if err := s.deviceSimBindingStore.UpdateIsCurrentByDeviceID(ctx, deviceID, int(resp.CurrentSlotNo)); err != nil {
logger.GetAppLogger().Warn("sync-info 更新 is_current 失败",
zap.Uint("device_id", deviceID),
zap.Int("current_slot_number", int(resp.CurrentSlotNo)),
zap.Error(err))
}
}