小程序扫二维码时判断桩、枪口状态并返回对应的信息

This commit is contained in:
Lemon
2023-09-13 14:15:19 +08:00
parent abfa21ac83
commit 53686f2b93
3 changed files with 10 additions and 1 deletions

View File

@@ -131,4 +131,6 @@ public interface IPileConnectorInfoService {
* @param pileConnectorInfo
*/
int updateConnectorParkNo(UpdateConnectorParkNoDTO dto);
boolean checkPileOffLine(String pileSn);
}

View File

@@ -663,7 +663,7 @@ public class PileConnectorInfoServiceImpl implements IPileConnectorInfoService {
* @param pileSn 桩编号
* @return true离线
*/
private boolean checkPileOffLine(String pileSn) {
public boolean checkPileOffLine(String pileSn) {
// 获取桩最后连接时间最后连接到平台的时间在1分钟之前判定为离线
String lastConnectionTime = redisCache.getCacheObject(CacheConstants.PILE_LAST_CONNECTION + pileSn);
if (StringUtils.isBlank(lastConnectionTime)) {