78 lines
2.5 KiB
Go
78 lines
2.5 KiB
Go
package controller
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
|
|
"github.com/fonchain-artistserver/cmd/internal/logic"
|
|
artistInfo "github.com/fonchain-artistserver/pb/artistinfo"
|
|
)
|
|
|
|
type ArtistInfoProvider struct {
|
|
artistInfo.UnimplementedArtistInfoServer
|
|
artistInfoLogic *logic.ArtistInfo
|
|
}
|
|
|
|
func (a *ArtistInfoProvider) GetUserInfo(ctx context.Context, req *artistInfo.GetUserInfoRequest) (rep *artistInfo.GetUserInfoRespond, err error) {
|
|
fmt.Println("第一处")
|
|
// backup := &artistInfo.GetUserInfoRespond{}
|
|
if rep, err = a.artistInfoLogic.GetUserInfo(req); err != nil {
|
|
return nil, err
|
|
}
|
|
return rep, nil
|
|
}
|
|
|
|
func (a *ArtistInfoProvider) CreateUserInfo(ctx context.Context, req *artistInfo.UserInfoCommonRequest) (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) UpdateUserInfo(ctx context.Context, req *artistInfo.UserInfoCommonRequest) (rep *artistInfo.UpdateUserInfoRespond, err error) {
|
|
fmt.Println("第一处")
|
|
// backup := &artistInfo.GetUserInfoRespond{}
|
|
if rep, err = a.artistInfoLogic.UpdateUserInfo(req); err != nil {
|
|
return nil, err
|
|
}
|
|
return rep, nil
|
|
}
|
|
|
|
func (a *ArtistInfoProvider) UserUpdateTel(ctx context.Context, req *artistInfo.UserUpdateTelRequest) (rep *artistInfo.UserUpdateTelRespond, err error) {
|
|
fmt.Println("第一处")
|
|
// backup := &artistInfo.GetUserInfoRespond{}
|
|
if rep, err = a.artistInfoLogic.UserUpdateTel(req); err != nil {
|
|
return nil, err
|
|
}
|
|
return rep, nil
|
|
}
|
|
|
|
func (a *ArtistInfoProvider) UserUpdateMsg(ctx context.Context, req *artistInfo.UserInfoCommonRequest) (rep *artistInfo.UserUpdateMsgRespond, err error) {
|
|
fmt.Println("第一处")
|
|
// backup := &artistInfo.GetUserInfoRespond{}
|
|
if rep, err = a.artistInfoLogic.UserUpdateMsg(req); err != nil {
|
|
return nil, err
|
|
}
|
|
return rep, nil
|
|
}
|
|
|
|
func (a *ArtistInfoProvider) Verifyfdd(ctx context.Context, req *artistInfo.VerifyfddRequest) (rep *artistInfo.VerifyfddRespond, err error) {
|
|
fmt.Println("第一处")
|
|
// backup := &artistInfo.GetUserInfoRespond{}
|
|
if rep, err = a.artistInfoLogic.Verifyfdd(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
|
|
}
|