This commit is contained in:
richboo111
2022-08-01 15:43:55 +08:00
parent 03d3b5a581
commit 65a96e5dfb

View File

@@ -81,10 +81,15 @@ func CreateOrder(ctx *jxcontext.Context, type1, orderType int, way string, price
}
func Pay(ctx *jxcontext.Context, orderID string, payType int, vendorPayType, appId string, payPrice int) (result *financial.WxPayParam, err error) {
orderInfo, err := dao.GetOrderByID(dao.GetDB(), orderID)
if err != nil {
return nil, err
}
var (
db = dao.GetDB()
order = &model.Order{
OrderID: orderID,
OrderID: orderID,
PayPrice: orderInfo.PayPrice,
}
payHandler = &financial.PayHandler{
PayType: payType,
@@ -93,10 +98,7 @@ func Pay(ctx *jxcontext.Context, orderID string, payType int, vendorPayType, app
}
)
globals.SugarLogger.Debug("payPrice before1111=========================", payPrice)
orderInfo, err := dao.GetOrderByID(db, orderID)
if err != nil {
return nil, err
}
//支付金额<原金额
globals.SugarLogger.Debug("order.PayPrice=========================", order.PayPrice)
if payPrice < order.PayPrice {