|
|
|
@ -3,8 +3,6 @@ package alipay
|
|
|
|
|
import (
|
|
|
|
|
"errors"
|
|
|
|
|
"fmt"
|
|
|
|
|
"github.com/jinzhu/gorm"
|
|
|
|
|
"github.com/shopspring/decimal"
|
|
|
|
|
"io/ioutil"
|
|
|
|
|
"log"
|
|
|
|
|
"net/http"
|
|
|
|
@ -13,6 +11,9 @@ import (
|
|
|
|
|
"recook/internal/v2/model/recook/after"
|
|
|
|
|
"strings"
|
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
"github.com/jinzhu/gorm"
|
|
|
|
|
"github.com/shopspring/decimal"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
@ -75,6 +76,7 @@ type RefundResult struct {
|
|
|
|
|
|
|
|
|
|
func Refund(tx *gorm.DB, asGoods *after.RecookAfterSalesGoodsModel) error {
|
|
|
|
|
//这边判断是否有金额
|
|
|
|
|
fmt.Println("退款金额:", asGoods.RefundAmount.Truncate(2).String(), "========")
|
|
|
|
|
if asGoods.RefundAmount.GreaterThan(decimal.NewFromFloat(0.0)) {
|
|
|
|
|
detailParam := RefundDetailParam{
|
|
|
|
|
OutTradeNo: asGoods.TradeNo,
|
|
|
|
|