|
@ -2,12 +2,6 @@ package userrpc |
|
|
|
|
|
|
|
|
import ( |
|
|
import ( |
|
|
"encoding/json" |
|
|
"encoding/json" |
|
|
"errors" |
|
|
|
|
|
"strconv" |
|
|
|
|
|
"time" |
|
|
|
|
|
|
|
|
|
|
|
"git.tetele.net/tgo/crypter" |
|
|
|
|
|
"github.com/golang/protobuf/proto" |
|
|
|
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -19,7 +13,7 @@ func Fans(site_id, dbname, user_id, business_id string, url ...string) error { |
|
|
|
|
|
|
|
|
conn, err := rpc_server_conn(url...) |
|
|
conn, err := rpc_server_conn(url...) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return nil, err |
|
|
|
|
|
|
|
|
return err |
|
|
} |
|
|
} |
|
|
defer conn.Close() |
|
|
defer conn.Close() |
|
|
|
|
|
|
|
@ -31,7 +25,7 @@ func Fans(site_id, dbname, user_id, business_id string, url ...string) error { |
|
|
|
|
|
|
|
|
data_json, err := json.Marshal(data) |
|
|
data_json, err := json.Marshal(data) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return nil, err |
|
|
|
|
|
|
|
|
return err |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
SetReqData(data) |
|
|
SetReqData(data) |
|
@ -41,10 +35,10 @@ func Fans(site_id, dbname, user_id, business_id string, url ...string) error { |
|
|
err = conn.Fans(req, res) |
|
|
err = conn.Fans(req, res) |
|
|
|
|
|
|
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return nil, err |
|
|
|
|
|
|
|
|
return err |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
_, err := GetResData(res) |
|
|
|
|
|
|
|
|
_, err = GetResData(res) |
|
|
|
|
|
|
|
|
return err |
|
|
return err |
|
|
} |
|
|
} |