更新 HeartBeatService.java
This commit is contained in:
@@ -52,7 +52,7 @@ public class HeartBeatService {
|
||||
|
||||
UpdateWrapper<DeviceInfoDAO> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq("sn", deviceInfo.getSN());
|
||||
updateWrapper.set("last_online_time", currentTimeMillis); // 设置新的 accessToken
|
||||
updateWrapper.set("last_online_time", currentTimeMillis);
|
||||
|
||||
int result = deviceInfoDAOMapper.update(null, updateWrapper);
|
||||
if (result > 0) {
|
||||
@@ -86,11 +86,11 @@ public class HeartBeatService {
|
||||
try {
|
||||
DeviceInfoDAO deviceInfoDAO = deviceInfoDAOMapper.selectOne(queryWrapper);
|
||||
if (deviceInfoDAO != null) {
|
||||
logger.info("Data is queried in the database based on the device id");
|
||||
logger.info("Data is queried in the database based on the SN");
|
||||
return deviceInfoDAO;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("Error querying device info by android ID", e);
|
||||
logger.error("Error querying device info by SN", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user