SEBSERV-474 fix
This commit is contained in:
parent
48c621490d
commit
775f98d968
1 changed files with 11 additions and 2 deletions
|
@ -436,9 +436,14 @@ public class ClientConnectionDAOImpl implements ClientConnectionDAO {
|
||||||
@Transactional
|
@Transactional
|
||||||
public Result<Boolean> saveSecurityCheckStatus(final Long connectionId, final Boolean checkStatus) {
|
public Result<Boolean> saveSecurityCheckStatus(final Long connectionId, final Boolean checkStatus) {
|
||||||
return Result.tryCatch(() -> {
|
return Result.tryCatch(() -> {
|
||||||
|
|
||||||
|
// NOTE: we use nanoseconds here to get a better precision to better avoid
|
||||||
|
// same value of real concurrent calls on distributed systems
|
||||||
|
final long nanosecondsNow = System.nanoTime();
|
||||||
this.clientConnectionRecordMapper.updateByPrimaryKeySelective(new ClientConnectionRecord(
|
this.clientConnectionRecordMapper.updateByPrimaryKeySelective(new ClientConnectionRecord(
|
||||||
connectionId,
|
connectionId,
|
||||||
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
|
null, null, null, null, null, null, null, null, null, null, nanosecondsNow, null, null, null, null,
|
||||||
|
null,
|
||||||
Utils.toByte(checkStatus),
|
Utils.toByte(checkStatus),
|
||||||
null, null));
|
null, null));
|
||||||
return checkStatus;
|
return checkStatus;
|
||||||
|
@ -450,9 +455,13 @@ public class ClientConnectionDAOImpl implements ClientConnectionDAO {
|
||||||
@Transactional
|
@Transactional
|
||||||
public Result<Boolean> saveSEBClientVersionCheckStatus(final Long connectionId, final Boolean checkStatus) {
|
public Result<Boolean> saveSEBClientVersionCheckStatus(final Long connectionId, final Boolean checkStatus) {
|
||||||
return Result.tryCatch(() -> {
|
return Result.tryCatch(() -> {
|
||||||
|
// NOTE: we use nanoseconds here to get a better precision to better avoid
|
||||||
|
// same value of real concurrent calls on distributed systems
|
||||||
|
final long nanosecondsNow = System.nanoTime();
|
||||||
this.clientConnectionRecordMapper.updateByPrimaryKeySelective(new ClientConnectionRecord(
|
this.clientConnectionRecordMapper.updateByPrimaryKeySelective(new ClientConnectionRecord(
|
||||||
connectionId,
|
connectionId,
|
||||||
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
|
null, null, null, null, null, null, null, null, null, null, nanosecondsNow, null, null, null, null,
|
||||||
|
null,
|
||||||
null, null, Utils.toByte(checkStatus)));
|
null, null, Utils.toByte(checkStatus)));
|
||||||
return checkStatus;
|
return checkStatus;
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue