Browse Source

add Reverse:for v1.0.9 总后台支付方式获取

tags/v1.0.9
huangjuajun 2 years ago
parent
commit
cafd9a6dd8
1 changed files with 14 additions and 0 deletions
  1. +14
    -0
      pay/pay_config.go

+ 14
- 0
pay/pay_config.go View File

@@ -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
}

Loading…
Cancel
Save