feat: add features

This commit is contained in:
Rogee
2024-11-29 20:28:37 +08:00
parent 3d7ee40a7a
commit d1a2a80859
8 changed files with 337 additions and 22 deletions

View File

@@ -4,8 +4,11 @@ import (
"testing"
"backend/common/service/model"
"backend/pkg/pg"
"backend/providers/wechat"
"git.ipao.vip/rogeecn/atom"
"github.com/jinzhu/copier"
)
func Test_GenModel(t *testing.T) {
@@ -14,3 +17,18 @@ func Test_GenModel(t *testing.T) {
t.Fatal(err)
}
}
func Test_GenModel2(t *testing.T) {
token := &wechat.AuthorizeAccessToken{
AccessToken: "123",
RefreshToken: "123",
ExpiresIn: 123,
Openid: "123",
Scope: "123",
}
var oauthInfo pg.UserOAuth
copier.Copy(&oauthInfo, token)
t.Logf("%+v", oauthInfo)
}