package com.ruoyi.order.api.vo;
|
|
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModelProperty;
|
import lombok.Data;
|
|
import java.io.Serializable;
|
import java.math.BigDecimal;
|
|
/**
|
* 设备主动发起充电鉴权建单结果
|
*
|
* @author codebuddy
|
* @since 2026-09-09
|
*/
|
@Data
|
@ApiModel(value = "DeviceStartChargingVO", description = "设备主动发起充电鉴权建单结果")
|
public class DeviceStartChargingVO implements Serializable {
|
private static final long serialVersionUID = 1L;
|
|
@ApiModelProperty("鉴权结果(1=成功,0=失败)")
|
private Integer authentication;
|
|
@ApiModelProperty("失败原因(1=账户不存在,2=账户冻结,3=账户余额不足,4=该卡存在未结账记录,5=桩停用,7=密码错误,9=系统中vin码不存在,10=该桩存在未结账记录)")
|
private Integer failureCause;
|
|
@ApiModelProperty("订单编号(鉴权成功时返回,SD/VD前缀)")
|
private String orderCode;
|
|
@ApiModelProperty("账户余额(刷卡时返回,VIN码充电为空)")
|
private BigDecimal balance;
|
|
public static DeviceStartChargingVO success(String orderCode, BigDecimal balance) {
|
DeviceStartChargingVO vo = new DeviceStartChargingVO();
|
vo.setAuthentication(1);
|
vo.setOrderCode(orderCode);
|
vo.setBalance(balance);
|
return vo;
|
}
|
|
public static DeviceStartChargingVO fail(Integer failureCause) {
|
DeviceStartChargingVO vo = new DeviceStartChargingVO();
|
vo.setAuthentication(0);
|
vo.setFailureCause(failureCause);
|
return vo;
|
}
|
}
|