diff --git a/internal/v2/logic/manage/after/after.go b/internal/v2/logic/manage/after/after.go index 9ec60c9..7802a3d 100644 --- a/internal/v2/logic/manage/after/after.go +++ b/internal/v2/logic/manage/after/after.go @@ -475,8 +475,9 @@ func refundWithType(tx *gorm.DB, asGoods after.RecookAfterSalesGoodsModel) error var od manage.RecookOrderInfoModel mysql2.Db.First(&od, "id = ?", asGoods.OrderId) if od.JCookRootID != 0 { - mysql2.Db.First(&od, "jcook_order_id = ?", od.JCookRootID) - asGoods.OrderTotalAmount = od.ActualTotalAmount + var od2 manage.RecookOrderInfoModel + mysql2.Db.First(&od2, "jcook_order_id = ?", od.JCookRootID) + asGoods.OrderTotalAmount = od2.ActualTotalAmount } if err := wechat.Refund(&asGoods); err != nil { return err