package controller import ( "context" "fmt" "github.com/fonchain/fonchain-artistinfo/cmd/internal/logic" "github.com/fonchain/fonchain-artistinfo/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) CreateUserInfo(ctx context.Context, req *artistinfo.CreateUserInfoRequest) (rep *artistinfo.CreateUserInfoRespond, err error) { fmt.Println("第一处") // backup := &artistInfo.GetUserInfoRespond{} if rep, err = a.artistInfoLogic.CreateUserInfo(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) GetUserById(ctx context.Context, req *artistinfo.GetUserByIdRequest) (rep *artistinfo.GetUserByIdRespond, err error) { fmt.Println("第一处") // backup := &artistInfo.GetUserInfoRespond{} if rep, err = a.artistInfoLogic.GetUserById(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 } func (a *ArtistInfoProvider) ArtistSupplyList(ctx context.Context, req *artistinfo.ArtistSupplyListRequest) (rep *artistinfo.ArtistSupplyListRespond, err error) { fmt.Println("第一处") // backup := &artistInfo.GetUserInfoRespond{} if rep, err = a.artistInfoLogic.ArtistSupplyList(req); err != nil { return nil, err } return rep, nil } func (a *ArtistInfoProvider) CheckInvitedCode(ctx context.Context, req *artistinfo.CheckInvitedCodeRequest) (rep *artistinfo.GetUserRespond, err error) { fmt.Println("第一处") // backup := &artistInfo.CheckInvitedCodeInfoRespond{} if rep, err = a.artistInfoLogic.CheckInvitedCode(req); err != nil { return nil, err } return rep, nil } func (a *ArtistInfoProvider) UnFinishList(ctx context.Context, req *artistinfo.UnFinishListRequest) (rep *artistinfo.UnFinishListRespond, err error) { fmt.Println("第一处") // backup := &artistInfo.UnFinishListInfoRespond{} if rep, err = a.artistInfoLogic.UnFinishList(req); err != nil { return nil, err } return rep, nil } func (a *ArtistInfoProvider) GetUserMsg(ctx context.Context, req *artistinfo.GetUserMsgRequest) (rep *artistinfo.GetUserMsgRespond, err error) { fmt.Println("第一处") // backup := &artistInfo.GetUserMsgInfoRespond{} if rep, err = a.artistInfoLogic.GetUserMsg(req); err != nil { return nil, err } return rep, nil }