From c5286c8a52a08dc4b29031a6c8a615d9b92c1e02 Mon Sep 17 00:00:00 2001 From: zhangbiao Date: Mon, 13 Jan 2020 15:13:49 +0800 Subject: [PATCH] update gf v1.11.2 --- ChangeLog.md | 4 ++++ go.mod | 2 +- go.sum | 2 ++ module/component/middle/MiddlewareLog.go | 4 ++-- module/system/configAction.go | 10 +++++----- module/system/departmentAction.go | 8 ++++---- module/system/logAction.go | 8 ++++---- module/system/menuAction.go | 10 +++++----- module/system/roleAction.go | 10 +++++----- module/system/userAction.go | 10 +++++----- 10 files changed, 37 insertions(+), 31 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index b9dfd7b..2733e57 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,9 @@ Change Log 更新说明 ------------------------------ +## 2020-01-13 v1.0.1 +1. gf升级为V1.11.2,修改即将废弃函数 +2. gtoken升级为v1.3.11 + ## 2019-12-24 v1.0.0 1. 发布gmanger v1.0.0 支持前后端分离 diff --git a/go.mod b/go.mod index ba138b9..d700a21 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,7 @@ module gmanager require ( - github.com/goflyfox/gtoken v1.3.10 + github.com/goflyfox/gtoken v1.3.11 github.com/gogf/gf v1.11.2 ) diff --git a/go.sum b/go.sum index d2fbd43..c359578 100644 --- a/go.sum +++ b/go.sum @@ -12,6 +12,8 @@ github.com/gf-third/yaml v1.0.1 h1:pqD4ix+65DqGphU1MDnToPZfGYk0tuuwRzuTSl3g0d0= github.com/gf-third/yaml v1.0.1/go.mod h1:t443vj0txEw3+E0MOtkr83kt+PrZg2I8SRuYfn85NM0= github.com/goflyfox/gtoken v1.3.10 h1:mAjrjtgH+/KKBFJ4co+MVfcIVnspONwF0vH05CRrJ2g= github.com/goflyfox/gtoken v1.3.10/go.mod h1:2oUK27DG/F+jVPCGtEWsKL5aM4zmCIg9/VREkGhIrw0= +github.com/goflyfox/gtoken v1.3.11 h1:dttowT4XrxtDrmpNYCtF23mtpNW2keNR/Me5ULPsQjw= +github.com/goflyfox/gtoken v1.3.11/go.mod h1:2oUK27DG/F+jVPCGtEWsKL5aM4zmCIg9/VREkGhIrw0= github.com/gogf/gf v1.11.2 h1:fGXRk06DnR2w4tWTZu+aZbBmAVYEnB4FtDRXKMqPp6Q= github.com/gogf/gf v1.11.2/go.mod h1:/37gncPmuM06D4YSqiDze9GsasDtF2QnWkUfKeiGW/Q= github.com/gomodule/redigo v2.0.0+incompatible h1:K/R+8tc58AaqLkqG2Ol3Qk+DR/TlNuhuh457pBFPtt0= diff --git a/module/component/middle/MiddlewareLog.go b/module/component/middle/MiddlewareLog.go index 05694d4..80f6660 100644 --- a/module/component/middle/MiddlewareLog.go +++ b/module/component/middle/MiddlewareLog.go @@ -24,9 +24,9 @@ func MiddlewareLog(r *ghttp.Request) { } if r.Method == "GET" { - params = r.GetQueryMap() + params = r.GetMap() } else if r.Method == "POST" { - params = r.GetQueryMap() + params = r.GetMap() } else { base.Error(r, "Request Method is ERROR! ") return diff --git a/module/system/configAction.go b/module/system/configAction.go index 1674e2f..2dd8650 100644 --- a/module/system/configAction.go +++ b/module/system/configAction.go @@ -60,7 +60,7 @@ func (action *ConfigAction) Delete(r *ghttp.Request) { // path: /save func (action *ConfigAction) Save(r *ghttp.Request) { model := SysConfig{} - err := gconv.Struct(r.GetQueryMap(), &model) + err := gconv.Struct(r.GetMap(), &model) if err != nil { glog.Error(actionNameConfig+" save struct error", err) base.Error(r, "save error") @@ -89,7 +89,7 @@ func (action *ConfigAction) Save(r *ghttp.Request) { // path: /list func (action *ConfigAction) List(r *ghttp.Request) { - form := base.NewForm(r.GetQueryMap()) + form := base.NewForm(r.GetMap()) model := SysConfig{} list := model.List(&form) @@ -98,7 +98,7 @@ func (action *ConfigAction) List(r *ghttp.Request) { // path: /page func (action *ConfigAction) Page(r *ghttp.Request) { - form := base.NewForm(r.GetQueryMap()) + form := base.NewForm(r.GetMap()) model := SysConfig{} page := model.Page(&form) @@ -113,7 +113,7 @@ func (action *ConfigAction) Page(r *ghttp.Request) { // path: /jqgrid func (action *ConfigAction) Jqgrid(r *ghttp.Request) { - form := base.NewForm(r.GetQueryMap()) + form := base.NewForm(r.GetMap()) model := SysConfig{} page := model.Page(&form) @@ -127,7 +127,7 @@ func (action *ConfigAction) Jqgrid(r *ghttp.Request) { // path: /type func (action *ConfigAction) Type(r *ghttp.Request) { - form := base.NewForm(r.GetQueryMap()) + form := base.NewForm(r.GetMap()) model := SysConfig{} //userId := base.GetUser(r).Id diff --git a/module/system/departmentAction.go b/module/system/departmentAction.go index f96ca16..0a1b710 100644 --- a/module/system/departmentAction.go +++ b/module/system/departmentAction.go @@ -66,7 +66,7 @@ func (action *DepartmentAction) Delete(r *ghttp.Request) { // path: /save func (action *DepartmentAction) Save(r *ghttp.Request) { model := SysDepartment{} - err := gconv.Struct(r.GetQueryMap(), &model) + err := gconv.Struct(r.GetMap(), &model) if err != nil { glog.Error(actionNameDepartment+" save struct error", err) base.Error(r, "save error") @@ -95,7 +95,7 @@ func (action *DepartmentAction) Save(r *ghttp.Request) { // path: /list func (action *DepartmentAction) List(r *ghttp.Request) { - form := base.NewForm(r.GetQueryMap()) + form := base.NewForm(r.GetMap()) model := SysDepartment{} list := model.List(&form) @@ -104,7 +104,7 @@ func (action *DepartmentAction) List(r *ghttp.Request) { // path: /page func (action *DepartmentAction) Page(r *ghttp.Request) { - form := base.NewForm(r.GetQueryMap()) + form := base.NewForm(r.GetMap()) model := SysDepartment{} page := model.Page(&form) @@ -119,7 +119,7 @@ func (action *DepartmentAction) Page(r *ghttp.Request) { // path: /jqgrid func (action *DepartmentAction) Jqgrid(r *ghttp.Request) { - form := base.NewForm(r.GetQueryMap()) + form := base.NewForm(r.GetMap()) model := SysDepartment{} page := model.Page(&form) diff --git a/module/system/logAction.go b/module/system/logAction.go index 8823bdd..3cd107e 100644 --- a/module/system/logAction.go +++ b/module/system/logAction.go @@ -60,7 +60,7 @@ func (action *LogAction) Delete(r *ghttp.Request) { // path: /save func (action *LogAction) Save(r *ghttp.Request) { model := SysLog{} - err := gconv.Struct(r.GetQueryMap(), &model) + err := gconv.Struct(r.GetMap(), &model) if err != nil { glog.Error(actionNameLog+" save struct error", err) base.Error(r, "save error") @@ -89,7 +89,7 @@ func (action *LogAction) Save(r *ghttp.Request) { // path: /list func (action *LogAction) List(r *ghttp.Request) { - form := base.NewForm(r.GetQueryMap()) + form := base.NewForm(r.GetMap()) model := SysLog{} list := model.List(&form) @@ -98,7 +98,7 @@ func (action *LogAction) List(r *ghttp.Request) { // path: /page func (action *LogAction) Page(r *ghttp.Request) { - form := base.NewForm(r.GetQueryMap()) + form := base.NewForm(r.GetMap()) model := SysLog{} page := model.Page(&form) @@ -113,7 +113,7 @@ func (action *LogAction) Page(r *ghttp.Request) { // path: /jqgrid func (action *LogAction) Jqgrid(r *ghttp.Request) { - form := base.NewForm(r.GetQueryMap()) + form := base.NewForm(r.GetMap()) model := SysLog{} page := model.Page(&form) diff --git a/module/system/menuAction.go b/module/system/menuAction.go index 1bd747f..15aba09 100644 --- a/module/system/menuAction.go +++ b/module/system/menuAction.go @@ -66,7 +66,7 @@ func (action *MenuAction) Delete(r *ghttp.Request) { // path: /save func (action *MenuAction) Save(r *ghttp.Request) { model := SysMenu{} - err := gconv.Struct(r.GetQueryMap(), &model) + err := gconv.Struct(r.GetMap(), &model) if err != nil { glog.Error(actionNameMenu+" save struct error", err) base.Error(r, "save error") @@ -104,7 +104,7 @@ func (action *MenuAction) Save(r *ghttp.Request) { // path: /tree func (action *MenuAction) Tree(r *ghttp.Request) { - form := base.NewForm(r.GetQueryMap()) + form := base.NewForm(r.GetMap()) model := SysMenu{} list := model.List(&form) @@ -113,7 +113,7 @@ func (action *MenuAction) Tree(r *ghttp.Request) { // path: /list func (action *MenuAction) List(r *ghttp.Request) { - form := base.NewForm(r.GetQueryMap()) + form := base.NewForm(r.GetMap()) model := SysMenu{} list := model.List(&form) @@ -122,7 +122,7 @@ func (action *MenuAction) List(r *ghttp.Request) { // path: /page func (action *MenuAction) Page(r *ghttp.Request) { - form := base.NewForm(r.GetQueryMap()) + form := base.NewForm(r.GetMap()) model := SysMenu{} page := model.Page(&form) @@ -137,7 +137,7 @@ func (action *MenuAction) Page(r *ghttp.Request) { // path: /jqgrid func (action *MenuAction) Jqgrid(r *ghttp.Request) { - form := base.NewForm(r.GetQueryMap()) + form := base.NewForm(r.GetMap()) model := SysMenu{} page := model.Page(&form) diff --git a/module/system/roleAction.go b/module/system/roleAction.go index 8745251..5efa6da 100644 --- a/module/system/roleAction.go +++ b/module/system/roleAction.go @@ -61,7 +61,7 @@ func (action *RoleAction) Delete(r *ghttp.Request) { // path: /save func (action *RoleAction) Save(r *ghttp.Request) { model := SysRole{} - err := gconv.Struct(r.GetQueryMap(), &model) + err := gconv.Struct(r.GetMap(), &model) if err != nil { glog.Error(actionNameRole+" save struct error", err) base.Error(r, "save error") @@ -98,7 +98,7 @@ func (action *RoleAction) Save(r *ghttp.Request) { // path: /list func (action *RoleAction) List(r *ghttp.Request) { - form := base.NewForm(r.GetQueryMap()) + form := base.NewForm(r.GetMap()) model := SysRole{} list := model.List(&form) @@ -107,7 +107,7 @@ func (action *RoleAction) List(r *ghttp.Request) { // path: /page func (action *RoleAction) Page(r *ghttp.Request) { - form := base.NewForm(r.GetQueryMap()) + form := base.NewForm(r.GetMap()) model := SysRole{} page := model.Page(&form) @@ -122,7 +122,7 @@ func (action *RoleAction) Page(r *ghttp.Request) { // path: /jqgrid func (action *RoleAction) Jqgrid(r *ghttp.Request) { - form := base.NewForm(r.GetQueryMap()) + form := base.NewForm(r.GetMap()) model := SysRole{} page := model.Page(&form) @@ -140,7 +140,7 @@ func (action *RoleAction) Info(r *ghttp.Request) { if roleId == 0 { base.Fail(r, "参数错误") } - form := base.NewForm(r.GetQueryMap()) + form := base.NewForm(r.GetMap()) form.SetParam("roleId", gconv.String(roleId)) // 选择的列表 diff --git a/module/system/userAction.go b/module/system/userAction.go index 33b0da9..d0d688d 100644 --- a/module/system/userAction.go +++ b/module/system/userAction.go @@ -63,7 +63,7 @@ func (action *UserAction) Delete(r *ghttp.Request) { // path: /save func (action *UserAction) Save(r *ghttp.Request) { model := SysUser{} - err := gconv.Struct(r.GetQueryMap(), &model) + err := gconv.Struct(r.GetMap(), &model) if err != nil { glog.Error(actionNameUser+" save struct error", err) base.Error(r, "save error") @@ -108,7 +108,7 @@ func (action *UserAction) Save(r *ghttp.Request) { // path: /list func (action *UserAction) List(r *ghttp.Request) { - form := base.NewForm(r.GetQueryMap()) + form := base.NewForm(r.GetMap()) model := SysUser{} list := model.List(&form) @@ -117,7 +117,7 @@ func (action *UserAction) List(r *ghttp.Request) { // path: /page func (action *UserAction) Page(r *ghttp.Request) { - form := base.NewForm(r.GetQueryMap()) + form := base.NewForm(r.GetMap()) model := SysUser{} page := model.Page(&form) @@ -132,7 +132,7 @@ func (action *UserAction) Page(r *ghttp.Request) { // path: /jqgrid func (action *UserAction) Jqgrid(r *ghttp.Request) { - form := base.NewForm(r.GetQueryMap()) + form := base.NewForm(r.GetMap()) model := SysUser{} page := model.Page(&form) @@ -150,7 +150,7 @@ func (action *UserAction) RoleInfo(r *ghttp.Request) { if userId == 0 { base.Fail(r, "参数错误") } - form := base.NewForm(r.GetQueryMap()) + form := base.NewForm(r.GetMap()) form.SetParam("userId", gconv.String(userId)) // 角色列表