|
@@ -2,6 +2,9 @@ package controllers |
|
@@ -2,6 +2,9 @@ package controllers |
2
|
|
2
|
|
3
|
import (
|
3
|
import (
|
4
|
"fmt"
|
4
|
"fmt"
|
|
|
5
|
+ "io"
|
|
|
6
|
+ "path/filepath"
|
|
|
7
|
+
|
5
|
"github.com/linmadan/egglib-go/core/application"
|
8
|
"github.com/linmadan/egglib-go/core/application"
|
6
|
"github.com/linmadan/egglib-go/utils/json"
|
9
|
"github.com/linmadan/egglib-go/utils/json"
|
7
|
"github.com/linmadan/egglib-go/web/beego"
|
10
|
"github.com/linmadan/egglib-go/web/beego"
|
|
@@ -9,8 +12,6 @@ import ( |
|
@@ -9,8 +12,6 @@ import ( |
9
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
|
12
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
|
10
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
|
13
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
|
11
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/middleware"
|
14
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/middleware"
|
12
|
- "io"
|
|
|
13
|
- "path/filepath"
|
|
|
14
|
)
|
15
|
)
|
15
|
|
16
|
|
16
|
type BaseController struct {
|
17
|
type BaseController struct {
|
|
@@ -59,21 +60,21 @@ func (controller *BaseController) Response(data interface{}, err error) { |
|
@@ -59,21 +60,21 @@ func (controller *BaseController) Response(data interface{}, err error) { |
59
|
controller.ServeJSON()
|
60
|
controller.ServeJSON()
|
60
|
}
|
61
|
}
|
61
|
|
62
|
|
62
|
-func (controller *BaseController) GetUserId() int64 {
|
|
|
63
|
- return 1
|
|
|
64
|
-}
|
63
|
+// func (controller *BaseController) GetUserId() int64 {
|
|
|
64
|
+// return 1
|
|
|
65
|
+// }
|
65
|
|
66
|
|
66
|
-func (controller *BaseController) GetCompanyId() int64 {
|
|
|
67
|
- return 1
|
|
|
68
|
-}
|
67
|
+// func (controller *BaseController) GetCompanyId() int64 {
|
|
|
68
|
+// return 1
|
|
|
69
|
+// }
|
69
|
|
70
|
|
70
|
-func (controller *BaseController) GetUserBaseId() int64 {
|
|
|
71
|
- return 1
|
|
|
72
|
-}
|
71
|
+// func (controller *BaseController) GetUserBaseId() int64 {
|
|
|
72
|
+// return 1
|
|
|
73
|
+// }
|
73
|
|
74
|
|
74
|
-func (controller *BaseController) GetOrgId() int64 {
|
|
|
75
|
- return 1
|
|
|
76
|
-}
|
75
|
+// func (controller *BaseController) GetOrgId() int64 {
|
|
|
76
|
+// return 1
|
|
|
77
|
+// }
|
77
|
|
78
|
|
78
|
func (controller *BaseController) GetOperator() domain.Operator {
|
79
|
func (controller *BaseController) GetOperator() domain.Operator {
|
79
|
token := controller.Ctx.Input.Header("X-Mmm-Accesstoken")
|
80
|
token := controller.Ctx.Input.Header("X-Mmm-Accesstoken")
|