|
|
@@ -9,10 +9,13 @@ import ( |
|
|
|
func JudgePayChannel(mid, paySceneIdentifier string) (model.PayChannel, error) { |
|
|
|
var payChannelMaster = model.PayChannelMaster{} |
|
|
|
var payChannel = model.PayChannel{} |
|
|
|
_, err := db.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 { |
|
|
|
return payChannel, err |
|
|
|
} |
|
|
|
if !res { |
|
|
|
return payChannel, errors.New("查询数据失败") |
|
|
|
} |
|
|
|
if payChannelMaster.ChannelId == 0 { |
|
|
|
return payChannel, errors.New("请联系服务商绑定支付渠道") |
|
|
|
} |
|
|
|