| | |
| | | package com.sandu.ximon.admin.controller; |
| | | |
| | | import com.sandu.common.domain.ResponseVO; |
| | | import com.sandu.common.execption.BusinessException; |
| | | import com.sandu.common.object.BaseConditionVO; |
| | | import com.sandu.common.security.annotation.AnonymousAccess; |
| | | import com.sandu.common.util.ResponseUtil; |
| | |
| | | // } |
| | | |
| | | /** |
| | | * 充电结束 |
| | | * 充电结束——小程序用户结束,不需要token,需要openId |
| | | */ |
| | | @PostMapping("/finishCharging") |
| | | public ResponseVO<Object> finishCharging(@RequestBody C3ChargingParam c3ChargingParam) { |
| | | String result = c3ChargingService.finishCharging(c3ChargingParam.getC3Mac()); |
| | | if (c3ChargingParam.getC3Mac() == null || c3ChargingParam.getOpenId() == null) { |
| | | throw new BusinessException("参数错误!"); |
| | | } |
| | | String result = c3ChargingService.finishCharging(c3ChargingParam.getC3Mac(), c3ChargingParam.getOpenId()); |
| | | |
| | | if ("操作成功".equals(result)) { |
| | | return ResponseUtil.success(result); |