将美团和饿百取消订单申请索赔整合到interface中

This commit is contained in:
邹宗楠
2025-02-28 09:54:01 +08:00
parent a4573224a6
commit 054aac4e3c
13 changed files with 125 additions and 14 deletions

View File

@@ -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,
})
}