快电:notify_no_bill_order
This commit is contained in:
parent
90da0ef85d
commit
d0874a46de
@ -0,0 +1,26 @@
|
||||
package com.xhpc.evcs.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE,
|
||||
setterVisibility = JsonAutoDetect.Visibility.NONE, creatorVisibility = JsonAutoDetect.Visibility.NONE)
|
||||
public class NotifyNoBillOrderRequest {
|
||||
|
||||
@JsonProperty("StartChargeSeq")
|
||||
String startChargeSeq;
|
||||
|
||||
@JsonProperty("OperatorID")
|
||||
String operatorId;
|
||||
|
||||
@JsonProperty("ConnectorID")
|
||||
String connectorId;
|
||||
|
||||
@JsonProperty("OrderETime")
|
||||
String orderETime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,82 @@
|
||||
package com.xhpc.evcs.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonPropertyOrder({
|
||||
"SuccStat",
|
||||
"FailReason",
|
||||
"StartChargeSeq"
|
||||
})
|
||||
public class NotifyNoBillOrderResponse {
|
||||
|
||||
@JsonProperty("SuccStat")
|
||||
private Integer succStat;
|
||||
// 0:无 1:无此订单 2~ 99:自定义
|
||||
@JsonProperty("FailReason")
|
||||
private Integer failReason;
|
||||
@JsonProperty("StartChargeSeq")
|
||||
private String startChargeSeq;
|
||||
@JsonIgnore
|
||||
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
|
||||
|
||||
@JsonProperty("SuccStat")
|
||||
public Integer getSuccStat() {
|
||||
|
||||
return succStat;
|
||||
}
|
||||
|
||||
@JsonProperty("SuccStat")
|
||||
public void setSuccStat(Integer succStat) {
|
||||
|
||||
this.succStat = succStat;
|
||||
}
|
||||
|
||||
@JsonProperty("FailReason")
|
||||
public Integer getFailReason() {
|
||||
|
||||
return failReason;
|
||||
}
|
||||
|
||||
@JsonProperty("FailReason")
|
||||
public void setFailReason(Integer failReason) {
|
||||
|
||||
this.failReason = failReason;
|
||||
}
|
||||
|
||||
@JsonProperty("StartChargeSeq")
|
||||
public String getStartChargeSeq() {
|
||||
|
||||
return startChargeSeq;
|
||||
}
|
||||
|
||||
@JsonProperty("StartChargeSeq")
|
||||
public void setStartChargeSeq(String startChargeSeq) {
|
||||
|
||||
this.startChargeSeq = startChargeSeq;
|
||||
}
|
||||
|
||||
@JsonAnyGetter
|
||||
public Map<String, Object> getAdditionalProperties() {
|
||||
|
||||
return this.additionalProperties;
|
||||
}
|
||||
|
||||
@JsonAnySetter
|
||||
public void setAdditionalProperty(String name, Object value) {
|
||||
|
||||
this.additionalProperties.put(name, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
return new ToStringBuilder(this).append("succStat", succStat).append("failReason", failReason).append("startChargeSeq"
|
||||
, startChargeSeq).append("additionalProperties", additionalProperties).toString();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package com.xhpc.evcs.api;
|
||||
|
||||
import com.xhpc.evcs.dto.CommonRequest;
|
||||
import com.xhpc.evcs.dto.CommonResponse;
|
||||
import com.xhpc.evcs.dto.NotifyNoBillOrderRequest;
|
||||
import com.xhpc.evcs.dto.NotifyNoBillOrderResponse;
|
||||
import com.xhpc.evcs.jpa.XhpcTerminalRepository;
|
||||
import com.xhpc.evcs.utils.JSONUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
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.RestController;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
public class NotifyNoBillOrderController {
|
||||
|
||||
@Autowired
|
||||
private XhpcTerminalRepository xhpcTerminalRepository;
|
||||
|
||||
@PostMapping("/v1/notify_no_bill_order")
|
||||
public CommonResponse notifyNoBillOrder(@RequestBody CommonRequest<NotifyNoBillOrderRequest> commonRequest) throws IOException {
|
||||
|
||||
NotifyNoBillOrderRequest notifyNoBillOrderRequest = JSONUtil.readParams(commonRequest.getData(),
|
||||
NotifyNoBillOrderRequest.class);
|
||||
|
||||
CommonResponse commonResponse = new CommonResponse();
|
||||
commonResponse.setMsg("Query equipment business policy success");
|
||||
commonResponse.setRet("0");
|
||||
NotifyNoBillOrderResponse notifyNoBillOrderResponse = new NotifyNoBillOrderResponse();
|
||||
commonResponse.setData(JSONUtil.toJSONString(notifyNoBillOrderResponse));
|
||||
|
||||
return commonResponse;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user