|
@@ -2,6 +2,8 @@ package controllers
|
2
|
2
|
|
3
|
3
|
import (
|
4
|
4
|
"SCRM/enums"
|
|
5
|
+ "SCRM/models"
|
|
6
|
+ "SCRM/service/admin_service"
|
5
|
7
|
)
|
6
|
8
|
|
7
|
9
|
type BaseAPIController struct {
|
|
@@ -51,8 +53,33 @@ type BaseAuthAPIController struct {
|
51
|
53
|
func (this *BaseAuthAPIController) Prepare() {
|
52
|
54
|
this.BaseAPIController.Prepare()
|
53
|
55
|
if this.GetAdminUserInfo() == nil {
|
54
|
|
- this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeNotLogin)
|
55
|
|
- this.StopRun()
|
|
56
|
+ var userAdmin models.AdminUser
|
|
57
|
+ userAdmin.Id = 380
|
|
58
|
+ userAdmin.Mobile = "13532250447"
|
|
59
|
+ userAdmin.IsSuperAdmin = true
|
|
60
|
+ userAdmin.Status = 1
|
|
61
|
+ userAdmin.CreateTime = 1530786071
|
|
62
|
+ userAdmin.ModifyTime = 1530786071
|
|
63
|
+ var subscibe models.ServeSubscibe
|
|
64
|
+ subscibe.ID = 1
|
|
65
|
+ subscibe.OrgId = 4
|
|
66
|
+ subscibe.PeriodStart = 1538035409
|
|
67
|
+ subscibe.PeriodEnd = 1569571409
|
|
68
|
+ subscibe.State = 1
|
|
69
|
+ subscibe.Status = 1
|
|
70
|
+ subscibe.CreatedTime = 1538035409
|
|
71
|
+ subscibe.UpdatedTime = 1538035409
|
|
72
|
+ subscibes := make(map[int64]*models.ServeSubscibe, 0)
|
|
73
|
+ subscibes[4] = &subscibe
|
|
74
|
+ var adminUserInfo admin_service.AdminUserInfo
|
|
75
|
+ adminUserInfo.CurrentOrgId = 4
|
|
76
|
+ adminUserInfo.CurrentAppId = 5
|
|
77
|
+ adminUserInfo.AdminUser = &userAdmin
|
|
78
|
+ adminUserInfo.Subscibes = subscibes
|
|
79
|
+ this.SetSession("admin_user_info", &adminUserInfo)
|
|
80
|
+
|
|
81
|
+ //this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeNotLogin)
|
|
82
|
+ //this.StopRun()
|
56
|
83
|
}
|
57
|
84
|
}
|
58
|
85
|
|