123456789101112131415161718192021222324252627282930313233 |
- // Copyright 2019 getensh.com. All rights reserved.
- // Use of this source code is governed by getensh.com.
- package impl
- import (
- "context"
- "property-management/impl/v1/user"
- "property-management/pb"
- pb_v1 "property-management/pb/v1"
- "git.getensh.com/common/gopkgs/tasker/rpctasker"
- "google.golang.org/grpc"
- )
- // 具体实现
- type Rcvr struct {
- }
- func Register(s *grpc.Server) {
- pb.RegisterManagementServer(s, &Rcvr{})
- }
- // 系统用户登录
- func (c *Rcvr) Login(ctx context.Context, req *pb_v1.LoginRequest) (reply *pb_v1.LoginReply, err error) {
- t1 := func() error {
- reply, err = user.Login(ctx, req)
- return err
- }
- return reply, rpctasker.Exec(ctx, t1)
- }
|