From a75d9020e09b7000d0e66387cc43211da04d2292 Mon Sep 17 00:00:00 2001
From: zuoxiao <lf_zuo@163.com>
Date: 星期三, 25 六月 2025 19:51:39 +0800
Subject: [PATCH] feat(card): 为 DtoRecharge 类的 paymentId 字段添加 NotNull 注解
---
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1/CommonV1.java | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1/CommonV1.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1/CommonV1.java
index d77f480..e4619c3 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1/CommonV1.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1/CommonV1.java
@@ -1,16 +1,20 @@
package com.dy.common.mw.protocol.p206V1;
+import com.dy.common.mw.channel.tcp.TcpIoSessionAttrIdIsRtuAddr;
import com.dy.common.util.ByteUtil;
import com.dy.common.util.ByteUtilUnsigned;
import com.dy.common.util.CRC16;
import com.dy.common.util.CRC8_for_2_0;
+import org.apache.mina.core.session.IoSession;
public class CommonV1 {
+
+
/**
* 妫�鏌ュご
* @param bs 涓婅瀛楄妭鏁扮粍
- * @return [rt1->true:鏄湰鍗忚P206锛宖alse:涓嶆槸鏈崗璁�; rt2->true:鏄按璧勬簮鍗忚锛宖alse:鏄崌绾у崗璁甝
+ * @return [銆�0銆�->true:鏄湰鍗忚P206锛宖alse:涓嶆槸鏈崗璁�; 銆�1銆�->true:鏄按璧勬簮鍗忚锛宖alse:鏄崌绾у崗璁甝
* @throws Exception 寮傚父
*/
public Boolean[] isThisProtocolHead(byte[] bs) throws Exception{
@@ -176,8 +180,9 @@
return "璁$畻CRC鏄�:" + crcCompute + "锛屼笂浼燙RC鏄�" + crcInBs ;
}
}else{
- int crcCompute = (byte)new CRC16().CRC(bs, ProtocolConstantV206V1.ctrlIndex, bs.length - 3) ;
- int crcInBs = ByteUtilUnsigned.bytes2Short_BE(bs, bs.length - 3) ;
+ short crcCompute = new CRC16().CRC(bs, 0, bs.length - 4) ;
+ short crcInBs = ByteUtil.bytes2Short_BE(bs,bs.length - 3) ;
+ //int crcInBs = ByteUtilUnsigned.bytes2Short_BE(bs, bs.length - 3) ;
if(crcCompute == crcInBs){
return null ;
}else{
--
Gitblit v1.8.0