|
|
@@ -211,7 +211,11 @@ public class LedgerSyncServiceImpl implements ILedgerSyncService {
|
|
211
|
211
|
scoreEventMapper.insert(e);
|
|
212
|
212
|
ins++;
|
|
213
|
213
|
}
|
|
214
|
|
- supervisionMapper.updateSyncFlag();
|
|
|
214
|
+ // 分批更新 sync_flag,避免锁等待超时
|
|
|
215
|
+ int updatedRows;
|
|
|
216
|
+ do {
|
|
|
217
|
+ updatedRows = supervisionMapper.updateSyncFlag();
|
|
|
218
|
+ } while (updatedRows > 0);
|
|
215
|
219
|
return new SyncResult(ins, skip, "");
|
|
216
|
220
|
}
|
|
217
|
221
|
|
|
|
@@ -249,7 +253,11 @@ public class LedgerSyncServiceImpl implements ILedgerSyncService {
|
|
249
|
253
|
scoreEventMapper.insert(e);
|
|
250
|
254
|
ins++;
|
|
251
|
255
|
}
|
|
252
|
|
- interceptionMapper.updateSyncFlag();
|
|
|
256
|
+ // 分批更新 sync_flag,避免锁等待超时
|
|
|
257
|
+ int updatedRows;
|
|
|
258
|
+ do {
|
|
|
259
|
+ updatedRows = interceptionMapper.updateSyncFlag();
|
|
|
260
|
+ } while (updatedRows > 0);
|
|
253
|
261
|
return new SyncResult(ins, skip, "");
|
|
254
|
262
|
}
|
|
255
|
263
|
|
|
|
@@ -281,7 +289,11 @@ public class LedgerSyncServiceImpl implements ILedgerSyncService {
|
|
281
|
289
|
scoreEventMapper.insert(e);
|
|
282
|
290
|
ins++;
|
|
283
|
291
|
}
|
|
284
|
|
- securityTestMapper.updateSyncFlag();
|
|
|
292
|
+ // 分批更新 sync_flag,避免锁等待超时
|
|
|
293
|
+ int updatedRows;
|
|
|
294
|
+ do {
|
|
|
295
|
+ updatedRows = securityTestMapper.updateSyncFlag();
|
|
|
296
|
+ } while (updatedRows > 0);
|
|
285
|
297
|
return new SyncResult(ins, skip, "");
|
|
286
|
298
|
}
|
|
287
|
299
|
|
|
|
@@ -313,7 +325,11 @@ public class LedgerSyncServiceImpl implements ILedgerSyncService {
|
|
313
|
325
|
scoreEventMapper.insert(e);
|
|
314
|
326
|
ins++;
|
|
315
|
327
|
}
|
|
316
|
|
- unsafeEventMapper.updateSyncFlag();
|
|
|
328
|
+ // 分批更新 sync_flag,避免锁等待超时
|
|
|
329
|
+ int updatedRows;
|
|
|
330
|
+ do {
|
|
|
331
|
+ updatedRows = unsafeEventMapper.updateSyncFlag();
|
|
|
332
|
+ } while (updatedRows > 0);
|
|
317
|
333
|
return new SyncResult(ins, skip, "");
|
|
318
|
334
|
}
|
|
319
|
335
|
|
|
|
@@ -342,7 +358,11 @@ public class LedgerSyncServiceImpl implements ILedgerSyncService {
|
|
342
|
358
|
scoreEventMapper.insert(e);
|
|
343
|
359
|
ins++;
|
|
344
|
360
|
}
|
|
345
|
|
- seizureMapper.updateSyncFlag();
|
|
|
361
|
+ // 分批更新 sync_flag,避免锁等待超时
|
|
|
362
|
+ int updatedRows;
|
|
|
363
|
+ do {
|
|
|
364
|
+ updatedRows = seizureMapper.updateSyncFlag();
|
|
|
365
|
+ } while (updatedRows > 0);
|
|
346
|
366
|
return new SyncResult(ins, skip, "");
|
|
347
|
367
|
}
|
|
348
|
368
|
|
|
|
@@ -375,7 +395,11 @@ public class LedgerSyncServiceImpl implements ILedgerSyncService {
|
|
375
|
395
|
scoreEventMapper.insert(e);
|
|
376
|
396
|
ins++;
|
|
377
|
397
|
}
|
|
378
|
|
- rewardApprovalMapper.updateSyncFlag();
|
|
|
398
|
+ // 分批更新 sync_flag,避免锁等待超时
|
|
|
399
|
+ int updatedRows;
|
|
|
400
|
+ do {
|
|
|
401
|
+ updatedRows = rewardApprovalMapper.updateSyncFlag();
|
|
|
402
|
+ } while (updatedRows > 0);
|
|
379
|
403
|
return new SyncResult(ins, skip, "");
|
|
380
|
404
|
}
|
|
381
|
405
|
|
|
|
@@ -406,7 +430,11 @@ public class LedgerSyncServiceImpl implements ILedgerSyncService {
|
|
406
|
430
|
scoreEventMapper.insert(e);
|
|
407
|
431
|
ins++;
|
|
408
|
432
|
}
|
|
409
|
|
- servicePatrolMapper.updateSyncFlag();
|
|
|
433
|
+ // 分批更新 sync_flag,避免锁等待超时
|
|
|
434
|
+ int updatedRows;
|
|
|
435
|
+ do {
|
|
|
436
|
+ updatedRows = servicePatrolMapper.updateSyncFlag();
|
|
|
437
|
+ } while (updatedRows > 0);
|
|
410
|
438
|
return new SyncResult(ins, skip, "");
|
|
411
|
439
|
}
|
|
412
|
440
|
|
|
|
@@ -430,7 +458,11 @@ public class LedgerSyncServiceImpl implements ILedgerSyncService {
|
|
430
|
458
|
scoreEventMapper.insert(e);
|
|
431
|
459
|
ins++;
|
|
432
|
460
|
}
|
|
433
|
|
- complaintMapper.updateSyncFlag();
|
|
|
461
|
+ // 分批更新 sync_flag,避免锁等待超时
|
|
|
462
|
+ int updatedRows;
|
|
|
463
|
+ do {
|
|
|
464
|
+ updatedRows = complaintMapper.updateSyncFlag();
|
|
|
465
|
+ } while (updatedRows > 0);
|
|
434
|
466
|
return new SyncResult(ins, skip, "");
|
|
435
|
467
|
}
|
|
436
|
468
|
|
|
|
@@ -455,7 +487,11 @@ public class LedgerSyncServiceImpl implements ILedgerSyncService {
|
|
455
|
487
|
scoreEventMapper.insert(e);
|
|
456
|
488
|
ins++;
|
|
457
|
489
|
}
|
|
458
|
|
- terminalBonusMapper.updateSyncFlag();
|
|
|
490
|
+ // 分批更新 sync_flag,避免锁等待超时
|
|
|
491
|
+ int updatedRows;
|
|
|
492
|
+ do {
|
|
|
493
|
+ updatedRows = terminalBonusMapper.updateSyncFlag();
|
|
|
494
|
+ } while (updatedRows > 0);
|
|
459
|
495
|
return new SyncResult(ins, skip, "");
|
|
460
|
496
|
}
|
|
461
|
497
|
|
|
|
@@ -487,7 +523,11 @@ public class LedgerSyncServiceImpl implements ILedgerSyncService {
|
|
487
|
523
|
scoreEventMapper.insert(e);
|
|
488
|
524
|
ins++;
|
|
489
|
525
|
}
|
|
490
|
|
- examScoreMapper.updateSyncFlag();
|
|
|
526
|
+ // 分批更新 sync_flag,避免锁等待超时
|
|
|
527
|
+ int updatedRows;
|
|
|
528
|
+ do {
|
|
|
529
|
+ updatedRows = examScoreMapper.updateSyncFlag();
|
|
|
530
|
+ } while (updatedRows > 0);
|
|
491
|
531
|
return new SyncResult(ins, skip, "");
|
|
492
|
532
|
}
|
|
493
|
533
|
|