mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-27 22:45:05 +08:00
系统过滤重复的请求
This commit is contained in:
@@ -74,4 +74,19 @@ public abstract class AbstractHandler implements InitializingBean {
|
||||
PileChannelEntity.checkChannel(pileSn, channel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 阻止重复帧
|
||||
*/
|
||||
protected boolean verifyTheDuplicateRequest(YKCDataProtocol ykcDataProtocol, Channel channel) {
|
||||
// 获取序列号域
|
||||
int serialNumber = BytesUtil.bytesToIntLittle(ykcDataProtocol.getSerialNumber());
|
||||
// 获取channelId
|
||||
String channelId = channel.id().asShortText();
|
||||
|
||||
String redisKey = "Request_" + channelId + "_" + serialNumber;
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user