Browse Source

first commit

master
listen 2 years ago
parent
commit
76415f46c9
5 changed files with 19 additions and 5 deletions
  1. +1
    -1
      common.go
  2. +1
    -1
      go.mod
  3. +3
    -2
      go.sum
  4. +13
    -0
      user.client_test.go
  5. +1
    -1
      user.proto

+ 1
- 1
common.go View File

@ -3,7 +3,7 @@ package userrpc
import (
"log"
"git.tetele.net/tgo/conf"
"git.tetele.net/yueheng/conf"
)
const DES_KEY = "usersrpc"


+ 1
- 1
go.mod View File

@ -3,7 +3,7 @@ module git.tetele.net/tgo/userrpc
go 1.14
require (
git.tetele.net/tgo/conf v0.33.1
git.tetele.net/yueheng/conf v1.2.6
git.tetele.net/tgo/crypter v0.2.2
github.com/chai2010/protorpc v1.1.3
github.com/golang/protobuf v1.0.0


+ 3
- 2
go.sum View File

@ -1,7 +1,8 @@
git.tetele.net/tgo/conf v0.33.1 h1:ZEIv3Vq35RCv5f3T3Uz97s2mkZLl7W5OlmXvzI3/sS8=
git.tetele.net/tgo/conf v0.33.1/go.mod h1:AWVIBEDE5dtotthUgR0SWaR2Qa6/f+O5WQ3s7Tj8q7A=
git.tetele.net/tgo/crypter v0.2.2 h1:YMQJh2Gj5Po4ZfelJUmXBKi01UbmtiSy3bmqRfnYQMo=
git.tetele.net/tgo/crypter v0.2.2/go.mod h1:vfvRLZA8+lHNgNXneOcgvVhDyuv25ZRb+C6xHOmXNx0=
git.tetele.net/yueheng/conf v0.33.1 h1:ZEIv3Vq35RCv5f3T3Uz97s2mkZLl7W5OlmXvzI3/sS8=
git.tetele.net/yueheng/conf v0.33.1/go.mod h1:AWVIBEDE5dtotthUgR0SWaR2Qa6/f+O5WQ3s7Tj8q7A=
git.tetele.net/yueheng/conf v1.2.6/go.mod h1:qRujMTqjMByvdC05qdfscZMFRKM5XA1qbtz4rnFyStY=
github.com/chai2010/protorpc v1.1.3 h1:VJK5hIoZn0XCGol0GmbxZkUG6FbTI5LP2Lam6RVd15w=
github.com/chai2010/protorpc v1.1.3/go.mod h1:/wO0kiyVdu7ug8dCMrA2yDr2vLfyhsLEuzLa9J2HJ+I=
github.com/golang/protobuf v1.0.0 h1:lsek0oXi8iFE9L+EXARyHIjU5rlWIhhTkjDz3vHhWWQ=


+ 13
- 0
user.client_test.go View File

@ -48,3 +48,16 @@ func Test_UpdateUserCache(t *testing.T){
t.Log(res)
}
func Test_GetById(t *testing.T){
dbname := "shop"
siteId := "1198881"
res,err := GetById(siteId,dbname,"6")
if err != nil {
t.Error(err.Error())
}
t.Log(res)
}

+ 1
- 1
user.proto View File

@ -96,7 +96,7 @@ service UserService {
rpc getUserThird(Request) returns (Response); // v2
rpc getBusiness(Request) returns (Response); //
rpc getById(Request) returns (Response); //
rpc updateUserCache(Request) returns (Response); //
rpc updateUserCache(Request) returns (Response); //
rpc getBusinessInfo(Request) returns (Response); //
rpc getAddressInfo(Request) returns (Response); //
rpc getUserScore(Request) returns (Response); //


Loading…
Cancel
Save