info
This commit is contained in:
parent
ec4fe76856
commit
4005af2040
|
@ -152,12 +152,17 @@ type SubscriptionStatus struct {
|
||||||
} `json:"item_map"`
|
} `json:"item_map"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// UserProfile 个人信息
|
type UserAddress struct {
|
||||||
type UserProfile struct {
|
}
|
||||||
FirstName string `json:"first_name"`
|
|
||||||
LastName string `json:"last_name"`
|
// UserProfileBase 个人信息
|
||||||
Resetaurant string `json:"resetaurant"`
|
type UserProfileBase struct {
|
||||||
SubStatus SubscriptionStatus `json:"sub_status"`
|
Base struct {
|
||||||
|
FirstName string `json:"first_name"`
|
||||||
|
LastName string `json:"last_name"`
|
||||||
|
Resetaurant string `json:"resetaurant"`
|
||||||
|
} `json:"base"`
|
||||||
|
SubStatus SubscriptionStatus `json:"sub_status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// 自平台的注册流程
|
// 自平台的注册流程
|
||||||
|
@ -189,10 +194,16 @@ func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterT
|
||||||
|
|
||||||
// 继承guest_id的资源表
|
// 继承guest_id的资源表
|
||||||
err = InheritGuestIdResource(tx, user.Id, token.GuestId, func(txResouce, txUserMaterial, txUserInfo *gorm.DB) error {
|
err = InheritGuestIdResource(tx, user.Id, token.GuestId, func(txResouce, txUserMaterial, txUserInfo *gorm.DB) error {
|
||||||
userProfile := &UserProfile{
|
userProfile := &UserProfileBase{
|
||||||
FirstName: FirstName,
|
Base: struct {
|
||||||
LastName: LastName,
|
FirstName string "json:\"first_name\""
|
||||||
Resetaurant: Resetaurant,
|
LastName string "json:\"last_name\""
|
||||||
|
Resetaurant string "json:\"resetaurant\""
|
||||||
|
}{
|
||||||
|
FirstName: FirstName,
|
||||||
|
LastName: LastName,
|
||||||
|
Resetaurant: Resetaurant,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
metadata, err := json.Marshal(userProfile)
|
metadata, err := json.Marshal(userProfile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -157,10 +157,16 @@ func TestMain(t *testing.T) {
|
||||||
|
|
||||||
func TestCaseJSON_EXTRACT(t *testing.T) {
|
func TestCaseJSON_EXTRACT(t *testing.T) {
|
||||||
|
|
||||||
userProfile := &gmodel.UserProfile{
|
userProfile := &gmodel.UserProfileBase{
|
||||||
FirstName: "FirstName",
|
Base: struct {
|
||||||
LastName: "LastName",
|
FirstName string "json:\"first_name\""
|
||||||
Resetaurant: "Resetaurant",
|
LastName string "json:\"last_name\""
|
||||||
|
Resetaurant string "json:\"resetaurant\""
|
||||||
|
}{
|
||||||
|
FirstName: "FirstName",
|
||||||
|
LastName: "LastName",
|
||||||
|
Resetaurant: "Resetaurant",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
metadata, err := json.Marshal(userProfile)
|
metadata, err := json.Marshal(userProfile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -8,9 +8,12 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCase1(t *testing.T) {
|
func TestCase1(t *testing.T) {
|
||||||
u := gmodel.UserProfile{
|
u := gmodel.UserProfileBase{
|
||||||
FirstName: "h",
|
Base: struct {
|
||||||
LastName: "sm",
|
FirstName string "json:\"first_name\""
|
||||||
|
LastName string "json:\"last_name\""
|
||||||
|
Resetaurant string "json:\"resetaurant\""
|
||||||
|
}{},
|
||||||
}
|
}
|
||||||
|
|
||||||
conn := initalize.InitMysql("fsreaderwriter:XErSYmLELKMnf3Dh@tcp(fusen.cdmigcvz3rle.us-east-2.rds.amazonaws.com:3306)/fusen")
|
conn := initalize.InitMysql("fsreaderwriter:XErSYmLELKMnf3Dh@tcp(fusen.cdmigcvz3rle.us-east-2.rds.amazonaws.com:3306)/fusen")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user