mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update 电单车
This commit is contained in:
@@ -2,6 +2,7 @@ package com.jsowell.api.uniapp.customer;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.jsowell.common.UserAgentUtils;
|
||||
import com.jsowell.common.YouDianUtils;
|
||||
import com.jsowell.common.annotation.Anonymous;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.core.domain.AjaxResult;
|
||||
@@ -100,6 +101,11 @@ public class JumpController extends BaseController {
|
||||
logger.error("修改第三方平台枪口状态 error", e);
|
||||
}
|
||||
|
||||
// 如果pileSN长度为8位需要解析一下
|
||||
if (pileSn.length() == 8) {
|
||||
pileSn = YouDianUtils.resolvePhysicalId(pileSn);
|
||||
}
|
||||
|
||||
try {
|
||||
// 进入充电桩详情做一下鉴权
|
||||
String memberId = getMemberIdByAuthorization(request);
|
||||
@@ -113,7 +119,7 @@ public class JumpController extends BaseController {
|
||||
logger.error("app-xcx-h5查询充电桩详情 error", e);
|
||||
response = new RestApiResponse<>(ReturnCodeEnum.CODE_GET_PILE_DETAIL_ERROR);
|
||||
}
|
||||
logger.info("app-xcx-h5查询充电桩详情 param:{}, result:{}", pileSn, JSON.toJSONString(response));
|
||||
logger.info("app-xcx-h5查询充电桩详情withConnectorCode param:{}, result:{}", pileSn, JSON.toJSONString(response));
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
@@ -232,10 +232,13 @@ public class PileService {
|
||||
|
||||
// 判断桩是否在线
|
||||
boolean onLineStatus = pileConnectorInfoService.checkPileOffLine(pileInfoVO.getPileSn());
|
||||
log.info("查询充电枪口详情-判断桩是否在线:{}, onLineStatus:{}", pileInfoVO.getPileSn(), onLineStatus);
|
||||
if (onLineStatus) {
|
||||
// true为离线
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_PILE_CONNECTOR_STATUS_OFF_LINE);
|
||||
String activeProfile = SpringUtils.getActiveProfile();
|
||||
log.info("查询充电枪口详情-判断桩是否在线:{}, onLineStatus:{}, activeProfile:{}", pileInfoVO.getPileSn(), onLineStatus, activeProfile);
|
||||
if ("prd".equals(activeProfile)) {
|
||||
if (onLineStatus) {
|
||||
// true为离线
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_PILE_CONNECTOR_STATUS_OFF_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
// 查询站点信息
|
||||
|
||||
Reference in New Issue
Block a user