pay
This commit is contained in:
@@ -135,7 +135,7 @@ func Pay(ctx *jxcontext.Context, orderID string, payType int, vendorPayType, app
|
|||||||
// }
|
// }
|
||||||
//}()
|
//}()
|
||||||
//微信支付实际金额更新到数据库
|
//微信支付实际金额更新到数据库
|
||||||
if _, err := dao.SetOrderStatus(db, temp_PayPrice, temp_PayMethod, orderID); err != nil {
|
if _, err := dao.SetOrderStatus(temp_PayPrice, temp_PayMethod, orderID); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if _, err := dao.UpdateEntityTx(txDB, &order); err != nil {
|
if _, err := dao.UpdateEntityTx(txDB, &order); err != nil {
|
||||||
|
|||||||
@@ -687,8 +687,8 @@ func SetUserVendorOrderStatus(db *DaoDB, localWayBillID string, status int) (msg
|
|||||||
}
|
}
|
||||||
|
|
||||||
//更新order 价格和状态
|
//更新order 价格和状态
|
||||||
func SetOrderStatus(db *DaoDB, payPrice, payMethod int, orderID string) (string, error) {
|
func SetOrderStatus(payPrice, payMethod int, orderID string) (string, error) {
|
||||||
if _, err := ExecuteSQL(GetDB(), `UPDATE 'order' SET pay_price = ?,pay_method= ? WHERE order_id = ? `, []interface{}{payPrice, payMethod, orderID}...); err != nil {
|
if _, err := ExecuteSQL(GetDB(), `UPDATE %s SET pay_price = ?,pay_method= ? WHERE order_id = ? `, []interface{}{"order", payPrice, payMethod, orderID}...); err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
return "更新Order状态成功", nil
|
return "更新Order状态成功", nil
|
||||||
|
|||||||
Reference in New Issue
Block a user