|
@@ -42,10 +42,13 @@ func Test_DocOff(t *testing.T) {
|
|
|
func Test_DocActivity(t *testing.T) {
|
|
|
ctx, _ := context.WithTimeout(context.Background(), 10*time.Second)
|
|
|
std := stdlibclient.NewStdlib(zrpc.MustNewClient(zrpc.RpcClientConf{Etcd: discov.EtcdConf{Hosts: []string{"192.168.3.240:2379"}, Key: "jydocs.stdlib.rpc"}}))
|
|
|
- req := &stdlib.DocActivityReq{PageNum: 1, PageSize: 10, AppId: "app_id_123"}
|
|
|
+ req := &stdlib.DocActivityReq{PageNum: 1, PageSize: 10, AppId: "10000", ActivityId: 3, UserId: "5e8eb60ae138234b4f91aacf"}
|
|
|
res, err := std.DocActivity(ctx, req)
|
|
|
log.Println("err ", err)
|
|
|
- log.Println("req ", res)
|
|
|
+ for _, v := range res.Docs {
|
|
|
+ log.Println("IsBuy ", v.IsBuy)
|
|
|
+ log.Println("date ", v.UploadDate)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
func Test_DocStatistics(t *testing.T) {
|
|
@@ -60,10 +63,10 @@ func Test_DocStatistics(t *testing.T) {
|
|
|
func Test_DocGetCheck(t *testing.T) {
|
|
|
ctx, _ := context.WithTimeout(context.Background(), 10*time.Second)
|
|
|
std := stdlibclient.NewStdlib(zrpc.MustNewClient(zrpc.RpcClientConf{Etcd: discov.EtcdConf{Hosts: []string{"192.168.3.240:2379"}, Key: "jydocs.stdlib.rpc"}}))
|
|
|
- req := &stdlib.DocGetCheckReq{DocId: "111", UserId: "123", AppId: "app_id_123"}
|
|
|
+ req := &stdlib.DocGetCheckReq{DocId: "001d00e2-887b-11eb-8699-0050568f51e7", UserId: "5e8eb60ae138234b4f91aacf", AppId: "10000"}
|
|
|
res, err := std.DocGetCheck(ctx, req)
|
|
|
log.Println("err ", err)
|
|
|
- log.Println("req ", res)
|
|
|
+ log.Println("req ", res.IsBuy)
|
|
|
}
|
|
|
|
|
|
func Test_DocGetContent(t *testing.T) {
|