diff --git a/platformapi/tao_vegetable/order_model.go b/platformapi/tao_vegetable/order_model.go index f26eafcd..cf2a7adf 100644 --- a/platformapi/tao_vegetable/order_model.go +++ b/platformapi/tao_vegetable/order_model.go @@ -109,3 +109,42 @@ type RefundOrderFinish struct { OrderFrom string `json:"order_from"` // 订单来源渠道 BizSubRefundId string `json:"biz_sub_refund_id"` // 退款业务子单号 } + +type GoodsScarceRefund struct { + Income string `json:"income"` + SubDiscountMerchantItemFee string `json:"sub_discount_merchant_item_fee"` + AfterRefund string `json:"afterRefund"` + Discount string `json:"discount"` + SubRefundItemFee string `json:"sub_refund_item_fee"` + ScenarioGroup string `json:"scenarioGroup"` + SaleUnit string `json:"saleUnit"` + RefundPostFee string `json:"refundPostFee"` + RefundPlatformFee string `json:"refundPlatformFee"` + SkuName string `json:"skuName"` + Wdkrfqr interface{} //`json:"wdkrfqr"` + SkuBrandSubsidyFee string `json:"skuBrandSubsidyFee"` + RefundSaleQuantity string `json:"refundSaleQuantity"` + Wdkrc interface{} //`json:"wdkrc"` + Price string `json:"price"` + OrderClient string `json:"orderClient"` + Wdkdfqrrr string `json:"wdkdfqrrr"` + RefundTotalSubCount string `json:"refundTotalSubCount"` + DiscountMerchantFee string `json:"discount_merchant_fee"` + SkuMerchantOfflineSubsidyFee string `json:"skuMerchantOfflineSubsidyFee"` + Barcode string `json:"barcode"` + RefundExpectRefundQuantity string `json:"refundExpectRefundQuantity"` + WdkRefundSource string `json:"wdkRefundSource"` + TbBizOrderId string `json:"tbBizOrderId"` + Wdkrfqrmemo string `json:"wdkrfqrmemo"` + GmtDisputeEndTime string `json:"gmtDisputeEndTime"` + SubDiscountPlatformBrandItemFee string `json:"sub_discount_platform_brand_item_fee"` + DiscountPlatformFee string `json:"discount_platform_fee"` + StockUnit string `json:"stockUnit"` + TbBizParentId string `json:"tbBizParentId"` + SubRefundFee string `json:"sub_refund_fee"` + SubDiscountPlatformChannelItemFee string `json:"sub_discount_platform_channel_item_fee"` + SubDiscountPlatformAgentItemFee string `json:"sub_discount_platform_agent_item_fee"` + WeightItem string `json:"weightItem"` + SubDiscountPlatformItemFee string `json:"sub_discount_platform_item_fee"` + SkuMerchantOnlineSubsidyFee string `json:"skuMerchantOnlineSubsidyFee"` +} diff --git a/platformapi/tao_vegetable/order_test.go b/platformapi/tao_vegetable/order_test.go index de0ffb5b..51c2c996 100644 --- a/platformapi/tao_vegetable/order_test.go +++ b/platformapi/tao_vegetable/order_test.go @@ -9,6 +9,7 @@ import ( "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/util" "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/globals" + "strings" "testing" "time" ) @@ -148,3 +149,11 @@ func TestPickUp(t *testing.T) { err := apiTao.DeliveryFinish(param) fmt.Println(err) } + +func TestString(t *testing.T) { + aa := `{\"income\":\"1\",\"sub_discount_merchant_item_fee\":\"0\",\"afterRefund\":\"false\",\"discount\":\"[]\",\"sub_refund_item_fee\":\"1800\",\"scenarioGroup\":\"TB\",\"saleUnit\":\"份\",\"refundPostFee\":\"0\",\"refundPlatformFee\":\"0\",\"skuName\":\"西兰花 500g/份\",\"wdkrfqr\":\"{\\\"operatorType\\\":1,\\\"operatorId\\\":3460808748,\\\"operatorName\\\":\\\"BUYER\\\"}\",\"skuBrandSubsidyFee\":\"0\",\"refundSaleQuantity\":\"3\",\"wdkrc\":\"{\\\"operatorType\\\":2,\\\"operatorId\\\":\\\"SYSTEM\\\",\\\"operatorName\\\":\\\"系统\\\"}\",\"price\":\"900\",\"orderClient\":\"2\",\"wdkdfqrrr\":\"补差退款\",\"refundTotalSubCount\":\"1\",\"discount_merchant_fee\":\"0\",\"skuMerchantOfflineSubsidyFee\":\"0\",\"barcode\":\"19930827\",\"refundExpectRefundQuantity\":\"0.0\",\"wdkRefundSource\":\"3\",\"tbBizOrderId\":\"1930666550864804887\",\"wdkrfqrmemo\":\"系统代发起补差退款\",\"gmtDisputeEndTime\":\"2023-07-10 14:14:53\",\"sub_discount_platform_brand_item_fee\":\"0\",\"discount_platform_fee\":\"0\",\"stockUnit\":\"份\",\"tbBizParentId\":\"1930666550863804887\",\"sub_refund_fee\":\"1800\",\"sub_discount_platform_channel_item_fee\":\"0\",\"sub_discount_platform_agent_item_fee\":\"0\",\"weightItem\":\"0\",\"sub_discount_platform_item_fee\":\"0\",\"skuMerchantOnlineSubsidyFee\":\"0\"}` + + a2 := strings.Index(aa, "skuName") + a3 := strings.Index(aa, "wdkrfqr") + fmt.Println(aa[a2+12 : a3-5]) +}