2021与蓝度共同重构项目,服务端
fix
zhanzhiqin
2022-03-17 67485b16168ee64a57296eefd8f74e7a07374e06
ximon-admin/src/main/java/com/sandu/ximon/admin/controller/C3ChargingController.java
@@ -31,9 +31,13 @@
     */
    @PostMapping("/startCharging")
    public ResponseVO<Object> startCharging(@RequestBody C3ChargingParam c3ChargingParam) {
        c3ChargingService.startCharging(c3ChargingParam.getC3Mac(), c3ChargingParam.getChargingCapacity(), c3ChargingParam.getChargeAmount());
        String result = c3ChargingService.startCharging(c3ChargingParam.getC3Mac(), c3ChargingParam.getChargingCapacity(), c3ChargingParam.getChargeAmount());
        if ("操作成功".equals(result)) {
            return ResponseUtil.success(result);
        } else {
            return ResponseUtil.fail(result);
        }
        return ResponseUtil.success(null);
    }
    /**
@@ -41,9 +45,13 @@
     */
    @PostMapping("/finishCharging")
    public ResponseVO<Object> finishCharging(@RequestBody C3ChargingParam c3ChargingParam) {
        c3ChargingService.finishCharging(c3ChargingParam.getC3Mac());
        String result = c3ChargingService.finishCharging(c3ChargingParam.getC3Mac());
        return ResponseUtil.success(null);
        if ("操作成功".equals(result)) {
            return ResponseUtil.success(result);
        } else {
            return ResponseUtil.fail(result);
        }
    }
@@ -52,8 +60,12 @@
     */
    @PostMapping("/restartCharging")
    public ResponseVO<Object> restartCharging(@RequestBody C3ChargingParam c3ChargingParam) {
        c3ChargingService.restartCharging(c3ChargingParam.getC3Mac());
        String result = c3ChargingService.restartCharging(c3ChargingParam.getC3Mac());
        return ResponseUtil.success(null);
        if ("操作成功".equals(result)) {
            return ResponseUtil.success(result);
        } else {
            return ResponseUtil.fail(result);
        }
    }
}