|
@@ -4,13 +4,12 @@ import ( |
|
|
"code.fnuoos.com/go_rely_warehouse/zyos_go_pay.git/db" |
|
|
"code.fnuoos.com/go_rely_warehouse/zyos_go_pay.git/db" |
|
|
"code.fnuoos.com/go_rely_warehouse/zyos_go_pay.git/db/model" |
|
|
"code.fnuoos.com/go_rely_warehouse/zyos_go_pay.git/db/model" |
|
|
"errors" |
|
|
"errors" |
|
|
"xorm.io/xorm" |
|
|
|
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
//支付渠道获取 |
|
|
//支付渠道获取 |
|
|
func JudgePayChannel(Db *xorm.Engine, mid, paySceneIdentifier string) (model.PayChannelMaster, error) { |
|
|
|
|
|
|
|
|
func JudgePayChannel(mid, paySceneIdentifier string) (model.PayChannelMaster, error) { |
|
|
var payChannelMaster = model.PayChannelMaster{} |
|
|
var payChannelMaster = model.PayChannelMaster{} |
|
|
res, err := Db.Where("app_id = ?", mid).And("identifier = ?", paySceneIdentifier).Get(&payChannelMaster) |
|
|
|
|
|
|
|
|
res, err := db.Db.Where("app_id = ?", mid).And("identifier = ?", paySceneIdentifier).Get(&payChannelMaster) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return payChannelMaster, err |
|
|
return payChannelMaster, err |
|
|
} |
|
|
} |
|
@@ -24,7 +23,7 @@ func JudgePayChannel(Db *xorm.Engine, mid, paySceneIdentifier string) (model.Pay |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//支付方式获取 |
|
|
//支付方式获取 |
|
|
func JudgePayChannelPayType(Db *xorm.Engine, channelId string) (model.PayChannel, error) { |
|
|
|
|
|
|
|
|
func JudgePayChannelPayType(channelId string) (model.PayChannel, error) { |
|
|
var payChannel = model.PayChannel{} |
|
|
var payChannel = model.PayChannel{} |
|
|
res, err := db.Db.Where("id = ? and is_use=?", channelId, 1).Get(&payChannel) |
|
|
res, err := db.Db.Where("id = ? and is_use=?", channelId, 1).Get(&payChannel) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|