Skip to content

Commit

Permalink
fix(sj_1.1.1): 兼容oracle批量更新不返回影响行数
Browse files Browse the repository at this point in the history
  • Loading branch information
open-snail2 committed Jul 18, 2024
1 parent ef7c655 commit 158f22f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,16 @@ protected void refreshExpireAt(List<ServerNode> serverNodes) {

try {
// 批量更新
if (CollUtil.isNotEmpty(updateDBs) && updateDBs.size() != serverNodeMapper.updateBatchExpireAt(updateDBs)) {
SnailJobLog.LOCAL.warn("续租失败 [{}]", JsonUtil.toJsonString(updateDBs));
if (CollUtil.isNotEmpty(updateDBs)) {
serverNodeMapper.updateBatchExpireAt(updateDBs);
}
} catch (Exception e) {
SnailJobLog.LOCAL.error("续租失败", e);
}

try {
if (CollUtil.isNotEmpty(insertDBs) && insertDBs.size() != serverNodeMapper.insertBatch(insertDBs)) {
SnailJobLog.LOCAL.warn("注册节点失败 [{}]", JsonUtil.toJsonString(insertDBs));
if (CollUtil.isNotEmpty(insertDBs)) {
serverNodeMapper.insertBatch(insertDBs);
}
} catch (DuplicateKeyException ignored) {
} catch (Exception e) {
Expand Down

0 comments on commit 158f22f

Please sign in to comment.