瀏覽代碼

update

add_mode
DengBiao 1 年之前
父節點
當前提交
7f8a420a33
共有 2 個文件被更改,包括 38 次插入1 次删除
  1. +14
    -1
      app/admin/hdl/hdl_device.go
  2. +24
    -0
      app/admin/md/md_self_support.go

+ 14
- 1
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


+ 24
- 0
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": "夜宵",
},
}

Loading…
取消
儲存