From eef11eeadc679b1ad7bd23c983a67318d7cd3705 Mon Sep 17 00:00:00 2001 From: liuxiaolong <liuxiaolong@aiotlink.com> Date: 星期二, 11 八月 2020 17:34:00 +0800 Subject: [PATCH] sync user from hik manual,ret syncCount --- controllers/user.go | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/controllers/user.go b/controllers/user.go index 26ca81b..927a38f 100644 --- a/controllers/user.go +++ b/controllers/user.go @@ -186,4 +186,17 @@ } +// @router /sync [get] +func (u *UserController) Sync() { + resp := code.Code{} + syncCount := service.SyncHikPerson() + resp.Success = true + resp.Status = http.StatusOK + resp.Data = map[string]interface{}{ + "syncCount": syncCount, + } + + u.Data["json"] = resp + u.ServeJSON() +} -- Gitblit v1.8.0