mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-17 05:39:50 +08:00
update 电单车协议
This commit is contained in:
@@ -18,7 +18,7 @@ import com.jsowell.pile.service.MemberGroupService;
|
|||||||
import com.jsowell.pile.service.PileBasicInfoService;
|
import com.jsowell.pile.service.PileBasicInfoService;
|
||||||
import com.jsowell.pile.vo.base.PileInfoVO;
|
import com.jsowell.pile.vo.base.PileInfoVO;
|
||||||
import com.jsowell.pile.vo.uniapp.customer.GroundLockInfoVO;
|
import com.jsowell.pile.vo.uniapp.customer.GroundLockInfoVO;
|
||||||
import com.jsowell.pile.vo.uniapp.customer.PileConnectorVO;
|
import com.jsowell.pile.vo.uniapp.customer.AppletPileDetailVO;
|
||||||
import com.jsowell.pile.vo.web.ThirdPartySnRelationVO;
|
import com.jsowell.pile.vo.web.ThirdPartySnRelationVO;
|
||||||
import com.jsowell.service.PileService;
|
import com.jsowell.service.PileService;
|
||||||
import com.jsowell.thirdparty.common.CommonService;
|
import com.jsowell.thirdparty.common.CommonService;
|
||||||
@@ -70,7 +70,7 @@ public class JumpController extends BaseController {
|
|||||||
try {
|
try {
|
||||||
// 进入充电桩详情做一下鉴权
|
// 进入充电桩详情做一下鉴权
|
||||||
String memberId = getMemberIdByAuthorization(request);
|
String memberId = getMemberIdByAuthorization(request);
|
||||||
PileConnectorVO vo = pileService.getPileDetailByPileSn(pileSn);
|
AppletPileDetailVO vo = pileService.getPileDetailByPileSn(pileSn);
|
||||||
addMember2MemberGroup(memberId, vo);
|
addMember2MemberGroup(memberId, vo);
|
||||||
response = new RestApiResponse<>(vo);
|
response = new RestApiResponse<>(vo);
|
||||||
} catch (BusinessException e) {
|
} catch (BusinessException e) {
|
||||||
@@ -85,7 +85,7 @@ public class JumpController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 针对汇鑫大厦的用户,自动加入集团中
|
// 针对汇鑫大厦的用户,自动加入集团中
|
||||||
private void addMember2MemberGroup(String memberId, PileConnectorVO vo) {
|
private void addMember2MemberGroup(String memberId, AppletPileDetailVO vo) {
|
||||||
if (vo == null || StringUtils.isBlank(memberId)) {
|
if (vo == null || StringUtils.isBlank(memberId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -131,7 +131,7 @@ public class JumpController extends BaseController {
|
|||||||
memberId = getMemberIdByAuthorization(request);
|
memberId = getMemberIdByAuthorization(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
PileConnectorVO vo = pileService.getConnectorDetail(pileConnectorCode);
|
AppletPileDetailVO vo = pileService.getConnectorDetail(pileConnectorCode);
|
||||||
if (StringUtils.isNotBlank(memberId)) {
|
if (StringUtils.isNotBlank(memberId)) {
|
||||||
addMember2MemberGroup(memberId, vo);
|
addMember2MemberGroup(memberId, vo);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import com.jsowell.common.util.file.AliyunOssUploadUtils;
|
|||||||
import com.jsowell.common.util.file.FileUtils;
|
import com.jsowell.common.util.file.FileUtils;
|
||||||
import com.jsowell.pile.service.PileBasicInfoService;
|
import com.jsowell.pile.service.PileBasicInfoService;
|
||||||
import com.jsowell.pile.vo.uniapp.customer.GroundLockInfoVO;
|
import com.jsowell.pile.vo.uniapp.customer.GroundLockInfoVO;
|
||||||
import com.jsowell.pile.vo.uniapp.customer.PileConnectorVO;
|
import com.jsowell.pile.vo.uniapp.customer.AppletPileDetailVO;
|
||||||
import com.jsowell.service.PileService;
|
import com.jsowell.service.PileService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -42,7 +42,7 @@ public class JumpXixiaoController extends BaseController {
|
|||||||
logger.info("User-Agent:{}", request.getHeader("user-agent"));
|
logger.info("User-Agent:{}", request.getHeader("user-agent"));
|
||||||
RestApiResponse<?> response = null;
|
RestApiResponse<?> response = null;
|
||||||
try {
|
try {
|
||||||
PileConnectorVO vo = pileService.getPileDetailByPileSn(pileSn);
|
AppletPileDetailVO vo = pileService.getPileDetailByPileSn(pileSn);
|
||||||
response = new RestApiResponse<>(vo);
|
response = new RestApiResponse<>(vo);
|
||||||
} catch (BusinessException e) {
|
} catch (BusinessException e) {
|
||||||
logger.warn("app-xcx-h5查询充电桩详情 warn", e);
|
logger.warn("app-xcx-h5查询充电桩详情 warn", e);
|
||||||
@@ -65,7 +65,7 @@ public class JumpXixiaoController extends BaseController {
|
|||||||
logger.info("User-Agent:{}", request.getHeader("user-agent"));
|
logger.info("User-Agent:{}", request.getHeader("user-agent"));
|
||||||
RestApiResponse<?> response = null;
|
RestApiResponse<?> response = null;
|
||||||
try {
|
try {
|
||||||
PileConnectorVO vo = pileService.getConnectorDetail(pileConnectorCode);
|
AppletPileDetailVO vo = pileService.getConnectorDetail(pileConnectorCode);
|
||||||
response = new RestApiResponse<>(vo);
|
response = new RestApiResponse<>(vo);
|
||||||
} catch (BusinessException e) {
|
} catch (BusinessException e) {
|
||||||
logger.warn("app-xcx-h5查询充电枪口详情 warn param:{}", pileConnectorCode, e);
|
logger.warn("app-xcx-h5查询充电枪口详情 warn param:{}", pileConnectorCode, e);
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import com.jsowell.pile.vo.uniapp.customer.BillingPriceVO;
|
|||||||
import com.jsowell.pile.vo.uniapp.customer.PersonPileConnectorSumInfoVO;
|
import com.jsowell.pile.vo.uniapp.customer.PersonPileConnectorSumInfoVO;
|
||||||
import com.jsowell.pile.vo.uniapp.customer.PersonPileRealTimeVO;
|
import com.jsowell.pile.vo.uniapp.customer.PersonPileRealTimeVO;
|
||||||
import com.jsowell.pile.vo.uniapp.customer.PileConnectorDetailVO;
|
import com.jsowell.pile.vo.uniapp.customer.PileConnectorDetailVO;
|
||||||
import com.jsowell.pile.vo.uniapp.customer.PileConnectorVO;
|
import com.jsowell.pile.vo.uniapp.customer.AppletPileDetailVO;
|
||||||
import com.jsowell.pile.vo.web.PileDetailVO;
|
import com.jsowell.pile.vo.web.PileDetailVO;
|
||||||
import com.jsowell.pile.vo.web.PileStationVO;
|
import com.jsowell.pile.vo.web.PileStationVO;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
@@ -159,7 +159,7 @@ public class PileService {
|
|||||||
/**
|
/**
|
||||||
* 前端扫码跳转接口
|
* 前端扫码跳转接口
|
||||||
*/
|
*/
|
||||||
public PileConnectorVO getPileDetailByPileSn(String param) throws ExecutionException, InterruptedException {
|
public AppletPileDetailVO getPileDetailByPileSn(String param) throws ExecutionException, InterruptedException {
|
||||||
if (StringUtils.isBlank(param)) {
|
if (StringUtils.isBlank(param)) {
|
||||||
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
|
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
|
||||||
}
|
}
|
||||||
@@ -207,7 +207,7 @@ public class PileService {
|
|||||||
MerchantInfoVO merchantInfoVO = merchantInfoVOFuture.get();
|
MerchantInfoVO merchantInfoVO = merchantInfoVOFuture.get();
|
||||||
List<BillingPriceVO> billingPriceVOS = billingPriceFuture.get();
|
List<BillingPriceVO> billingPriceVOS = billingPriceFuture.get();
|
||||||
|
|
||||||
PileConnectorVO vo = PileConnectorVO.builder()
|
AppletPileDetailVO vo = AppletPileDetailVO.builder()
|
||||||
.pileInfo(pileInfoVO)
|
.pileInfo(pileInfoVO)
|
||||||
.connectorInfoList(connectorInfoList)
|
.connectorInfoList(connectorInfoList)
|
||||||
.merchantInfo(merchantInfoVO)
|
.merchantInfo(merchantInfoVO)
|
||||||
@@ -225,7 +225,7 @@ public class PileService {
|
|||||||
* @throws ExecutionException
|
* @throws ExecutionException
|
||||||
* @throws InterruptedException
|
* @throws InterruptedException
|
||||||
*/
|
*/
|
||||||
public PileConnectorVO getConnectorDetail(String pileConnectorCode) throws ExecutionException, InterruptedException {
|
public AppletPileDetailVO getConnectorDetail(String pileConnectorCode) throws ExecutionException, InterruptedException {
|
||||||
PileConnectorDetailVO pileConnectorDetailVO = queryPileConnectorDetail(pileConnectorCode);
|
PileConnectorDetailVO pileConnectorDetailVO = queryPileConnectorDetail(pileConnectorCode);
|
||||||
if (pileConnectorDetailVO == null) {
|
if (pileConnectorDetailVO == null) {
|
||||||
return null;
|
return null;
|
||||||
@@ -235,7 +235,7 @@ public class PileService {
|
|||||||
throw new BusinessException(ReturnCodeEnum.CODE_PILE_CONNECTOR_STATUS_ERROR);
|
throw new BusinessException(ReturnCodeEnum.CODE_PILE_CONNECTOR_STATUS_ERROR);
|
||||||
}
|
}
|
||||||
String pileSn = pileConnectorDetailVO.getPileSn();
|
String pileSn = pileConnectorDetailVO.getPileSn();
|
||||||
PileConnectorVO resultVO = getPileDetailByPileSn(pileSn);
|
AppletPileDetailVO resultVO = getPileDetailByPileSn(pileSn);
|
||||||
List<ConnectorInfoVO> connectorInfoList = resultVO.getConnectorInfoList();
|
List<ConnectorInfoVO> connectorInfoList = resultVO.getConnectorInfoList();
|
||||||
if (connectorInfoList.size() > 1) {
|
if (connectorInfoList.size() > 1) {
|
||||||
List<ConnectorInfoVO> list = Lists.newArrayList();
|
List<ConnectorInfoVO> list = Lists.newArrayList();
|
||||||
|
|||||||
@@ -11,21 +11,25 @@ import lombok.NoArgsConstructor;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序充电桩详情页VO
|
||||||
|
* 小程序
|
||||||
|
*/
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Builder
|
@Builder
|
||||||
public class PileConnectorVO {
|
public class AppletPileDetailVO {
|
||||||
|
|
||||||
// 充电枪信息列表
|
// 充电桩信息
|
||||||
|
private PileInfoVO pileInfo;
|
||||||
|
|
||||||
|
// 充电枪口信息列表
|
||||||
private List<ConnectorInfoVO> connectorInfoList;
|
private List<ConnectorInfoVO> connectorInfoList;
|
||||||
|
|
||||||
// 计费模板信息
|
// 计费模板信息
|
||||||
// private BillingTemplateVO billingTemplate;
|
// private BillingTemplateVO billingTemplate;
|
||||||
|
|
||||||
// 充电桩信息
|
|
||||||
private PileInfoVO pileInfo;
|
|
||||||
|
|
||||||
// 运营商信息
|
// 运营商信息
|
||||||
private MerchantInfoVO merchantInfo;
|
private MerchantInfoVO merchantInfo;
|
||||||
|
|
||||||
Reference in New Issue
Block a user