2023-01-18 09:03:15 +00:00
|
|
|
package controller
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"fmt"
|
|
|
|
|
2023-02-06 01:33:09 +00:00
|
|
|
"github.com/fonchain/fonchain-artistinfo/cmd/internal/logic"
|
|
|
|
"github.com/fonchain/fonchain-artistinfo/pb/artistinfo"
|
2023-01-18 09:03:15 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type ArtistInfoProvider struct {
|
|
|
|
artistinfo.UnimplementedArtistInfoServer
|
|
|
|
artistInfoLogic *logic.ArtistInfo
|
|
|
|
}
|
|
|
|
|
2023-02-02 06:10:24 +00:00
|
|
|
func (a *ArtistInfoProvider) RegisterUser(ctx context.Context, req *artistinfo.RegisterUserRequest) (rep *artistinfo.RegisterUserRespond, err error) {
|
2023-01-18 09:03:15 +00:00
|
|
|
fmt.Println("第一处")
|
|
|
|
// backup := &artistInfo.GetUserInfoRespond{}
|
|
|
|
if rep, err = a.artistInfoLogic.RegisterUser(req); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return rep, nil
|
|
|
|
}
|
2023-02-15 01:39:14 +00:00
|
|
|
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
|
|
|
|
}
|
2023-01-18 09:03:15 +00:00
|
|
|
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
|
|
|
|
}
|
2023-02-15 01:39:14 +00:00
|
|
|
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
|
|
|
|
}
|
2023-01-18 09:03:15 +00:00
|
|
|
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
|
|
|
|
}
|
2023-02-02 06:10:24 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|
2023-02-15 01:39:14 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|