作者 yangfu

refactor:1.代码优化

@@ -67,12 +67,12 @@ func Start() { @@ -67,12 +67,12 @@ func Start() {
67 break 67 break
68 //油炸机 68 //油炸机
69 case domain.DeviceTypeYouZhaJi2: 69 case domain.DeviceTypeYouZhaJi2:
70 - deviceYouZhaJi := &domain.DeviceYouZhaJi2{}  
71 - err = json.Unmarshal(mBytes, deviceYouZhaJi) 70 + deviceYouZhaJi2 := &domain.DeviceYouZhaJi2{}
  71 + err = json.Unmarshal(mBytes, deviceYouZhaJi2)
72 if err != nil { 72 if err != nil {
73 continue 73 continue
74 } 74 }
75 - deviceCollection.Values = deviceYouZhaJi 75 + deviceCollection.Values = tool_funs.SimpleStructToMap(deviceYouZhaJi2)
76 break 76 break
77 //串串机 77 //串串机
78 case domain.DeviceTypeChuanChuanJi: 78 case domain.DeviceTypeChuanChuanJi:
@@ -164,4 +164,4 @@ func Start() { @@ -164,4 +164,4 @@ func Start() {
164 } 164 }
165 } 165 }
166 }) 166 })
167 -}  
  167 +}