bank_card

package module
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BANKBIN = []string{}/* 1394 elements not displayed */
View Source
var BANKNAME = []string{}/* 1394 elements not displayed */

Functions

func GetNameOfBank

func GetNameOfBank(cardNo string) string

GetNameOfBank 通过银行卡 的前六位确定 判断银行开户行及卡种 @see https://github.com/AbrahamCaiJin/CommonUtilLibrary/blob/master/CommonUtil/src/main/java/com/jingewenku/abrahamcaijin/commonutil/BankCheck.java

func IsValidBankCardNo

func IsValidBankCardNo(cardNo string) bool

IsValidBankCardNo 是否合法的银行卡号

Types

type Bank

type Bank struct {
	Id       uint32 `gorm:"primarykey,column:id"`         // ID
	BankCode string `gorm:"uniqueIndex,column:bank_code"` // 银行简称
	BankName string `gorm:"column:bank_name"`             // 银行名称
}

Bank 银行信息

type BankCard

type BankCard struct {
	BIN        uint32 `gorm:"primarykey,column:bin"` // 银行识别码
	BankCode   string `gorm:"column:bank_code"`      // 银行代码
	BankName   string // 银行名称
	CardType   string `gorm:"column:card_type"`   // 银行卡类型
	CardName   string `gorm:"column:card_name"`   // 银行卡名称
	CardLength uint32 `gorm:"column:card_length"` // 银行卡号长度
}

BankCard 银行卡信息

func QueryBankByCardNumber

func QueryBankByCardNumber(cardNo string) *BankCard

func (*BankCard) CardTypeName

func (b *BankCard) CardTypeName() string

CardTypeName 将卡类型转为类型名

type CardType

type CardType string
const (
	CardTypeDC  CardType = "DC"  // 储蓄卡
	CardTypeCC  CardType = "CC"  // 信用卡
	CardTypeSCC CardType = "SCC" // 准贷记卡
	CardTypePC  CardType = "PC"  // 预付费卡
)

type Database

type Database struct {
	// contains filtered or unexported fields
}

func NewDatabase

func NewDatabase(openFile bool) *Database

func (*Database) Close

func (d *Database) Close()

func (*Database) UpdateBankCardTableCardName

func (d *Database) UpdateBankCardTableCardName(bin uint32, cardName string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL