启动响应费率模型id
This commit is contained in:
parent
a30e3cdb44
commit
ad0f0833ed
@ -90,7 +90,6 @@ public class ChargingController {
|
||||
@PostMapping("charging/start")
|
||||
public R startCharging(@Validated @RequestBody StartChargingData startChargingData) {
|
||||
|
||||
//todo protocol versioning
|
||||
String pileNo = startChargingData.getPileNo();
|
||||
String pkey = "pile:".concat(pileNo);
|
||||
Map<String, Object> cachePile = REDIS.getCacheMap(pkey);
|
||||
@ -113,11 +112,14 @@ public class ChargingController {
|
||||
r = R.fail(code, responseJson.getString("msg"));
|
||||
} else {
|
||||
r = R.fail(responseJson.getString("msg"));
|
||||
cachePile.put("rateModelId", stationRateModelId);
|
||||
REDIS.setCacheMap(pkey, cachePile);
|
||||
}
|
||||
} else {
|
||||
JSONObject json = (JSONObject) JSON.toJSON(startChargingData);
|
||||
String response = HttpUtils.post(fmt(svcSrv).concat("/native/charging/start"), json);
|
||||
r = getRR(response);
|
||||
r.setData(pileRateModelId);
|
||||
}
|
||||
}
|
||||
return r;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user