Browse Source

优化

master
lijianbin 2 years ago
parent
commit
ffeaa39f0d
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      client.dotask.go
  2. +2
    -2
      client.dotask_test.go

+ 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...)


+ 2
- 2
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)


Loading…
Cancel
Save