package logic import ( "github.com/fonchain-artistserver/cmd/internal/dao" "github.com/fonchain-artistserver/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) 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) 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) { err = dao.ArtistSupplyList(int64(req.ID)) return }