60 lines
1.9 KiB
Go
60 lines
1.9 KiB
Go
|
package controller
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"fmt"
|
||
|
|
||
|
"github.com/fonchain-artistserver/cmd/internal/logic"
|
||
|
"github.com/fonchain-artistserver/pb/artistinfo"
|
||
|
)
|
||
|
|
||
|
type ArtistInfoProvider struct {
|
||
|
artistinfo.UnimplementedArtistInfoServer
|
||
|
artistInfoLogic *logic.ArtistInfo
|
||
|
}
|
||
|
|
||
|
func (a *ArtistInfoProvider) registerUser(ctx context.Context, req *artistinfo.RegisterUserRequest) (rep *artistinfo.RegisterUserRespond, err error) {
|
||
|
fmt.Println("第一处")
|
||
|
// backup := &artistInfo.GetUserInfoRespond{}
|
||
|
if rep, err = a.artistInfoLogic.RegisterUser(req); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return rep, nil
|
||
|
}
|
||
|
|
||
|
func (a *ArtistInfoProvider) GetUser(ctx context.Context, req *artistinfo.GetUserRequest) (rep *artistinfo.GetUserRespond, err error) {
|
||
|
fmt.Println("第一处")
|
||
|
// backup := &artistInfo.GetUserInfoRespond{}
|
||
|
if rep, err = a.artistInfoLogic.GetUser(req); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return rep, nil
|
||
|
}
|
||
|
|
||
|
func (a *ArtistInfoProvider) UpdateRealName(ctx context.Context, req *artistinfo.UpdateRealNameRequest) (rep *artistinfo.UpdateRealNameRespond, err error) {
|
||
|
fmt.Println("第一处")
|
||
|
// backup := &artistInfo.GetUserInfoRespond{}
|
||
|
if rep, err = a.artistInfoLogic.UpdateRealName(req); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return rep, nil
|
||
|
}
|
||
|
|
||
|
func (a *ArtistInfoProvider) FinishVerify(ctx context.Context, req *artistinfo.FinishVerifyRequest) (rep *artistinfo.FinishVerifyRespond, err error) {
|
||
|
fmt.Println("第一处")
|
||
|
// backup := &artistInfo.GetUserInfoRespond{}
|
||
|
if rep, err = a.artistInfoLogic.FinishVerify(req); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return rep, nil
|
||
|
}
|
||
|
|
||
|
func (a *ArtistInfoProvider) CheckUserLock(ctx context.Context, req *artistinfo.CheckUserLockRequest) (rep *artistinfo.CheckUserLockRespond, err error) {
|
||
|
fmt.Println("第一处")
|
||
|
// backup := &artistInfo.GetUserInfoRespond{}
|
||
|
if rep, err = a.artistInfoLogic.CheckUserLock(req); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return rep, nil
|
||
|
}
|