Browse Source

fix bug:修复更新cADID时因属性名称定义为cadId导致更新不了的问题(额外定义一个cADID主要是为了兼容之前序列化为cadId的字段)

lijie 3 years ago
parent
commit
10f6a1b275
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/main/java/com/persagy/proxy/object/model/AdmEquipment.java

+ 8 - 0
src/main/java/com/persagy/proxy/object/model/AdmEquipment.java

@@ -2,6 +2,8 @@ package com.persagy.proxy.object.model;
 
 import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonAlias;
+import com.fasterxml.jackson.annotation.JsonProperty;
 import com.persagy.proxy.adm.annotations.CascadeColumn;
 import com.persagy.proxy.adm.model.AdmPoint;
 import com.persagy.proxy.adm.model.AdmBaseEntity;
@@ -31,7 +33,13 @@ public class AdmEquipment extends AdmBaseEntity<AdmEquipment> {
     /** 二维码内容 */
     private String defaultQRCode;
     /** 设计图纸中编码 */
+//    @JsonAlias({"cadId","cADID"})
+//    @JsonProperty("cADID")
     private String cadId;
+    /** 设计图纸中编码 */
+    @JsonAlias({"cadId","cADID"})
+    @JsonProperty("cADID")
+    private String cADID;
     /** RFID标识 */
     @JSONField(name = "rFID")
     private String rfId;