Skip to content

Commit

Permalink
update gf v1.11.2
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangbiao committed Jan 13, 2020
1 parent cca02b7 commit 7f27586
Show file tree
Hide file tree
Showing 14 changed files with 66 additions and 58 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Change Log 更新说明
------------------------------
## 2020-01-13 v0.2.1
1. gf升级为V1.11.2,修改即将废弃函数
2. gtoken升级为v1.3.11

## 2019-12-11
1. 修复菜单级别问题

Expand Down
2 changes: 1 addition & 1 deletion config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ log-path = "./logs"

# 数据库配置
[database]
link = "mysql:root:123456@tcp(127.0.0.1:33306)/gcs"
link = "mysql:root:A123456@tcp(127.0.0.1:33306)/gcs"
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module gcs

require (
github.com/goflyfox/gtoken v1.3.7
github.com/gogf/gf v1.10.0
github.com/goflyfox/gtoken v1.3.11
github.com/gogf/gf v1.11.2
)

go 1.13
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ github.com/goflyfox/gtoken v1.3.6 h1:gDnseDqSCWQrB5Pphy0VVMVClPE34zwIDv5FF0dWerw
github.com/goflyfox/gtoken v1.3.6/go.mod h1:0r23tBl3H4DUMfjV+kNM4WEnyL96fCt0og2zt9dEN4k=
github.com/goflyfox/gtoken v1.3.7 h1:ANqlwMwMPlQYXsKaZ1chkqMMPtY8FQsGj6ju5vmyvfE=
github.com/goflyfox/gtoken v1.3.7/go.mod h1:7Es7wbBEyHVpa21yj6XBAb5dFyeEINq0XJyha1XBAy4=
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.8.2 h1:SVHCXOZVHz2cFwNpQ9JrZYRPcXYT5+oaCTAw8uyjHUQ=
github.com/gogf/gf v1.8.2/go.mod h1:qJRcq0s3RskjJIZKsSHjZkpxw91rd0EAh+4CUbawbXQ=
github.com/gogf/gf v1.9.6 h1:3UBKrl2/+Wdpqs6oiRIHsMf40uaIdDQXpbnkGjXpNQU=
Expand All @@ -24,6 +26,8 @@ github.com/gogf/gf v1.9.10 h1:lPBf0EOxv6AXVWN46EKLID0GMHDGOrs4ZAi/RUJbt+c=
github.com/gogf/gf v1.9.10/go.mod h1:sitJZHjmT9B+923N4mH5rkM19AugKG+BxI47R64bR08=
github.com/gogf/gf v1.10.0 h1:O6QwrdlQ06Nq/mp3EMwGckPA6xnWg2L+k5u+mYCiges=
github.com/gogf/gf v1.10.0/go.mod h1:/37gncPmuM06D4YSqiDze9GsasDtF2QnWkUfKeiGW/Q=
github.com/gogf/gf v1.11.2 h1:fGXRk06DnR2w4tWTZu+aZbBmAVYEnB4FtDRXKMqPp6Q=
github.com/gogf/gf v1.11.2/go.mod h1:/37gncPmuM06D4YSqiDze9GsasDtF2QnWkUfKeiGW/Q=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/gomodule/redigo v2.0.0+incompatible h1:K/R+8tc58AaqLkqG2Ol3Qk+DR/TlNuhuh457pBFPtt0=
github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
Expand Down
12 changes: 6 additions & 6 deletions module/component/hook/CommonHook.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ func LogBeforeServe(r *ghttp.Request) {

var params map[string]interface{}
if r.Method == "GET" {
params = r.GetQueryMap()
params = r.GetMap()
} else if r.Method == "POST" {
params = r.GetPostMap()
params = r.GetMap()
} else {
base.Error(r, "Request Method is ERROR! ")
return
Expand Down Expand Up @@ -62,9 +62,9 @@ func LogBeforeOutput(r *ghttp.Request) {
}
var params map[string]interface{}
if r.Method == "GET" {
params = r.GetQueryMap()
params = r.GetMap()
} else if r.Method == "POST" {
params = r.GetPostMap()
params = r.GetMap()
} else {
r.Response.Writeln("Request Method is ERROR! ")
return
Expand Down Expand Up @@ -98,9 +98,9 @@ func AuthAfterFunc(r *ghttp.Request, respData resp.Resp) {
if !respData.Success() {
var params map[string]interface{}
if r.Method == "GET" {
params = r.GetQueryMap()
params = r.GetMap()
} else if r.Method == "POST" {
params = r.GetPostMap()
params = r.GetMap()
} else {
r.Response.Writeln("Request Method is ERROR! ")
return
Expand Down
4 changes: 2 additions & 2 deletions module/component/middle/MiddlewareLog.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ func MiddlewareLog(r *ghttp.Request) {
}

if r.Method == "GET" {
params = r.GetQueryMap()
params = r.GetMap()
} else if r.Method == "POST" {
params = r.GetPostMap()
params = r.GetMap()
} else {
base.Error(r, "Request Method is ERROR! ")
return
Expand Down
10 changes: 5 additions & 5 deletions module/config/configPublicAction.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (action *ConfigPublicAction) Delete(r *ghttp.Request) {
// path: /save
func (action *ConfigPublicAction) Save(r *ghttp.Request) {
model := TbConfigPublic{}
err := gconv.Struct(r.GetPostMap(), &model)
err := gconv.Struct(r.GetMap(), &model)
if err != nil {
glog.Error(actionNameConfigPublic+" save struct error", err)
base.Error(r, "save error")
Expand Down Expand Up @@ -174,7 +174,7 @@ func (action *ConfigPublicAction) Rollback(r *ghttp.Request) {
now := utils.GetNow()

// 最新数据
form := base.NewForm(r.GetPostMap())
form := base.NewForm(r.GetMap())
form.OrderBy = "id desc"
firstModel := TbConfigPublic{Id: id}.GetOne(&form)
if firstModel.Id == id {
Expand Down Expand Up @@ -202,7 +202,7 @@ func (action *ConfigPublicAction) Rollback(r *ghttp.Request) {

// path: /list
func (action *ConfigPublicAction) List(r *ghttp.Request) {
form := base.NewForm(r.GetPostMap())
form := base.NewForm(r.GetMap())
model := TbConfigPublic{}

list := model.List(&form)
Expand All @@ -211,7 +211,7 @@ func (action *ConfigPublicAction) List(r *ghttp.Request) {

// path: /page
func (action *ConfigPublicAction) Page(r *ghttp.Request) {
form := base.NewForm(r.GetPostMap())
form := base.NewForm(r.GetMap())
model := TbConfigPublic{}

page := model.Page(&form)
Expand All @@ -220,7 +220,7 @@ func (action *ConfigPublicAction) Page(r *ghttp.Request) {

// path: /jqgrid
func (action *ConfigPublicAction) Jqgrid(r *ghttp.Request) {
form := base.NewForm(r.GetPostMap())
form := base.NewForm(r.GetMap())
model := TbConfigPublic{}

page := model.Page(&form)
Expand Down
10 changes: 5 additions & 5 deletions module/config/projectAction.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (action *ProjectAction) Delete(r *ghttp.Request) {
// path: /save
func (action *ProjectAction) Save(r *ghttp.Request) {
model := TbProject{}
err := gconv.StructDeep(r.GetPostMap(), &model)
err := gconv.StructDeep(r.GetMap(), &model)
if err != nil {
glog.Error(actionNameProject+" save struct error", err)
base.Error(r, "save error")
Expand Down Expand Up @@ -112,7 +112,7 @@ func (action *ProjectAction) Save(r *ghttp.Request) {

// path: /list
func (action *ProjectAction) List(r *ghttp.Request) {
form := base.NewForm(r.GetPostMap())
form := base.NewForm(r.GetMap())
model := TbProject{}

list := model.List(&form)
Expand All @@ -121,7 +121,7 @@ func (action *ProjectAction) List(r *ghttp.Request) {

// path: /page
func (action *ProjectAction) Page(r *ghttp.Request) {
form := base.NewForm(r.GetPostMap())
form := base.NewForm(r.GetMap())
model := TbProject{}

page := model.Page(&form)
Expand All @@ -130,7 +130,7 @@ func (action *ProjectAction) Page(r *ghttp.Request) {

// path: /jqgrid
func (action *ProjectAction) Jqgrid(r *ghttp.Request) {
form := base.NewForm(r.GetPostMap())
form := base.NewForm(r.GetMap())
model := TbProject{}

page := model.Page(&form)
Expand Down Expand Up @@ -234,7 +234,7 @@ func (action *ProjectAction) User(r *ghttp.Request) {
base.Fail(r, "登录异常")
}

projectId := r.GetPostInt("projectId")
projectId := r.GetInt("projectId")
if projectId == 0 {
base.Fail(r, "参数错误")
}
Expand Down
10 changes: 5 additions & 5 deletions module/system/configAction.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.GetPostMap(), &model)
err := gconv.Struct(r.GetMap(), &model)
if err != nil {
glog.Error(actionNameConfig+" save struct error", err)
base.Error(r, "save error")
Expand Down Expand Up @@ -101,7 +101,7 @@ func (action *ConfigAction) Save(r *ghttp.Request) {

// path: /list
func (action *ConfigAction) List(r *ghttp.Request) {
form := base.NewForm(r.GetPostMap())
form := base.NewForm(r.GetMap())
model := SysConfig{}

list := model.List(&form)
Expand All @@ -110,7 +110,7 @@ func (action *ConfigAction) List(r *ghttp.Request) {

// path: /page
func (action *ConfigAction) Page(r *ghttp.Request) {
form := base.NewForm(r.GetPostMap())
form := base.NewForm(r.GetMap())
model := SysConfig{}

page := model.Page(&form)
Expand All @@ -119,7 +119,7 @@ func (action *ConfigAction) Page(r *ghttp.Request) {

// path: /jqgrid
func (action *ConfigAction) Jqgrid(r *ghttp.Request) {
form := base.NewForm(r.GetPostMap())
form := base.NewForm(r.GetMap())
userId := base.GetUser(r).Id
user := SysUser{Id: userId}.Get()
form.Params["projectId"] = gconv.String(user.ProjectId)
Expand All @@ -137,7 +137,7 @@ func (action *ConfigAction) Jqgrid(r *ghttp.Request) {

// path: /type
func (action *ConfigAction) Type(r *ghttp.Request) {
form := base.NewForm(r.GetPostMap())
form := base.NewForm(r.GetMap())
model := SysConfig{}

//userId := base.GetUser(r).Id
Expand Down
8 changes: 4 additions & 4 deletions module/system/departmentAction.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.GetPostMap(), &model)
err := gconv.Struct(r.GetMap(), &model)
if err != nil {
glog.Error(actionNameDepartment+" save struct error", err)
base.Error(r, "save error")
Expand Down Expand Up @@ -95,7 +95,7 @@ func (action *DepartmentAction) Save(r *ghttp.Request) {

// path: /list
func (action *DepartmentAction) List(r *ghttp.Request) {
form := base.NewForm(r.GetPostMap())
form := base.NewForm(r.GetMap())
model := SysDepartment{}

list := model.List(&form)
Expand All @@ -104,7 +104,7 @@ func (action *DepartmentAction) List(r *ghttp.Request) {

// path: /page
func (action *DepartmentAction) Page(r *ghttp.Request) {
form := base.NewForm(r.GetPostMap())
form := base.NewForm(r.GetMap())
model := SysDepartment{}

page := model.Page(&form)
Expand All @@ -119,7 +119,7 @@ func (action *DepartmentAction) Page(r *ghttp.Request) {

// path: /jqgrid
func (action *DepartmentAction) Jqgrid(r *ghttp.Request) {
form := base.NewForm(r.GetPostMap())
form := base.NewForm(r.GetMap())
model := SysDepartment{}

page := model.Page(&form)
Expand Down
8 changes: 4 additions & 4 deletions module/system/logAction.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.GetPostMap(), &model)
err := gconv.Struct(r.GetMap(), &model)
if err != nil {
glog.Error(actionNameLog+" save struct error", err)
base.Error(r, "save error")
Expand Down Expand Up @@ -89,7 +89,7 @@ func (action *LogAction) Save(r *ghttp.Request) {

// path: /list
func (action *LogAction) List(r *ghttp.Request) {
form := base.NewForm(r.GetPostMap())
form := base.NewForm(r.GetMap())
model := SysLog{}

list := model.List(&form)
Expand All @@ -98,7 +98,7 @@ func (action *LogAction) List(r *ghttp.Request) {

// path: /page
func (action *LogAction) Page(r *ghttp.Request) {
form := base.NewForm(r.GetPostMap())
form := base.NewForm(r.GetMap())
model := SysLog{}

page := model.Page(&form)
Expand All @@ -113,7 +113,7 @@ func (action *LogAction) Page(r *ghttp.Request) {

// path: /jqgrid
func (action *LogAction) Jqgrid(r *ghttp.Request) {
form := base.NewForm(r.GetPostMap())
form := base.NewForm(r.GetMap())
model := SysLog{}

page := model.Page(&form)
Expand Down
10 changes: 5 additions & 5 deletions module/system/menuAction.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.GetPostMap(), &model)
err := gconv.Struct(r.GetMap(), &model)
if err != nil {
glog.Error(actionNameMenu+" save struct error", err)
base.Error(r, "save error")
Expand Down Expand Up @@ -104,7 +104,7 @@ func (action *MenuAction) Save(r *ghttp.Request) {

// path: /tree
func (action *MenuAction) Tree(r *ghttp.Request) {
form := base.NewForm(r.GetPostMap())
form := base.NewForm(r.GetMap())
model := SysMenu{}

list := model.List(&form)
Expand All @@ -113,7 +113,7 @@ func (action *MenuAction) Tree(r *ghttp.Request) {

// path: /list
func (action *MenuAction) List(r *ghttp.Request) {
form := base.NewForm(r.GetPostMap())
form := base.NewForm(r.GetMap())
model := SysMenu{}

list := model.List(&form)
Expand All @@ -122,7 +122,7 @@ func (action *MenuAction) List(r *ghttp.Request) {

// path: /page
func (action *MenuAction) Page(r *ghttp.Request) {
form := base.NewForm(r.GetPostMap())
form := base.NewForm(r.GetMap())
model := SysMenu{}

page := model.Page(&form)
Expand All @@ -137,7 +137,7 @@ func (action *MenuAction) Page(r *ghttp.Request) {

// path: /jqgrid
func (action *MenuAction) Jqgrid(r *ghttp.Request) {
form := base.NewForm(r.GetPostMap())
form := base.NewForm(r.GetMap())
model := SysMenu{}

page := model.Page(&form)
Expand Down
Loading

0 comments on commit 7f27586

Please sign in to comment.