From cafd9a6dd811c05b48f7315cc6407c7b29963645 Mon Sep 17 00:00:00 2001 From: huangjuajun <102564160@qq.com> Date: Mon, 30 May 2022 16:55:44 +0800 Subject: [PATCH] =?UTF-8?q?add=20Reverse:for=20v1.0.9=20=E6=80=BB=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E6=94=AF=E4=BB=98=E6=96=B9=E5=BC=8F=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pay/pay_config.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pay/pay_config.go b/pay/pay_config.go index 75561ee..b1e57ba 100644 --- a/pay/pay_config.go +++ b/pay/pay_config.go @@ -21,3 +21,17 @@ func JudgePayChannel(mid, paySceneIdentifier string) (model.PayChannelMaster, er } return payChannelMaster, nil } + +//支付方式获取 +func JudgePayChannelPayType(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 { + return payChannel, err + } + if !res { + return payChannel, errors.New("查询数据失败") + } + + return payChannel, nil +}