diff --git a/app/admin/hdl/hdl_device.go b/app/admin/hdl/hdl_device.go index 8587e34..3ce122b 100644 --- a/app/admin/hdl/hdl_device.go +++ b/app/admin/hdl/hdl_device.go @@ -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 diff --git a/app/admin/md/md_self_support.go b/app/admin/md/md_self_support.go new file mode 100644 index 0000000..f280982 --- /dev/null +++ b/app/admin/md/md_self_support.go @@ -0,0 +1,24 @@ +package md + +var SelfSupportForMealTimeMapping = []map[string]string{ + { + "from": "5:30", + "to": "9.00", + "name": "早餐", + }, + { + "from": "10:40", + "to": "13:30", + "name": "中餐", + }, + { + "from": "17:30", + "to": "20:00", + "name": "晚餐", + }, + { + "from": "20:30", + "to": "21:00", + "name": "夜宵", + }, +}