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:
@@ -0,0 +1,98 @@
|
||||
package com.jsowell.web.controller.thirdparty;
|
||||
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.thirdparty.common.NotificationDTO;
|
||||
import com.jsowell.thirdparty.common.NotificationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/thirdparty/notification")
|
||||
public class ThirdPartyNotificationController extends BaseController {
|
||||
@Autowired
|
||||
private NotificationService notificationService;
|
||||
|
||||
/**
|
||||
* 充电站信息变化推送
|
||||
*/
|
||||
@PostMapping("/notificationStationInfo")
|
||||
public AjaxResult notificationStationInfo(@RequestBody NotificationDTO dto) {
|
||||
AjaxResult result;
|
||||
try {
|
||||
notificationService.notificationStationInfo(dto);
|
||||
result = AjaxResult.success();
|
||||
} catch (Exception e) {
|
||||
logger.error("充电站信息变化推送失败", e);
|
||||
result = AjaxResult.error();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设备状态变化推送
|
||||
*/
|
||||
@PostMapping("/notificationStationStatus")
|
||||
public AjaxResult notificationStationStatus(@RequestBody NotificationDTO dto) {
|
||||
AjaxResult result;
|
||||
try {
|
||||
notificationService.notificationStationStatus(dto);
|
||||
result = AjaxResult.success();
|
||||
} catch (Exception e) {
|
||||
logger.error("设备状态变化推送失败", e);
|
||||
result = AjaxResult.error();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设备充电中状态变化推送
|
||||
*/
|
||||
@PostMapping("/notificationConnectorChargeStatus")
|
||||
public AjaxResult notificationConnectorChargeStatus(@RequestBody NotificationDTO dto) {
|
||||
AjaxResult result;
|
||||
try {
|
||||
notificationService.notificationConnectorChargeStatus(dto);
|
||||
result = AjaxResult.success();
|
||||
} catch (Exception e) {
|
||||
logger.error("设备充电中状态变化推送失败", e);
|
||||
result = AjaxResult.error();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 充电订单信息推送
|
||||
*/
|
||||
@PostMapping("/notificationChargeOrderInfo")
|
||||
public AjaxResult notificationChargeOrderInfo(@RequestBody NotificationDTO dto) {
|
||||
AjaxResult result;
|
||||
try {
|
||||
notificationService.notificationChargeOrderInfo(dto);
|
||||
result = AjaxResult.success();
|
||||
} catch (Exception e) {
|
||||
logger.error("充电订单信息推送失败", e);
|
||||
result = AjaxResult.error();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 站点费率变化推送
|
||||
*/
|
||||
@PostMapping("/notificationStationFee")
|
||||
public AjaxResult notificationStationFee(@RequestBody NotificationDTO dto) {
|
||||
AjaxResult result;
|
||||
try {
|
||||
notificationService.notificationStationFee(dto);
|
||||
result = AjaxResult.success();
|
||||
} catch (Exception e) {
|
||||
logger.error("站点费率变化推送失败", e);
|
||||
result = AjaxResult.error();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -88,4 +88,13 @@ public class ThirdpartySecretInfoController extends BaseController {
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(thirdpartySecretInfoService.deleteThirdpartySecretInfoByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据第三方平台类型查询对接第三方平台的站点列表
|
||||
*/
|
||||
@PostMapping("/selectStationList")
|
||||
public AjaxResult selectStationList(@RequestBody ThirdpartySecretInfo thirdpartySecretInfo) {
|
||||
return AjaxResult.success(thirdpartySecretInfoService.selectStationList(thirdpartySecretInfo.getPlatformType()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user