1
This commit is contained in:
@@ -45,7 +45,7 @@ import (
|
||||
//}
|
||||
//
|
||||
func TestCancel(t *testing.T) {
|
||||
cancelResponse, err := dadaapi.CancelOrder("1100551162883899675", ReasonIDOther, "协商一致")
|
||||
cancelResponse, err := dadaapi.CancelOrder("1100632781686164762", ReasonIDOther, "协商一致")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ func TestRetailDiscountBatchSave(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRetailDiscountList(t *testing.T) {
|
||||
result, err := api.RetailDiscountList("8694203", RetailActTypeSecKill)
|
||||
result, err := api.RetailDiscountList("9202390", RetailActTypeSecKill)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@ import (
|
||||
|
||||
func TestBillList(t *testing.T) {
|
||||
now := time.Now()
|
||||
from := time.Date(now.Year(), now.Month(), now.Day()-8, 0, 0, 0, 0, time.Local)
|
||||
to := time.Date(now.Year(), now.Month(), now.Day()-2, 23, 59, 59, 59, time.Local)
|
||||
from := time.Date(now.Year(), now.Month(), now.Day()-7, 0, 0, 0, 0, time.Local)
|
||||
to := time.Date(now.Year(), now.Month(), now.Day()-1, 23, 59, 59, 59, time.Local)
|
||||
param := &Bill{
|
||||
AppPoiCode: "7379574",
|
||||
AppPoiCode: "9202390",
|
||||
StartDate: from.Unix(),
|
||||
EndDate: to.Unix(),
|
||||
Offset: 0,
|
||||
|
||||
@@ -247,6 +247,10 @@ func (a *API) QueryBillList(req *request591.AlibabaWdkBillListRequest) (*domain5
|
||||
globals.SugarLogger.Debugf("requestId[%s],err[%s]", data.RequestId, utils.Format4Output(data, false))
|
||||
return nil, fmt.Errorf(*data.ApiResult.ErrMsg)
|
||||
}
|
||||
kk := *data.ApiResult.Model
|
||||
for _, v := range *kk.TxdBillDetailBOS {
|
||||
globals.SugarLogger.Debugf("kk := %s -- %s == %s", utils.Format4Output(v.BizOrderId, false), *v.OrderType, *v.ReceivableAmount)
|
||||
}
|
||||
|
||||
return data.ApiResult.Model, nil
|
||||
}
|
||||
|
||||
@@ -196,6 +196,27 @@ func TestDeliveryTrajectory(t *testing.T) {
|
||||
apiTao.DeliveryTrajectory(param)
|
||||
}
|
||||
|
||||
func TestS(t *testing.T) {
|
||||
fmt.Println(1 % 20)
|
||||
func TestQueryBillList(t *testing.T) {
|
||||
queryData := time.Now()
|
||||
create := time.Date(queryData.Year(), queryData.Month(), queryData.Day()-7, 0, 0, 0, 0, queryData.Location())
|
||||
end := time.Date(queryData.Year(), queryData.Month(), queryData.Day(), 23, 59, 59, 59, queryData.Location())
|
||||
createTime := util.LocalTime(create)
|
||||
endTime := util.LocalTime(end)
|
||||
param := &request591.AlibabaWdkBillListRequest{
|
||||
TxdBillListGetRequest: &domain591.AlibabaWdkBillListTxdBillListGetRequest{
|
||||
EndBillDate: &endTime,
|
||||
StartBillDate: &createTime,
|
||||
ShopCode: utils.String2Pointer("JX668594"),
|
||||
PageSize: utils.Int64ToPointer(200),
|
||||
PageIndex: utils.Int64ToPointer(1),
|
||||
},
|
||||
}
|
||||
|
||||
data, err := apiTao.QueryBillList(param)
|
||||
if err != nil {
|
||||
fmt.Println("err === ", err)
|
||||
return
|
||||
}
|
||||
|
||||
globals.SugarLogger.Debugf("data:= %s", utils.Format4Output(data, false))
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ type AlibabaWdkBillListTxdBillDetailBo struct {
|
||||
BizOrderId *string `json:"biz_order_id,omitempty" `
|
||||
|
||||
/*
|
||||
单据类型(正/逆向) */
|
||||
单据类型(正/逆向) positive 有效订单/negative取消订单 */
|
||||
OrderType *string `json:"order_type,omitempty" `
|
||||
|
||||
/*
|
||||
|
||||
@@ -71,7 +71,7 @@ func (a *API) AddStoreCategoryInfo(param *request.AlibabaWdkSkuCategoryAddReques
|
||||
|
||||
// DeleteStoreCategoryInfo 删除门店分类
|
||||
func (a *API) DeleteStoreCategoryInfo(param *request.AlibabaWdkSkuCategoryDeleteRequest) error {
|
||||
//return nil // 不支持程序删除
|
||||
return nil // 不支持程序删除
|
||||
globals.SugarLogger.Debugf("进入 DeleteStoreCategoryInfo")
|
||||
storeCategory := ability587.NewAbility587(&a.client)
|
||||
resp, _ := storeCategory.AlibabaWdkSkuCategoryDelete(param, a.token)
|
||||
|
||||
@@ -83,7 +83,7 @@ func TestAddOrder(t *testing.T) {
|
||||
|
||||
//获取订单详情
|
||||
func TestGetOrderDetail(t *testing.T) {
|
||||
detail, err := api.GetOrderDetail("23022310041019000003804258")
|
||||
detail, err := api.GetOrderDetail("23071316101004700004743106")
|
||||
fmt.Println(utils.Format4Output(detail, false))
|
||||
orderPrice := utils.Str2Float64(detail.OrderPrice)
|
||||
priceOff := utils.Str2Float64(detail.PriceOff)
|
||||
|
||||
Reference in New Issue
Block a user