@@ -2,20 +2,21 @@ package action
2
2
3
3
import (
4
4
"context"
5
+ "strings"
6
+
5
7
"github.com/glennliao/apijson-go/config"
6
8
"github.com/glennliao/apijson-go/consts"
7
9
"github.com/glennliao/apijson-go/model"
8
10
"github.com/gogf/gf/v2/database/gdb"
9
11
"github.com/gogf/gf/v2/errors/gerror"
10
12
"github.com/gogf/gf/v2/frame/g"
11
13
"github.com/gogf/gf/v2/util/gconv"
12
- "strings"
13
14
)
14
15
15
16
// Action 非get查询的request表中的请求
16
17
type Action struct {
17
18
ctx context.Context
18
- tagRequest * config.Request
19
+ tagRequest * config.RequestConfig
19
20
method string
20
21
21
22
req model.Map
@@ -30,7 +31,7 @@ type Action struct {
30
31
// 关闭 request 验证开关, 默认否
31
32
NoRequestVerify bool
32
33
33
- //Access *config.Access
34
+ // Access *config.Access
34
35
35
36
// dbFieldStyle 数据库字段命名风格 请求传递到数据库中
36
37
DbFieldStyle config.FieldStyle
@@ -75,7 +76,7 @@ func (a *Action) parse() error {
75
76
}
76
77
structure , ok := structures [key ]
77
78
if ! ok {
78
- if structure , ok = structures [structuresKey ]; ! ok { //User[]可读取User或者User[]
79
+ if structure , ok = structures [structuresKey ]; ! ok { // User[]可读取User或者User[]
79
80
return gerror .New ("structure错误: 400, 缺少" + key )
80
81
}
81
82
}
@@ -158,7 +159,7 @@ func (a *Action) Result() (model.Map, error) {
158
159
return ret , err
159
160
}
160
161
161
- func checkTag (req model.Map , method string , requestCfg * config.ActionConfig ) (* config.Request , error ) {
162
+ func checkTag (req model.Map , method string , requestCfg * config.ActionConfig ) (* config.RequestConfig , error ) {
162
163
_tag , ok := req ["tag" ]
163
164
if ! ok {
164
165
return nil , gerror .New ("tag 缺失" )
0 commit comments