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() }