1
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package tao_vegetable
|
package tao_vegetable
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.rosy.net.cn/baseapi/platformapi/tao_vegetable"
|
"git.rosy.net.cn/baseapi/platformapi/tao_vegetable"
|
||||||
@@ -16,7 +17,7 @@ import (
|
|||||||
"git.rosy.net.cn/jx-callback/business/partner"
|
"git.rosy.net.cn/jx-callback/business/partner"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
"git.rosy.net.cn/jx-callback/globals/api"
|
"git.rosy.net.cn/jx-callback/globals/api"
|
||||||
"strings"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -320,15 +321,21 @@ func (c *PurchaseHandler) onAfsOrderMsg(status string, msg interface{}) (retVal
|
|||||||
|
|
||||||
for _, v := range *scarceGoods {
|
for _, v := range *scarceGoods {
|
||||||
var refundFee int64 = 0
|
var refundFee int64 = 0
|
||||||
skuSt := *v.Attributes
|
skuStr := *v.Attributes
|
||||||
a2 := strings.Index(skuSt, "skuName")
|
str2, err := strconv.Unquote("\"" + skuStr + "\"")
|
||||||
a3 := strings.Index(skuSt, "wdkrfqr")
|
if err != nil {
|
||||||
skuName := skuSt[a2+12 : a3-5]
|
return tao_vegetable.CallBackResultInfo(err)
|
||||||
|
}
|
||||||
|
skuDetail := tao_vegetable.GoodsScarceRefund{}
|
||||||
|
if err := json.Unmarshal([]byte(str2), &skuDetail); err != nil {
|
||||||
|
return tao_vegetable.CallBackResultInfo(err)
|
||||||
|
}
|
||||||
|
|
||||||
orderSku := &model.OrderSkuFinancial{
|
orderSku := &model.OrderSkuFinancial{
|
||||||
Count: utils.Float64TwoInt(utils.Str2Float64(*v.RefundQuantity)),
|
Count: utils.Float64TwoInt(utils.Str2Float64(*v.RefundQuantity)),
|
||||||
VendorSkuID: *v.SkuCode,
|
VendorSkuID: *v.SkuCode,
|
||||||
SkuID: utils.Str2Int(*v.SkuCode),
|
SkuID: utils.Str2Int(*v.SkuCode),
|
||||||
Name: skuName,
|
Name: skuDetail.SkuName,
|
||||||
UserMoney: *v.RefundAmount,
|
UserMoney: *v.RefundAmount,
|
||||||
PmSkuSubsidyMoney: 0, // 平台补贴商品
|
PmSkuSubsidyMoney: 0, // 平台补贴商品
|
||||||
VendorOrderID: orderStatus.VendorOrderID,
|
VendorOrderID: orderStatus.VendorOrderID,
|
||||||
|
|||||||
Reference in New Issue
Block a user