mirror of
https://github.com/kongyuebin1/dongfeng-pay.git
synced 2025-12-14 04:59:56 +08:00
添加游戏充值商户后台代码
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package fast
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/logs"
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
type AccountInfo struct {
|
||||
|
||||
39
legend/models/fast/bankCardInfoDao.go
Normal file
39
legend/models/fast/bankCardInfoDao.go
Normal file
@@ -0,0 +1,39 @@
|
||||
package fast
|
||||
|
||||
import (
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
type BankCardInfo struct {
|
||||
Id string `orm:"pk;column(id)"`
|
||||
Uid string
|
||||
UserName string
|
||||
BankName string
|
||||
BankCode string
|
||||
BankAccountType string
|
||||
AccountName string
|
||||
BankNo string
|
||||
IdentifyCard string
|
||||
CertificateNo string
|
||||
PhoneNo string
|
||||
BankAddress string
|
||||
CreateTime string
|
||||
UpdateTime string
|
||||
}
|
||||
|
||||
const BANKCARDINFO = "bank_card_info"
|
||||
|
||||
func (c *BankCardInfo) TableName() string {
|
||||
return BANKCARDINFO
|
||||
}
|
||||
|
||||
func GetBankCardInfoByUserNo(merchantNo string) *BankCardInfo {
|
||||
o := orm.NewOrm()
|
||||
bankCardInfo := new(BankCardInfo)
|
||||
if _, err := o.QueryTable(BANKCARDINFO).Filter("user_name", merchantNo).Limit(1).All(bankCardInfo); err != nil {
|
||||
|
||||
logs.Error("获取用户银行卡信息失败:", err)
|
||||
}
|
||||
return bankCardInfo
|
||||
}
|
||||
32
legend/models/fast/merchantDeployInfo.go
Normal file
32
legend/models/fast/merchantDeployInfo.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package fast
|
||||
|
||||
import (
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
type MerchantDeployInfo struct {
|
||||
Id string `orm:"pk;column(id)"`
|
||||
Status string
|
||||
MerchantUid string
|
||||
PayType string
|
||||
SingleRoadUid string
|
||||
SingleRoadName string
|
||||
}
|
||||
|
||||
const MERCHANTDEPLOYINFO = "merchant_deploy_info"
|
||||
|
||||
func (c *MerchantDeployInfo) TableName() string {
|
||||
return MERCHANTDEPLOYINFO
|
||||
}
|
||||
|
||||
func GetUserPayConfigByUserNo(userNo string) *MerchantDeployInfo {
|
||||
o := orm.NewOrm()
|
||||
userPayConfig := new(MerchantDeployInfo)
|
||||
_, err := o.QueryTable(MERCHANTDEPLOYINFO).Filter("user_no", userNo).All(userPayConfig)
|
||||
if err != nil {
|
||||
logs.Error("获取用户支付配置错误:", err)
|
||||
}
|
||||
|
||||
return userPayConfig
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
package fast
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/logs"
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
type MerchantInfo struct {
|
||||
@@ -1,44 +0,0 @@
|
||||
package fast
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/logs"
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
)
|
||||
|
||||
type RpUserBankAccount struct {
|
||||
Id string `orm:"pk;column(id)"`
|
||||
CreateTime string
|
||||
EditTime string
|
||||
Version string
|
||||
Remark string
|
||||
Status string
|
||||
UserNo string
|
||||
BankName string
|
||||
BankCode string
|
||||
BankAccountName string
|
||||
BankAccountNo string
|
||||
CardType string
|
||||
CardNo string
|
||||
MobileNo string
|
||||
IsDefault string
|
||||
Province string
|
||||
City string
|
||||
Areas string
|
||||
Street string
|
||||
BankAccountType string
|
||||
}
|
||||
|
||||
func (c *RpUserBankAccount) TableName() string {
|
||||
return "rp_user_bank_account"
|
||||
}
|
||||
|
||||
func GetBankInfoByUserNo(userNo string) *RpUserBankAccount {
|
||||
o := orm.NewOrm()
|
||||
userBankAccount := new(RpUserBankAccount)
|
||||
if _, err := o.QueryTable("rp_user_bank_account").
|
||||
Filter("user_no", userNo).
|
||||
All(userBankAccount); err != nil {
|
||||
logs.Error("获取用户银行卡信息失败:", err)
|
||||
}
|
||||
return userBankAccount
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
package fast
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/logs"
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
)
|
||||
|
||||
type RpUserPayConfig struct {
|
||||
Id string `orm:"pk;column(id)"`
|
||||
UserNo string
|
||||
UserName string
|
||||
Status string
|
||||
PayKey string
|
||||
PaySecret string
|
||||
}
|
||||
|
||||
func (c *RpUserPayConfig) TableName() string {
|
||||
return "rp_user_pay_config"
|
||||
}
|
||||
|
||||
func getTableName() string {
|
||||
return "rp_user_pay_config"
|
||||
}
|
||||
|
||||
func GetUserPayConfigByUserNo(userNo string) *RpUserPayConfig {
|
||||
o := orm.NewOrm()
|
||||
userPayConfig := new(RpUserPayConfig)
|
||||
_, err := o.QueryTable(getTableName()).Filter("user_no", userNo).All(userPayConfig)
|
||||
if err != nil {
|
||||
logs.Error("获取用户支付配置错误:", err)
|
||||
}
|
||||
|
||||
return userPayConfig
|
||||
}
|
||||
Reference in New Issue
Block a user