mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-27 10:37:58 +08:00
update 新电途推送站点信息接口
This commit is contained in:
@@ -25,10 +25,9 @@
|
|||||||
|
|
||||||
<select id="selectThirdPartyStationRelationList" parameterType="com.jsowell.pile.domain.ThirdPartyStationRelation" resultMap="ThirdPartyStationRelationResult">
|
<select id="selectThirdPartyStationRelationList" parameterType="com.jsowell.pile.domain.ThirdPartyStationRelation" resultMap="ThirdPartyStationRelationResult">
|
||||||
<include refid="selectThirdPartyStationRelationVo"/>
|
<include refid="selectThirdPartyStationRelationVo"/>
|
||||||
<where>
|
where del_flag = '0'
|
||||||
<if test="stationId != null "> and station_id = #{stationId}</if>
|
<if test="stationId != null "> and station_id = #{stationId}</if>
|
||||||
<if test="thirdPartyType != null and thirdPartyType != ''"> and third_party_type = #{thirdPartyType}</if>
|
<if test="thirdPartyType != null and thirdPartyType != ''"> and third_party_type = #{thirdPartyType}</if>
|
||||||
</where>
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectThirdPartyStationRelationById" parameterType="Long" resultMap="ThirdPartyStationRelationResult">
|
<select id="selectThirdPartyStationRelationById" parameterType="Long" resultMap="ThirdPartyStationRelationResult">
|
||||||
|
|||||||
@@ -3,9 +3,12 @@ package com.jsowell.thirdparty.xindiantu.service.impl;
|
|||||||
import com.jsowell.common.enums.thirdparty.ThirdPartyOperatorIdEnum;
|
import com.jsowell.common.enums.thirdparty.ThirdPartyOperatorIdEnum;
|
||||||
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
|
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
|
||||||
import com.jsowell.common.util.StringUtils;
|
import com.jsowell.common.util.StringUtils;
|
||||||
|
import com.jsowell.pile.domain.PileStationInfo;
|
||||||
import com.jsowell.pile.domain.ThirdPartyStationRelation;
|
import com.jsowell.pile.domain.ThirdPartyStationRelation;
|
||||||
import com.jsowell.pile.dto.*;
|
import com.jsowell.pile.dto.*;
|
||||||
|
import com.jsowell.pile.service.PileStationInfoService;
|
||||||
import com.jsowell.pile.service.ThirdPartyStationRelationService;
|
import com.jsowell.pile.service.ThirdPartyStationRelationService;
|
||||||
|
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
|
||||||
import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO;
|
import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO;
|
||||||
import com.jsowell.thirdparty.xindiantu.service.XDTService;
|
import com.jsowell.thirdparty.xindiantu.service.XDTService;
|
||||||
import com.jsowell.thirdparty.zhongdianlian.dto.ZDLGetTokenDTO;
|
import com.jsowell.thirdparty.zhongdianlian.dto.ZDLGetTokenDTO;
|
||||||
@@ -33,6 +36,12 @@ public class XDTServiceImpl implements XDTService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ThirdPartyStationRelationService relationService;
|
private ThirdPartyStationRelationService relationService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PileStationInfoService pileStationInfoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ThirdPartyStationRelationService thirdPartyStationRelationService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取令牌
|
* 获取令牌
|
||||||
* @param dto
|
* @param dto
|
||||||
@@ -191,6 +200,17 @@ public class XDTServiceImpl implements XDTService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String pushStationInfo(PushStationInfoDTO dto) {
|
public String pushStationInfo(PushStationInfoDTO dto) {
|
||||||
return zdlService.pushStationInfo(dto);
|
// 通过站点id查询相关配置信息
|
||||||
|
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||||
|
relation.setStationId(dto.getStationId());
|
||||||
|
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||||
|
if (relationInfo == null) {
|
||||||
|
// 新增
|
||||||
|
relation.setThirdPartyType(dto.getThirdPartyType());
|
||||||
|
thirdPartyStationRelationService.insertThirdPartyStationRelation(relation);
|
||||||
|
|
||||||
|
return "OK";
|
||||||
|
}
|
||||||
|
return "Error";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user