- 在 ThirdPartyChargingServiceImpl 中,保留原有连接器的 status 字段值 - 确保 status 字段由设备状态推送接口单独维护,不被其他逻辑覆盖 - 在 ThirdPartyConnectorInfo 实体中添加 status 字段的数据库映射注解@TableField("status")
@@ -396,6 +396,8 @@ public class ThirdPartyChargingServiceImpl implements ThirdPartyChargingService
ThirdPartyConnectorInfo entity = new ThirdPartyConnectorInfo();
if (existingConnector != null) {
entity.setId(existingConnector.getId());
+ // 保留原有的status字段,该字段由设备状态推送接口单独维护
+ entity.setStatus(existingConnector.getStatus());
}
// 设置字段值
@@ -80,6 +80,7 @@ public class ThirdPartyConnectorInfo extends BaseEntity {
* 充电设备接口状态
* 0-离网,1-空闲,2-占用(未充电),3-占用(充电中),4-占用(预约锁定),255-故障
*/
+ @TableField("status")
private Integer status;
/**