将美团和饿百取消订单申请索赔整合到interface中
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/weixinmsg"
|
||||
"net/url"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -1030,3 +1031,14 @@ func (c *PurchaseHandler) GetPlatformLogisticsFee(order *model.GoodsOrder) (int6
|
||||
|
||||
return utils.Float64TwoInt64(fee * 100), nil
|
||||
}
|
||||
|
||||
// ApplyCompensationOrder 订单索赔
|
||||
func (c *PurchaseHandler) ApplyCompensationOrder(order *model.GoodsOrder) (string, error) {
|
||||
num, _ := strconv.ParseFloat(fmt.Sprintf("%.2f", utils.Int64ToFloat64(order.TotalShopMoney)/float64(100)), 64)
|
||||
return "", getAPI(order.VendorOrgCode, jxutils.GetSaleStoreIDFromOrder(order), "").ApplyCompensation(&mtwmapi.ApplyCompensationRes{
|
||||
OrderId: utils.Str2Int64(order.VendorOrderID),
|
||||
Reason: "商户申请",
|
||||
ApplyStatus: mtwmapi.ApplyCompensationStatusOne,
|
||||
Amount: num,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user