diff --git a/business/partner/purchase/jdshop/order_test.go b/business/partner/purchase/jdshop/order_test.go new file mode 100644 index 000000000..8ab027ba6 --- /dev/null +++ b/business/partner/purchase/jdshop/order_test.go @@ -0,0 +1,49 @@ +package jdshop + +import ( + "git.rosy.net.cn/baseapi/platformapi/jdshopapi" + "git.rosy.net.cn/jx-callback/business/jxutils/jxcontext" + "git.rosy.net.cn/jx-callback/business/partner" + "git.rosy.net.cn/jx-callback/business/partner/putils" + "reflect" + "testing" +) + +func TestPurchaseHandler_GetJdsOrders(t *testing.T) { + type fields struct { + BasePurchasePlatform partner.BasePurchasePlatform + DefSingleStorePlatform putils.DefSingleStorePlatform + } + type args struct { + ctx *jxcontext.Context + orderCreatedStart string + orderCreatedEnd string + current int + pageSize int + } + tests := []struct { + name string + fields fields + args args + wantOrderResult *jdshopapi.AllOrdersResult + wantErr bool + }{ + // TODO: Add test cases. + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + p := &PurchaseHandler{ + BasePurchasePlatform: tt.fields.BasePurchasePlatform, + DefSingleStorePlatform: tt.fields.DefSingleStorePlatform, + } + gotOrderResult, err := p.GetJdsOrders(tt.args.ctx, tt.args.orderCreatedStart, tt.args.orderCreatedEnd, tt.args.current, tt.args.pageSize) + if (err != nil) != tt.wantErr { + t.Errorf("GetJdsOrders() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(gotOrderResult, tt.wantOrderResult) { + t.Errorf("GetJdsOrders() gotOrderResult = %v, want %v", gotOrderResult, tt.wantOrderResult) + } + }) + } +} diff --git a/conf/app.conf b/conf/app.conf index 7d3188cf9..8689b1cba 100644 --- a/conf/app.conf +++ b/conf/app.conf @@ -157,7 +157,7 @@ jdAppKey = "1dba76d40cac446ca500c0391a0b6c9d" jdSecret = "a88d031a1e7b462cb1579f12e97fe7f4" jd2OrgCode = "349454" -jd2Token = "c0615403-82a0-4226-acad-9f3af682399d" +jd2Token = "7b5f8858-5cd6-493e-a0e1-56c0929396af" jd2AppKey = "7fb947624ff847ae94ff2f068cc99652" jd2Secret = "1097abd7ef09427099b4922784af123a"