Browse Source

用户属性增加company_id,department_id

master
guzeng 11 months ago
parent
commit
e654ef691e
3 changed files with 18 additions and 6 deletions
  1. +0
    -6
      common.go
  2. +16
    -0
      user.pb.go
  3. +2
    -0
      user.proto

+ 0
- 6
common.go View File

@ -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


+ 16
- 0
user.pb.go View File

@ -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"`


+ 2
- 0
user.proto View File

@ -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;
}
//


Loading…
Cancel
Save