fix: 微信部分退款异常1

master
howell 3 years ago
parent 9484714da8
commit 1b19b142f4

@ -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

Loading…
Cancel
Save