diff --git a/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/PileStationInfoController.java b/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/PileStationInfoController.java index 8e46935dc..687f2a662 100644 --- a/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/PileStationInfoController.java +++ b/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/PileStationInfoController.java @@ -356,14 +356,14 @@ public class PileStationInfoController extends BaseController { * 更新站点与第三方平台关系 */ @PostMapping("/updateThirdPartyStationRelation") - public AjaxResult updateThirdPartyStationRelation(ThirdPartyStationRelationDTO dto) { + public AjaxResult updateThirdPartyStationRelation(@RequestBody ThirdPartyStationRelationDTO dto) { AjaxResult result; try { startPage(); thirdPartyStationRelationService.updateThirdPartyStationRelation(dto); result = AjaxResult.success(); } catch (Exception e) { - logger.error("获取停车平台列表 error,", e); + logger.error("更新站点与第三方平台关系error,", e); result = AjaxResult.error(e.getMessage()); } return result; diff --git a/jsowell-ui/src/api/pile/station.js b/jsowell-ui/src/api/pile/station.js index 800420f80..2a42943c5 100644 --- a/jsowell-ui/src/api/pile/station.js +++ b/jsowell-ui/src/api/pile/station.js @@ -164,3 +164,11 @@ export function getParkingInfoList() { }) } +// 更新站点与第三方平台关系 +export function updateThirdPartyStationRelation(data) { + return request({ + url: '/pile/station/updateThirdPartyStationRelation', + method: 'post', + data: data, + }) +} diff --git a/jsowell-ui/src/views/pile/station/detail.vue b/jsowell-ui/src/views/pile/station/detail.vue index d4a1dbd1a..8a634a0fd 100644 --- a/jsowell-ui/src/views/pile/station/detail.vue +++ b/jsowell-ui/src/views/pile/station/detail.vue @@ -48,7 +48,7 @@ - +

互联互通配置

@@ -66,11 +66,11 @@ - - 推送站点信息 - - - 推送站点信息 + + + + + 保存对接平台关系 @@ -78,7 +78,7 @@
- +

绑定停车平台(配置完成后,订单完成将自动下发优惠券)

编辑参数 @@ -177,14 +177,14 @@ import MapContainer from "../../../components/MapContainer/MapContainer.vue"; import stationOrderList from "@/views/pile/station/stationOrderList"; import stationWhiteList from "@/views/pile/station/stationWhiteList"; import { - getStationInfo, - updateStationQRCodePrefix, - getSettingByStationId, - updateSettingByStationId, - pushStationInfo, - getSettingInfo, - getParkingInfoList, - bindParkingPlatform, getRelationByStationId, + getStationInfo, + updateStationQRCodePrefix, + getSettingByStationId, + updateSettingByStationId, + pushStationInfo, + getSettingInfo, + getParkingInfoList, + bindParkingPlatform, getRelationByStationId, updateThirdPartyStationRelation, } from "@/api/pile/station"; import Whitelist from "@/views/pile/station/stationWhiteList"; import OrderReport from "./orderReport.vue"; @@ -390,7 +390,14 @@ export default { // 保存站点与第三方平台关系 saveStationThirdParty() { - + const param = { + stationId: this.stationId, + thirdPartyTypes: this.exchange, + }; + console.log('param', param); + updateThirdPartyStationRelation(param).then((response) => { + this.$message.success(response.msg); + }); }, // 绑定站点与停车平台配置