3 Commits

Author SHA1 Message Date
  lijianbin ff2e76c25c 优化 2 years ago
  lijianbin ffeaa39f0d 优化 2 years ago
  lijianbin db68a85a6b debug 2 years ago
5 changed files with 9 additions and 9 deletions
Unified View
  1. +2
    -2
      client.dotask.go
  2. +3
    -3
      client.dotask_test.go
  3. +1
    -1
      common.go
  4. +1
    -1
      go.mod
  5. +2
    -2
      go.sum

+ 2
- 2
client.dotask.go View File

@ -9,8 +9,8 @@ import (
// 完成单次任务 // 完成单次任务
func DoTask(dbname, siteid, userId, task_type string, url ...string) (bool, error) { func DoTask(dbname, siteid, userId, task_type string, url ...string) (bool, error) {
if dbname == "" || userId == "" || task_type == "" {
return false, errors.New("参数错误")
if dbname == "" || userId == "" || task_type == "" || siteid == "" {
return false, errors.New("参数不能为空")
} }
conn, err := rpc_server_conn(url...) conn, err := rpc_server_conn(url...)


+ 3
- 3
client.dotask_test.go View File

@ -7,8 +7,8 @@ import (
func Test_DoTask(t *testing.T) { func Test_DoTask(t *testing.T) {
dbname := "shop" dbname := "shop"
siteid := "1198881" siteid := "1198881"
userid := "19"
task_type := "phone"
userid := "532"
task_type := "vip"
list, err := DoTask(dbname,siteid,userid,task_type) list, err := DoTask(dbname,siteid,userid,task_type)
@ -20,7 +20,7 @@ func Test_DoCycleTask(t *testing.T) {
dbname := "shop" dbname := "shop"
siteid := "1198881" siteid := "1198881"
userid := "19" userid := "19"
task_id := "22"
task_id := "43"
task_category := "normal" task_category := "normal"
list, err := DoCycleTask(dbname,siteid,userid,task_id,task_category) list, err := DoCycleTask(dbname,siteid,userid,task_id,task_category)


+ 1
- 1
common.go View File

@ -1,7 +1,7 @@
package taskrpc package taskrpc
import ( import (
"git.tetele.net/tgo/conf"
"git.tetele.net/yueheng/conf"
) )
type Req struct { type Req struct {


+ 1
- 1
go.mod View File

@ -3,8 +3,8 @@ module git.tetele.net/tgo/taskrpc
go 1.17 go 1.17
require ( require (
git.tetele.net/tgo/conf v0.39.4
git.tetele.net/tgo/crypter v0.2.2 git.tetele.net/tgo/crypter v0.2.2
git.tetele.net/yueheng/conf v1.3.2
github.com/chai2010/protorpc v1.1.3 github.com/chai2010/protorpc v1.1.3
github.com/golang/protobuf v1.5.2 github.com/golang/protobuf v1.5.2
) )


+ 2
- 2
go.sum View File

@ -1,7 +1,7 @@
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 h1:YMQJh2Gj5Po4ZfelJUmXBKi01UbmtiSy3bmqRfnYQMo=
git.tetele.net/tgo/crypter v0.2.2/go.mod h1:vfvRLZA8+lHNgNXneOcgvVhDyuv25ZRb+C6xHOmXNx0= git.tetele.net/tgo/crypter v0.2.2/go.mod h1:vfvRLZA8+lHNgNXneOcgvVhDyuv25ZRb+C6xHOmXNx0=
git.tetele.net/yueheng/conf v1.3.2 h1:mkSShvXkfY0zBdaInRZZecifoQMRtGRf88kMPKyc3tY=
git.tetele.net/yueheng/conf v1.3.2/go.mod h1:xlp2rxZG7FFEkTx3F8yFLaaIYxvySRpm2b2mozQW2Ek=
github.com/chai2010/protorpc v1.1.3 h1:VJK5hIoZn0XCGol0GmbxZkUG6FbTI5LP2Lam6RVd15w= github.com/chai2010/protorpc v1.1.3 h1:VJK5hIoZn0XCGol0GmbxZkUG6FbTI5LP2Lam6RVd15w=
github.com/chai2010/protorpc v1.1.3/go.mod h1:/wO0kiyVdu7ug8dCMrA2yDr2vLfyhsLEuzLa9J2HJ+I= 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.0.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=


Loading…
Cancel
Save