refactor: localize protobuf definitions
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"context"
|
||||
"bsm/full/module/ec/mall/internal/logic/staff"
|
||||
pb "bsm/full/module/ec/mall/pb"
|
||||
"context"
|
||||
)
|
||||
|
||||
type StaffServer struct {
|
||||
@@ -21,17 +21,17 @@ func (s *StaffServer) Login(ctx context.Context, in *pb.LoginRequest) (*pb.Login
|
||||
}
|
||||
|
||||
// 获取工作人员列表
|
||||
func (s *StaffServer) Fetch(ctx context.Context, in *pb.FetchRequest) (*pb.StaffListReply, error) {
|
||||
func (s *StaffServer) Fetch(ctx context.Context, in *pb.MallFetchRequest) (*pb.StaffListReply, error) {
|
||||
return staff.Fetch(ctx, in)
|
||||
}
|
||||
|
||||
// 创建工作人员
|
||||
func (s *StaffServer) Create(ctx context.Context, in *pb.StaffItem) (*pb.StatusReply, error) {
|
||||
func (s *StaffServer) Create(ctx context.Context, in *pb.StaffItem) (*pb.IdentityStatusReply, error) {
|
||||
return staff.Create(ctx, in)
|
||||
}
|
||||
|
||||
// 删除工作人员
|
||||
func (s *StaffServer) Delete(ctx context.Context, in *pb.IdentRequest) (*pb.StatusReply, error) {
|
||||
func (s *StaffServer) Delete(ctx context.Context, in *pb.IdentRequest) (*pb.IdentityStatusReply, error) {
|
||||
return staff.Delete(ctx, in)
|
||||
}
|
||||
|
||||
@@ -41,11 +41,11 @@ func (s *StaffServer) GetProfile(ctx context.Context, in *pb.IdentRequest) (*pb.
|
||||
}
|
||||
|
||||
// 设置个人信息
|
||||
func (s *StaffServer) SetProfile(ctx context.Context, in *pb.StaffItem) (*pb.StatusReply, error) {
|
||||
func (s *StaffServer) SetProfile(ctx context.Context, in *pb.StaffItem) (*pb.IdentityStatusReply, error) {
|
||||
return staff.SetProfile(ctx, in)
|
||||
}
|
||||
|
||||
// 设置账号密码
|
||||
func (s *StaffServer) SetPassword(ctx context.Context, in *pb.SetAccountRequest) (*pb.StatusReply, error) {
|
||||
func (s *StaffServer) SetPassword(ctx context.Context, in *pb.SetAccountRequest) (*pb.IdentityStatusReply, error) {
|
||||
return staff.SetPassword(ctx, in)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user