diff --git a/common.go b/common.go index 2fce7f8..18019e6 100644 --- a/common.go +++ b/common.go @@ -1,8 +1,6 @@ package userrpc import ( - "log" - "git.tetele.net/tgo/conf" ) @@ -74,8 +72,6 @@ type FansReq struct { func rpc_server_conn(url ...string) (*UserServiceClient, error) { - log.Println("userpc rpc_server_conn----", url) - var rpc_url string if len(url) > 0 && url[0] != "" { rpc_url = url[0] @@ -85,8 +81,6 @@ func rpc_server_conn(url ...string) (*UserServiceClient, error) { rpc_url = "127.0.0.1:" + conf.USER_RPC_PORT } - log.Println("userpc rpc_url----", rpc_url) - conn, _, err := DialUserService("tcp", rpc_url) if err != nil { return nil, err diff --git a/user.pb.go b/user.pb.go index 81623a0..890e0eb 100644 --- a/user.pb.go +++ b/user.pb.go @@ -153,6 +153,8 @@ type UserResponse struct { ThirdId *string `protobuf:"bytes,14,opt,name=third_id" json:"third_id,omitempty"` Platform *string `protobuf:"bytes,15,opt,name=platform" json:"platform,omitempty"` LockFans *string `protobuf:"bytes,16,opt,name=lock_fans" json:"lock_fans,omitempty"` + CompanyId *string `protobuf:"bytes,17,opt,name=company_id" json:"company_id,omitempty"` + DepartmentId *string `protobuf:"bytes,18,opt,name=department_id" json:"department_id,omitempty"` XXX_unrecognized []byte `json:"-"` } @@ -272,6 +274,20 @@ func (m *UserResponse) GetLockFans() string { return "" } +func (m *UserResponse) GetCompanyId() string { + if m != nil && m.CompanyId != nil { + return *m.CompanyId + } + return "" +} + +func (m *UserResponse) GetDepartmentId() string { + if m != nil && m.DepartmentId != nil { + return *m.DepartmentId + } + return "" +} + // 用户登录请求结构 type LoginRequest struct { Dbname *string `protobuf:"bytes,1,opt,name=dbname" json:"dbname,omitempty"` diff --git a/user.proto b/user.proto index 816c09a..6fbbbdc 100644 --- a/user.proto +++ b/user.proto @@ -40,6 +40,8 @@ message UserResponse { string third_id = 14; //token对应的third_id string platform = 15; //平台 string lock_fans = 16; //锁定 + string company_id = 17; + string department_id =18; } // 用户登录请求结构