Browse Source

修改升级店长字段标识

master v0.1.1
lijianbin 3 years ago
parent
commit
afe2970a3e
4 changed files with 94 additions and 0 deletions
  1. +17
    -0
      client.dotask_test.go
  2. +34
    -0
      common.go
  3. +16
    -0
      go.mod
  4. +27
    -0
      go.sum

+ 17
- 0
client.dotask_test.go View File

@ -0,0 +1,17 @@
package taskrpc
import (
"testing"
)
func Test_DoTask(t *testing.T) {
dbname := "shop_v2_org"
siteid := ""
userid := "2"
task_type := "phone"
list, err := DoTask(dbname,siteid,userid,task_type)
t.Log(list)
t.Log(err)
}

+ 34
- 0
common.go View File

@ -0,0 +1,34 @@
package taskrpc
import (
"git.tetele.net/tgo/conf"
)
type Req struct {
SiteId string
Dbname string
}
type Res struct {
Errcode int
Errmsg string
}
func rpc_server_conn(url ...string) (*TaskServiceClient, error) {
var rpc_url string
if len(url) > 0 && url[0] != "" {
rpc_url = url[0]
} else if conf.TASK_RPC_URL != "" {
rpc_url = conf.TASK_RPC_URL
} else {
rpc_url = "127.0.0.1:" + conf.TASK_RPC_PORT
}
conn, _, err := DialTaskService("tcp", rpc_url)
if err != nil {
return nil, err
}
return conn, nil
}

+ 16
- 0
go.mod View File

@ -0,0 +1,16 @@
module git.tetele.net/tgo/taskrpc
go 1.17
require (
git.tetele.net/tgo/conf v0.39.4
git.tetele.net/tgo/crypter v0.2.2
github.com/chai2010/protorpc v1.1.3
github.com/golang/protobuf v1.5.2
)
require (
github.com/golang/snappy v0.0.3 // indirect
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
google.golang.org/protobuf v1.26.0 // indirect
)

+ 27
- 0
go.sum View File

@ -0,0 +1,27 @@
git.tetele.net/tgo/conf v0.39.4 h1:tkhb9+i1QC8CW81VuTCR2f4VpS2oR23WbhxmIePo0Ak=
git.tetele.net/tgo/conf v0.39.4/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=
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/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA=
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=

Loading…
Cancel
Save