auth_test.go 712 字节
package service

import (
	"fmt"
	"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
	"testing"
)

func TestAdminToken(t *testing.T) {
	domain.JWTExpiresSecond = 3600 * 24 * 365
	userAuth := &domain.UserAuth{
		UserId:     3325567738895360,
		CompanyId:  507,
		Phone:      "18559023318",
		PlatformId: 28,
		Name:       "庄敏学",
		AdminType:  2,
	}
	fmt.Println(userAuth.CreateAccessToken())
}

func TestFontToken(t *testing.T) {
	domain.JWTExpiresSecond = 3600 * 24 * 365
	userAuth := &domain.UserAuth{
		UserId:     3325567738895360,
		CompanyId:  507,
		Phone:      "18559023318",
		PlatformId: 29,
		Name:       "庄敏学",
		AdminType:  2,
	}
	fmt.Println(userAuth.CreateAccessToken())
}