api层写法统一
This commit is contained in:
1 parent
fa30b8db95
commit
9bf9330410
40 files changed
+430
-316
No files matched your search
@@ -2,10 +2,10 @@ package dto
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"go-admin/common/apis"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gin-gonic/gin/binding"
|
||||
"github.com/go-admin-team/go-admin-core/sdk/api"
|
||||
|
||||
"go-admin/app/admin/models/system"
|
||||
"go-admin/common/dto"
|
||||
@@ -30,7 +30,7 @@ func (m *SysMenuSearch) GetNeedSearch() interface{} {
|
||||
|
||||
// Bind 映射上下文中的结构体数据
|
||||
func (m *SysMenuSearch) Bind(ctx *gin.Context) error {
|
||||
log := apis.GetRequestLogger(ctx)
|
||||
log := api.GetRequestLogger(ctx)
|
||||
err := ctx.ShouldBind(m)
|
||||
if err != nil {
|
||||
log.Debugf("ShouldBind error: %s", err.Error())
|
||||
@@ -60,7 +60,7 @@ type SysMenuControl struct {
|
||||
|
||||
// Bind 映射上下文中的结构体数据
|
||||
func (s *SysMenuControl) Bind(ctx *gin.Context) error {
|
||||
log := apis.GetRequestLogger(ctx)
|
||||
log := api.GetRequestLogger(ctx)
|
||||
err := ctx.ShouldBindUri(s)
|
||||
if err != nil {
|
||||
log.Debugf("ShouldBindUri error: %s", err.Error())
|
||||
@@ -122,7 +122,7 @@ func (s *SysMenuById) GetId() interface{} {
|
||||
}
|
||||
|
||||
func (s *SysMenuById) Bind(ctx *gin.Context) error {
|
||||
log := apis.GetRequestLogger(ctx)
|
||||
log := api.GetRequestLogger(ctx)
|
||||
err := ctx.ShouldBindUri(s)
|
||||
if err != nil {
|
||||
log.Debugf("ShouldBindUri error: %s", err.Error())
|
||||
|
||||
Reference in new issue
Block a user