package logic import ( "fmt" "github.com/fonchain/fonchain-artistinfo/cmd/internal/dao" "github.com/fonchain/fonchain-artistinfo/pb/artistinfo" ) type IArtistInfo interface { RegisterUser(req *artistinfo.RegisterUserRequest) (rep *artistinfo.RegisterUserRespond, err error) GetUserById(req *artistinfo.GetUserByIdRequest) (rep *artistinfo.GetUserByIdRespond, err error) GetUser(req *artistinfo.GetUserRequest) (rep *artistinfo.GetUserRespond, err error) CreateUserInfo(req *artistinfo.CreateUserInfoRequest) (rep *artistinfo.CreateUserInfoRespond, err error) UpdateRealName(req *artistinfo.UpdateRealNameRequest) (rep *artistinfo.UpdateRealNameRespond, err error) FinishVerify(req *artistinfo.FinishVerifyRequest) (rep *artistinfo.FinishVerifyRespond, err error) CheckUserLock(req *artistinfo.CheckUserLockRequest) (rep *artistinfo.CheckUserLockRespond, err error) ArtistSupplyList(req *artistinfo.ArtistSupplyListRequest) (rep *artistinfo.ArtistSupplyListRespond, err error) } func NewArtistInfo() IArtistInfo { return &ArtistInfo{} } type ArtistInfo struct{} func (a *ArtistInfo) GetUser(req *artistinfo.GetUserRequest) (rep *artistinfo.GetUserRespond, err error) { rep, err = dao.GetUser(req) return } func (a *ArtistInfo) RegisterUser(req *artistinfo.RegisterUserRequest) (rep *artistinfo.RegisterUserRespond, err error) { rep, err = dao.RegisterUser(req) return } func (a *ArtistInfo) CreateUserInfo(req *artistinfo.CreateUserInfoRequest) (rep *artistinfo.CreateUserInfoRespond, err error) { fmt.Println("第二处") rep, err = dao.CreateUserInfo(req) return } func (a *ArtistInfo) GetUserById(req *artistinfo.GetUserByIdRequest) (rep *artistinfo.GetUserByIdRespond, err error) { rep, err = dao.GetUserById(req) return } func (a *ArtistInfo) UpdateRealName(req *artistinfo.UpdateRealNameRequest) (rep *artistinfo.UpdateRealNameRespond, err error) { rep, err = dao.UpdateRealName(req) return } func (a *ArtistInfo) FinishVerify(req *artistinfo.FinishVerifyRequest) (rep *artistinfo.FinishVerifyRespond, err error) { rep, err = dao.FinishVerify(req) return } func (a *ArtistInfo) CheckUserLock(req *artistinfo.CheckUserLockRequest) (rep *artistinfo.CheckUserLockRespond, err error) { err = dao.CheckUserLock(int64(req.ID)) return } func (a *ArtistInfo) ArtistSupplyList(req *artistinfo.ArtistSupplyListRequest) (rep *artistinfo.ArtistSupplyListRespond, err error) { rep, err = dao.ArtistSupplyList(req) return } func (a *ArtistInfo) UserLock(req *artistinfo.UserLockRequest) (rep *artistinfo.UserLockRespond, err error) { rep, err = dao.UserLock(req) return } func (a *ArtistInfo) CheckInvitedCode(req *artistinfo.CheckInvitedCodeRequest) (rep *artistinfo.GetUserRespond, err error) { rep, err = dao.CheckInvitedCode(req) return } func (a *ArtistInfo) UnFinishList(req *artistinfo.UnFinishListRequest) (rep *artistinfo.UnFinishListRespond, err error) { rep, err = dao.UnFinishList(req) return } func (a *ArtistInfo) GetUserMsg(req *artistinfo.GetUserMsgRequest) (rep *artistinfo.GetUserMsgRespond, err error) { rep, err = dao.GetUserMsg(req) return }