From dbc843d0b37f786fb816131bcc7ebca86dbe72e9 Mon Sep 17 00:00:00 2001 From: liuxiaolong <liuxiaolong@aiotlink.com> Date: 星期四, 06 八月 2020 09:58:46 +0800 Subject: [PATCH] add crossRecord --- controllers/car.go | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/controllers/car.go b/controllers/car.go index e29274a..2329ce3 100644 --- a/controllers/car.go +++ b/controllers/car.go @@ -118,4 +118,17 @@ func (c *CarController) BindCarSpace() { c.ServeJSON() +} + +// @router /crossRecord [get] +func (c *CarController) CrossRecord() { + sv := service.NewCarService() + records := sv.CrossRecords() + resp := code.Code{ + Success: true, + Status: http.StatusOK, + Data: records, + } + c.Data["json"] = resp + c.ServeJSON() } \ No newline at end of file -- Gitblit v1.8.0