|
|
@@ -192,7 +192,7 @@ type PaymentCenterHybridConfig struct {
|
|
|
CAN_AMT_IN int32 `json:"can_amt_in"` // 入金是否可用 0-不可用 1-可用
|
|
|
CAN_AMT_OUT int32 `json:"can_amt_out"` // 出金是否可用 0-不可用 1-可用
|
|
|
|
|
|
- BankInfos []Hybridbankinfo `json:"bank_infos"` // 混合支付银行信息列表
|
|
|
+ BankInfos map[string][]Hybridbankinfo `json:"bank_infos"` // 混合支付银行信息列表
|
|
|
}
|
|
|
|
|
|
func GetPaymentCenterHybridConfig() (paymentCenterHybridConfigs []PaymentCenterHybridConfig, err error) {
|
|
|
@@ -212,11 +212,16 @@ func GetPaymentCenterHybridConfig() (paymentCenterHybridConfigs []PaymentCenterH
|
|
|
CAN_AMT_OUT: item.CAN_AMT_OUT,
|
|
|
}
|
|
|
|
|
|
- hybridbankinfos := make([]Hybridbankinfo, 0)
|
|
|
- if err = engine.Where("CHANNEL_CODE = ? AND IS_ENABLED = 1", item.CHANNEL_CODE).Find(&hybridbankinfos); err != nil {
|
|
|
+ datas := make([]Hybridbankinfo, 0)
|
|
|
+ if err = engine.Where("CHANNEL_CODE = ? AND IS_ENABLED = 1", item.CHANNEL_CODE).Find(&datas); err != nil {
|
|
|
return
|
|
|
}
|
|
|
- paymentCenterHybridConfig.BankInfos = hybridbankinfos
|
|
|
+ m := make(map[string][]Hybridbankinfo)
|
|
|
+ for _, data := range datas {
|
|
|
+ m[data.METHOD_TYPE] = append(m[data.METHOD_TYPE], data)
|
|
|
+ }
|
|
|
+
|
|
|
+ paymentCenterHybridConfig.BankInfos = m
|
|
|
|
|
|
paymentCenterHybridConfigs = append(paymentCenterHybridConfigs, paymentCenterHybridConfig)
|
|
|
}
|