mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update 电单车协议
This commit is contained in:
@@ -3,6 +3,7 @@ package com.jsowell.netty.handler.electricbicycles;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.jsowell.common.core.domain.ebike.EBikeDataProtocol;
|
||||
import com.jsowell.common.util.BytesUtil;
|
||||
import com.jsowell.common.util.YKCUtils;
|
||||
import com.jsowell.netty.factory.EBikeOperateFactory;
|
||||
import com.jsowell.pile.domain.ebike.AbsEBikeMessage;
|
||||
import com.jsowell.pile.domain.ebike.EBikeCommandEnum;
|
||||
@@ -17,7 +18,8 @@ import org.springframework.stereotype.Component;
|
||||
@Slf4j
|
||||
@Component
|
||||
public class DeviceGetServerTimeHandler extends AbstractEBikeHandler {
|
||||
private final String type = EBikeCommandEnum.DEVICE_GET_SERVER_TIME.getCode();
|
||||
// private final String type = EBikeCommandEnum.DEVICE_GET_SERVER_TIME.getCode();
|
||||
private final String type = YKCUtils.frameType2Str(EBikeCommandEnum.DEVICE_GET_SERVER_TIME.getBytes());
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.core.domain.ebike.EBikeDataProtocol;
|
||||
import com.jsowell.common.enums.ebike.PortStatusEnum;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.common.util.YKCUtils;
|
||||
import com.jsowell.netty.factory.EBikeOperateFactory;
|
||||
import com.jsowell.pile.domain.ebike.AbsEBikeMessage;
|
||||
import com.jsowell.pile.domain.ebike.EBikeCommandEnum;
|
||||
@@ -24,7 +25,7 @@ import java.util.List;
|
||||
@Slf4j
|
||||
@Component
|
||||
public class HeartbeatHandler extends AbstractEBikeHandler {
|
||||
private final String type = EBikeCommandEnum.HEARTBEAT_2.getCode();
|
||||
private final String type = YKCUtils.frameType2Str(EBikeCommandEnum.HEARTBEAT_2.getBytes());
|
||||
|
||||
@Autowired
|
||||
private PileBasicInfoService pileBasicInfoService;
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.jsowell.netty.handler.electricbicycles;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.jsowell.common.core.domain.ebike.EBikeDataProtocol;
|
||||
import com.jsowell.common.util.BytesUtil;
|
||||
import com.jsowell.common.util.YKCUtils;
|
||||
import com.jsowell.netty.factory.EBikeOperateFactory;
|
||||
import com.jsowell.pile.domain.ebike.AbsEBikeMessage;
|
||||
import com.jsowell.pile.domain.ebike.EBikeCommandEnum;
|
||||
@@ -17,7 +18,8 @@ import org.springframework.stereotype.Component;
|
||||
@Slf4j
|
||||
@Component
|
||||
public class HostGetServerTimeHandler extends AbstractEBikeHandler {
|
||||
private final String type = EBikeCommandEnum.HOST_GET_SERVER_TIME.getCode();
|
||||
// private final String type = EBikeCommandEnum.HOST_GET_SERVER_TIME.getCode();
|
||||
private final String type = YKCUtils.frameType2Str(EBikeCommandEnum.HOST_GET_SERVER_TIME.getBytes());
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.jsowell.netty.handler.electricbicycles;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.core.domain.ebike.EBikeDataProtocol;
|
||||
import com.jsowell.common.util.YKCUtils;
|
||||
import com.jsowell.netty.factory.EBikeOperateFactory;
|
||||
import com.jsowell.pile.domain.ebike.AbsEBikeMessage;
|
||||
import com.jsowell.pile.domain.ebike.EBikeCommandEnum;
|
||||
@@ -19,7 +20,8 @@ import org.springframework.stereotype.Component;
|
||||
@Slf4j
|
||||
@Component
|
||||
public class RegistrationHandler extends AbstractEBikeHandler {
|
||||
private final String type = EBikeCommandEnum.REGISTRATION.getCode();
|
||||
// private final String type = EBikeCommandEnum.REGISTRATION.getCode();
|
||||
private final String type = YKCUtils.frameType2Str(EBikeCommandEnum.REGISTRATION.getBytes());
|
||||
|
||||
@Autowired
|
||||
private PileBasicInfoService pileBasicInfoService;
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.jsowell.netty.handler.electricbicycles;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.jsowell.common.core.domain.ebike.EBikeDataProtocol;
|
||||
import com.jsowell.common.util.YKCUtils;
|
||||
import com.jsowell.netty.factory.EBikeOperateFactory;
|
||||
import com.jsowell.pile.domain.ebike.AbsEBikeMessage;
|
||||
import com.jsowell.pile.domain.ebike.EBikeCommandEnum;
|
||||
@@ -16,7 +17,8 @@ import org.springframework.stereotype.Component;
|
||||
@Slf4j
|
||||
@Component
|
||||
public class SettlementUploadHandler extends AbstractEBikeHandler {
|
||||
private final String type = EBikeCommandEnum.SETTLEMENT_UPLOAD.getCode();
|
||||
// private final String type = EBikeCommandEnum.SETTLEMENT_UPLOAD.getCode();
|
||||
private final String type = YKCUtils.frameType2Str(EBikeCommandEnum.SETTLEMENT_UPLOAD.getBytes());
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user