mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-22 20:15:06 +08:00
update 校验channel
This commit is contained in:
@@ -5,6 +5,7 @@ import com.jsowell.common.constant.CacheConstants;
|
||||
import com.jsowell.common.core.domain.ykc.YKCDataProtocol;
|
||||
import com.jsowell.common.core.domain.ykc.YKCFrameTypeCode;
|
||||
import com.jsowell.common.core.redis.RedisCache;
|
||||
import com.jsowell.common.enums.ykc.PileChannelEntity;
|
||||
import com.jsowell.common.util.BytesUtil;
|
||||
import com.jsowell.common.util.CRC16Util;
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
@@ -65,9 +66,12 @@ public abstract class AbstractHandler implements InitializingBean {
|
||||
* 保存桩最后链接到平台的时间
|
||||
* @param pileSn 桩编号
|
||||
*/
|
||||
protected void saveLastTime(String pileSn) {
|
||||
protected void saveLastTime(String pileSn, Channel channel) {
|
||||
String redisKey = CacheConstants.PILE_LAST_CONNECTION + pileSn;
|
||||
redisCache.setCacheObject(redisKey, DateUtils.getDateTime(), CacheConstants.cache_expire_time_1d);
|
||||
|
||||
// 保存桩号和channel的关系
|
||||
PileChannelEntity.checkChannel(pileSn, channel);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user