Sfoglia il codice sorgente

add Reverse:for v1.1.3 传入总后台的engine

tags/v1.1.3
huangjuajun 2 anni fa
parent
commit
65c7dd0c54
1 ha cambiato i file con 4 aggiunte e 3 eliminazioni
  1. +4
    -3
      pay/pay_config.go

+ 4
- 3
pay/pay_config.go Vedi File

@@ -4,12 +4,13 @@ import (
"code.fnuoos.com/go_rely_warehouse/zyos_go_pay.git/db"
"code.fnuoos.com/go_rely_warehouse/zyos_go_pay.git/db/model"
"errors"
"xorm.io/xorm"
)

//支付渠道获取
func JudgePayChannel(mid, paySceneIdentifier string) (model.PayChannelMaster, error) {
func JudgePayChannel(Db *xorm.Engine, mid, paySceneIdentifier string) (model.PayChannelMaster, error) {
var payChannelMaster = model.PayChannelMaster{}
res, err := db.Db.Where("app_id = ?", mid).And("identifier = ?", paySceneIdentifier).Get(&payChannelMaster)
res, err := Db.Where("app_id = ?", mid).And("identifier = ?", paySceneIdentifier).Get(&payChannelMaster)
if err != nil {
return payChannelMaster, err
}
@@ -23,7 +24,7 @@ func JudgePayChannel(mid, paySceneIdentifier string) (model.PayChannelMaster, er
}

//支付方式获取
func JudgePayChannelPayType(channelId string) (model.PayChannel, error) {
func JudgePayChannelPayType(Db *xorm.Engine, channelId string) (model.PayChannel, error) {
var payChannel = model.PayChannel{}
res, err := db.Db.Where("id = ? and is_use=?", channelId, 1).Get(&payChannel)
if err != nil {


Caricamento…
Annulla
Salva