update 电单车协议

This commit is contained in:
Guoqs
2024-09-03 09:36:27 +08:00
parent 3cfd0090d4
commit 4a35f0fffb
7 changed files with 91 additions and 29 deletions

View File

@@ -2993,7 +2993,8 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
}
} else {
// 说明pileSn 和 connectorCode前端传了那就校验一下长度
if (dto.getPileSn().length() != Constants.PILE_SN_LENGTH || dto.getConnectorCode().length() != Constants.CONNECTOR_CODE_LENGTH) {
if (dto.getPileSn().length() != Constants.PILE_SN_LENGTH_FOR_EV || dto.getConnectorCode().length() != Constants.CONNECTOR_CODE_LENGTH_FOR_EV
|| dto.getPileSn().length() != Constants.PILE_SN_LENGTH_FOR_EBIKE || dto.getConnectorCode().length() != Constants.CONNECTOR_CODE_LENGTH_FOR_EBIKE) {
throw new BusinessException(ReturnCodeEnum.CODE_DATA_LENGTH_ERROR);
}
}