|
|
@@ -47,8 +47,21 @@ func DeviceList(c *gin.Context) { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
var resp []interface{} |
|
|
|
for _, v := range m { |
|
|
|
resp = append(resp, map[string]interface{}{ |
|
|
|
"id": v.Device.Id, |
|
|
|
"name": v.Device.Name, |
|
|
|
"device_sn": v.Device.DeviceSn, |
|
|
|
"enterprise_id": v.Device.EnterpriseId, |
|
|
|
"memo": v.Device.Memo, |
|
|
|
"create_at": v.Device.CreateAt, |
|
|
|
"update_at": v.Device.UpdateAt, |
|
|
|
"enterprise_name": v.Enterprise.Name, |
|
|
|
}) |
|
|
|
} |
|
|
|
e.OutSuc(c, map[string]interface{}{ |
|
|
|
"list": m, |
|
|
|
"list": resp, |
|
|
|
"total": total, |
|
|
|
}, nil) |
|
|
|
return |
|
|
|