fonchain-artistinfo/cmd/internal/logic/artistInfo.go

101 lines
3.8 KiB
Go
Raw Normal View History

2023-01-18 09:03:15 +00:00
package logic
import (
2023-02-15 01:39:14 +00:00
"fmt"
2023-02-06 01:33:09 +00:00
"github.com/fonchain/fonchain-artistinfo/cmd/internal/dao"
"github.com/fonchain/fonchain-artistinfo/pb/artistinfo"
2023-01-18 09:03:15 +00:00
)
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)
2023-02-15 01:39:14 +00:00
CreateUserInfo(req *artistinfo.CreateUserInfoRequest) (rep *artistinfo.CreateUserInfoRespond, err error)
//UpdateRealName(req *artistinfo.UpdateRealNameRequest) (rep *artistinfo.UpdateRealNameRespond, err error)
2023-01-18 09:03:15 +00:00
FinishVerify(req *artistinfo.FinishVerifyRequest) (rep *artistinfo.FinishVerifyRespond, err error)
CheckUserLock(req *artistinfo.CheckUserLockRequest) (rep *artistinfo.CheckUserLockRespond, err error)
2023-02-02 06:10:24 +00:00
ArtistSupplyList(req *artistinfo.ArtistSupplyListRequest) (rep *artistinfo.ArtistSupplyListRespond, err error)
2023-02-17 03:33:56 +00:00
FindUser(req *artistinfo.FindUserRequest) (rep *artistinfo.UserInfo, err error)
UpdateUserData(req *artistinfo.UserInfo) (rep *artistinfo.CommonNoParams, err error)
2023-01-18 09:03:15 +00:00
}
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
}
2023-02-15 01:39:14 +00:00
2023-01-18 09:03:15 +00:00
func (a *ArtistInfo) RegisterUser(req *artistinfo.RegisterUserRequest) (rep *artistinfo.RegisterUserRespond, err error) {
rep, err = dao.RegisterUser(req)
return
}
2023-02-15 01:39:14 +00:00
func (a *ArtistInfo) CreateUserInfo(req *artistinfo.CreateUserInfoRequest) (rep *artistinfo.CreateUserInfoRespond, err error) {
fmt.Println("第二处")
rep, err = dao.CreateUserInfo(req)
return
}
2023-01-18 09:03:15 +00:00
func (a *ArtistInfo) GetUserById(req *artistinfo.GetUserByIdRequest) (userInfo *artistinfo.GetUserByIdRespond, err error) {
userInfo, err = dao.GetUserById(req)
2023-01-18 09:03:15 +00:00
return
}
//func (a *ArtistInfo) UpdateRealName(req *artistinfo.UpdateRealNameRequest) (rep *artistinfo.UpdateRealNameRespond, err error) {
// rep, err = dao.UpdateRealName(req)
// return
//}
2023-01-18 09:03:15 +00:00
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) {
2023-02-17 03:33:56 +00:00
err = dao.CheckUserLock(int64(req.Id))
2023-01-18 09:03:15 +00:00
return
}
2023-02-02 06:10:24 +00:00
func (a *ArtistInfo) ArtistSupplyList(req *artistinfo.ArtistSupplyListRequest) (rep *artistinfo.ArtistSupplyListRespond, err error) {
2023-02-06 01:33:09 +00:00
rep, err = dao.ArtistSupplyList(req)
return
}
func (a *ArtistInfo) UserLock(req *artistinfo.UserLockRequest) (rep *artistinfo.UserLockRespond, err error) {
rep, err = dao.UserLock(req)
2023-02-02 06:10:24 +00:00
return
}
2023-02-15 01:39:14 +00:00
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
}
2023-02-17 03:33:56 +00:00
func (a *ArtistInfo) FindUser(req *artistinfo.FindUserRequest) (rep *artistinfo.UserInfo, err error) {
return dao.FindUser(req)
}
func (a *ArtistInfo) UpdateUserData(req *artistinfo.UserInfo) (rep *artistinfo.CommonNoParams, err error) {
rep, err = dao.UpdateUserData(req)
2023-02-22 05:37:50 +00:00
return
}
func (a *ArtistInfo) PreSaveArtistInfo(in *artistinfo.PreSaveArtistInfoData) (rep *artistinfo.CommonNoParams, err error) {
rep, err = dao.PreSaveArtistInfo(in)
return
}
func (a *ArtistInfo) GetPreSaveArtistInfo(in *artistinfo.GetPreSaveArtistInfoRequest) (res *artistinfo.PreSaveArtistInfoData, err error) {
res, err = dao.GetPreSaveArtistInfo(in)
return
2023-02-17 03:33:56 +00:00
}