mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-22 12:05:05 +08:00
update 电单车协议
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
package com.jsowell.pile.util;
|
||||
package com.jsowell.pile.service;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.jsowell.common.constant.CacheConstants;
|
||||
import com.jsowell.common.core.redis.RedisCache;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.PileBasicInfo;
|
||||
import com.jsowell.pile.service.PileBasicInfoService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -18,9 +17,9 @@ import java.util.List;
|
||||
* 生成sn号Util
|
||||
*/
|
||||
@Component
|
||||
public class SnUtils {
|
||||
public class PileSnGenerateService {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(SnUtils.class);
|
||||
private static Logger logger = LoggerFactory.getLogger(PileSnGenerateService.class);
|
||||
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
@@ -65,16 +64,6 @@ public class SnUtils {
|
||||
return increResult;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
// String pileSn = "88230000002060";
|
||||
// String substring = StringUtils.substring(pileSn, 4, pileSn.length());
|
||||
// long l = Long.parseLong(substring);
|
||||
// System.out.println(substring);
|
||||
// System.out.println(l);
|
||||
|
||||
Long a = 3147483647L;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成sn号
|
||||
*
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user