28169 1 vecka sedan
förälder
incheckning
1abd11ca3d
3 ändrade filer med 22 tillägg och 21 borttagningar
  1. Binär
      XT_New.exe
  2. 10 10
      controllers/base_api_controller.go
  3. 12 11
      controllers/fapiao_controller.go

Binär
XT_New.exe Visa fil


+ 10 - 10
controllers/base_api_controller.go Visa fil

@@ -72,10 +72,10 @@ func (this *BaseAuthAPIController) Prepare() {
72 72
 	this.BaseAPIController.Prepare()
73 73
 	if this.GetAdminUserInfo() == nil {
74 74
 		var userAdmin models.AdminUser
75
-		userAdmin.Id = 4522
75
+		userAdmin.Id = 3207
76 76
 		userAdmin.Mobile = "13318599895"
77 77
 
78
-		userAdmin.Id = 4522 //4,809
78
+		userAdmin.Id = 3207 //4,809
79 79
 		userAdmin.Mobile = "12222222222"
80 80
 		userAdmin.IsSuperAdmin = true
81 81
 		userAdmin.Status = 1
@@ -83,7 +83,7 @@ func (this *BaseAuthAPIController) Prepare() {
83 83
 		userAdmin.ModifyTime = 1530786071
84 84
 		var subscibe models.ServeSubscibe
85 85
 		subscibe.ID = 11
86
-		subscibe.OrgId = 10028 //机构id
86
+		subscibe.OrgId = 10721 //机构id
87 87
 		subscibe.PeriodStart = 1547447814
88 88
 		subscibe.PeriodEnd = 1550039814
89 89
 		subscibe.State = 1
@@ -93,8 +93,8 @@ func (this *BaseAuthAPIController) Prepare() {
93 93
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
94 94
 		subscibes[4] = &subscibe
95 95
 		var adminUserInfo service.AdminUserInfo
96
-		adminUserInfo.CurrentOrgId = 10028 //机构id小英9675或4
97
-		adminUserInfo.CurrentAppId = 12123 //4
96
+		adminUserInfo.CurrentOrgId = 10721 //机构id小英9675或4
97
+		adminUserInfo.CurrentAppId = 14655 //4
98 98
 		adminUserInfo.AdminUser = &userAdmin
99 99
 		adminUserInfo.Subscibes = subscibes
100 100
 		this.SetSession("admin_user_info", &adminUserInfo)
@@ -318,10 +318,10 @@ func (this *BaseServeAPIController) Prepare() {
318 318
 	this.BaseAPIController.Prepare()
319 319
 	if this.GetAdminUserInfo() == nil {
320 320
 		var userAdmin models.AdminUser
321
-		userAdmin.Id = 4522
321
+		userAdmin.Id = 3207
322 322
 		userAdmin.Mobile = "13318599895"
323 323
 
324
-		userAdmin.Id = 4522 //4,809
324
+		userAdmin.Id = 3207 //4,809
325 325
 		userAdmin.Mobile = "12222222222"
326 326
 		userAdmin.IsSuperAdmin = false
327 327
 		userAdmin.Status = 1
@@ -329,7 +329,7 @@ func (this *BaseServeAPIController) Prepare() {
329 329
 		userAdmin.ModifyTime = 1530786071
330 330
 		var subscibe models.ServeSubscibe
331 331
 		subscibe.ID = 11
332
-		subscibe.OrgId = 10028 //机构id小英9675或4
332
+		subscibe.OrgId = 10721 //机构id小英9675或4
333 333
 		subscibe.PeriodStart = 1538035409
334 334
 		subscibe.PeriodEnd = 1569571409
335 335
 		subscibe.State = 1
@@ -339,8 +339,8 @@ func (this *BaseServeAPIController) Prepare() {
339 339
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
340 340
 		subscibes[4] = &subscibe
341 341
 		var adminUserInfo service.AdminUserInfo
342
-		adminUserInfo.CurrentOrgId = 10028 //机构id小英9675或4
343
-		adminUserInfo.CurrentAppId = 12123 //4
342
+		adminUserInfo.CurrentOrgId = 10721 //机构id小英9675或4
343
+		adminUserInfo.CurrentAppId = 14655 //4
344 344
 		adminUserInfo.AdminUser = &userAdmin
345 345
 		adminUserInfo.Subscibes = subscibes
346 346
 		this.SetSession("admin_user_info", &adminUserInfo)

+ 12 - 11
controllers/fapiao_controller.go Visa fil

@@ -1,14 +1,6 @@
1 1
 package controllers
2 2
 
3 3
 import (
4
-	"XT_New/common"
5
-	"XT_New/enums"
6
-	"XT_New/invoice"
7
-	"XT_New/models"
8
-	"XT_New/models/bwfapiao"
9
-	"XT_New/service"
10
-	"XT_New/service/fapiao"
11
-	"XT_New/utils"
12 4
 	"bytes"
13 5
 	"crypto/md5"
14 6
 	"crypto/sha1"
@@ -17,8 +9,6 @@ import (
17 9
 	"encoding/json"
18 10
 	"errors"
19 11
 	"fmt"
20
-	"github.com/astaxie/beego"
21
-	"github.com/shopspring/decimal"
22 12
 	"io/ioutil"
23 13
 	"math"
24 14
 	"net/http"
@@ -26,6 +16,17 @@ import (
26 16
 	"strconv"
27 17
 	"strings"
28 18
 	"time"
19
+
20
+	"XT_New/common"
21
+	"XT_New/enums"
22
+	"XT_New/invoice"
23
+	"XT_New/models"
24
+	"XT_New/models/bwfapiao"
25
+	"XT_New/service"
26
+	"XT_New/service/fapiao"
27
+	"XT_New/utils"
28
+	"github.com/astaxie/beego"
29
+	"github.com/shopspring/decimal"
29 30
 )
30 31
 
31 32
 func FaPiaoApiRegistRouters() {
@@ -1370,7 +1371,7 @@ type AuthResponse struct {
1370 1371
 // GetAccessToken 获取登录授权的 access_token
1371 1372
 func GetAccessToken(apiURL, plainPassword, salt, clientID, clientSecret, username, orgAuthCode string) (AuthResponse, error) {
1372 1373
 	// 当前时间戳(毫秒级)
1373
-	timestamp := fmt.Sprintf("%d", time.Now().UnixMilli())
1374
+	timestamp := ""
1374 1375
 
1375 1376
 	// 密码加密:MD5 + SHA1
1376 1377
 	encryptedPassword := md5AndSha1(plainPassword + salt)