48 lines
1.3 KiB
Go
48 lines
1.3 KiB
Go
|
|
// Code generated by protoc-gen-slc. DO NOT EDIT.
|
|||
|
|
package server
|
|||
|
|
|
|||
|
|
import (
|
|||
|
|
"context"
|
|||
|
|
|
|||
|
|
"git.apinb.com/bsm-sdk/sample/internal/logic/account"
|
|||
|
|
pb "git.apinb.com/bsm-sdk/sample/pb"
|
|||
|
|
)
|
|||
|
|
|
|||
|
|
type AccountServer struct {
|
|||
|
|
pb.UnimplementedAccountServer
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
func NewAccountServer() *AccountServer {
|
|||
|
|
return &AccountServer{}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 通过会员所有信息
|
|||
|
|
func (s *AccountServer) Get(ctx context.Context, in *pb.Empty) (*pb.GetFullReply, error) {
|
|||
|
|
return account.Get(ctx, in)
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 更新会员的信息数据,字段值为空或是0,将不更新此数据
|
|||
|
|
func (s *AccountServer) SetData(ctx context.Context, in *pb.SetDataRequest) (*pb.StatusReply, error) {
|
|||
|
|
return account.SetData(ctx, in)
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 更新会员的密码
|
|||
|
|
func (s *AccountServer) SetPassword(ctx context.Context, in *pb.SetPasswordRequest) (*pb.StatusReply, error) {
|
|||
|
|
return account.SetPassword(ctx, in)
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 新增标签
|
|||
|
|
func (s *AccountServer) TagCreate(ctx context.Context, in *pb.TagItem) (*pb.StatusReply, error) {
|
|||
|
|
return account.TagCreate(ctx, in)
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 删除标签
|
|||
|
|
func (s *AccountServer) TagRemove(ctx context.Context, in *pb.IdentRequest) (*pb.StatusReply, error) {
|
|||
|
|
return account.TagRemove(ctx, in)
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 获取会员的相关统计数据
|
|||
|
|
func (s *AccountServer) Statistics(ctx context.Context, in *pb.StatisticsRequest) (*pb.StatisticsReply, error) {
|
|||
|
|
return account.Statistics(ctx, in)
|
|||
|
|
}
|