修改淘宝订单的平台结算获取方式

This commit is contained in:
邹宗楠
2023-12-06 13:43:29 +08:00
parent d606d5b756
commit a3f88eceef
28 changed files with 1374 additions and 276 deletions

View File

@@ -23,12 +23,22 @@ func TestName(t *testing.T) {
}
func TestGetOrderDetail(t *testing.T) {
requestParam := &request591.AlibabaAelophyOrderGetRequest{OrderGetRequest: &domain591.AlibabaAelophyOrderGetOrderGetRequest{
StoreId: utils.String2Pointer("lb229"),
BizOrderId: utils.Int64ToPointer(5000950290614680195),
StoreId: utils.String2Pointer("JX100829"),
BizOrderId: utils.Int64ToPointer(8000037167638800068),
}}
apiTao.SetToken("50002C01524csKWniqfypk8dbshKRTeFIOIy1a46c0cfgsvodWjsseMsXqpvWvECMj1")
data, err := apiTao.QueryOrderDetail(requestParam)
var skuPrice int64 = 0 // 商品原价
var skuMemberPrice int64 = 0 // 商户优惠价
for _, v := range *data.SubOrderResponseList {
skuPrice += *v.OriginalFee
skuMemberPrice += *v.DiscountMerchantFee
}
var platformPrice = *data.PlatformDeduction.BaseLogisticsFee + *data.PlatformDeduction.TechnicalServiceFee + *data.PlatformDeduction.PayServiceFee + *data.PlatformDeduction.ThirdpartnarFee
jieSuanPrice := skuPrice + *data.PostFee - skuMemberPrice - platformPrice
fmt.Println(jieSuanPrice)
globals.SugarLogger.Debugf("data := %s", utils.Format4Output(data, false))
globals.SugarLogger.Debugf("err := %s", utils.Format4Output(err, false))
globals.SugarLogger.Debugf("errdatadatadata := %s", utils.Format4Output(utils.Str2Int(*data.StoreId), false))