models

package
v0.0.0-...-e1989bb Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

**************************************************

** @Desc : This file for 对接数据格式
** @Time : 2019.04.19 16:11
** @Author : Joker
** @File : api_data
** @Last Modified by : Joker
** @Last Modified time: 2019.04.19 16:11
** @Software: GoLand

***************************************************

**************************************************

** @Desc : This file for 存放银行名称与id映射
** @Time : 2019.04.14 15:17
** @Author : Joker
** @File : bank_info
** @Last Modified by : Joker
** @Last Modified time: 2019.04.14 15:17
** @Software: GoLand

***************************************************

**************************************************

** @Desc : This file for 自定义加减款数据模型
** @Time : 2019.05.22 14:59
** @Author : Joker
** @File : custom_plus_minus
** @Last Modified by : Joker
** @Last Modified time: 2019.05.22 14:59
** @Software: GoLand

***************************************************

**************************************************

** @Desc : This file for 加密数据模型
** @Time : 2019.04.11 16:25
** @Author : Joker
** @File : data
** @Last Modified by : Joker
** @Last Modified time: 2019.04.11 16:25
** @Software: GoLand

***************************************************

**************************************************

** @Desc : This file for 初始化模型
** @Time : 2019.03.30 16:22
** @Author : Joker
** @File : init_models
** @Last Modified by : Joker
** @Last Modified time: 2019.03.30 16:22
** @Software: GoLand

***************************************************

**************************************************

** @Desc : This file for ...
** @Time : 2019.04.02 9:54
** @Author : Joker
** @File : merchant
** @Last Modified by : Joker
** @Last Modified time: 2019.04.02 9:54
** @Software: GoLand

***************************************************

**************************************************

** @Desc : This file for 充值记录数据模型
** @Time : 2019.04.10 11:47
** @Author : Joker
** @File : recharge_record
** @Last Modified by : Joker
** @Last Modified time: 2019.04.10 11:47
** @Software: GoLand

***************************************************

**************************************************

** @Desc : This file for 查询响应结果
** @Time : 2019.04.08 9:34
** @Author : Joker
** @File : responsive_body
** @Last Modified by : Joker
** @Last Modified time: 2019.04.08 9:34
** @Software: GoLand

***************************************************

**************************************************

** @Desc : This file for B2C转账数据模型,此功能不在开放,已放弃维护
** @Time : 2019.04.13 13:30
** @Author : Joker
** @File : transfer_record
** @Last Modified by : Joker
** @Last Modified time: 2019.04.13 13:30
** @Software: GoLand

***************************************************

**************************************************

** @Desc : This file for 用户加减款历史操作数据模型
** @Time : 2019.04.15 17:45
** @Author : Joker
** @File : user_history
** @Last Modified by : Joker
** @Last Modified time: 2019.04.15 17:45
** @Software: GoLand

***************************************************

**************************************************

** @Desc : This file for 用户信息数据模型
** @Time : 2019.03.30 16:24
** @Author : Joker
** @File : user_info
** @Last Modified by : Joker
** @Last Modified time: 2019.03.30 16:24
** @Software: GoLand

***************************************************

**************************************************

** @Desc : This file for 用户信息扩展数据模型
** @Time : 2019.04.16 14:10
** @Author : Joker
** @File : user_info_expansion
** @Last Modified by : Joker
** @Last Modified time: 2019.04.16 14:10
** @Software: GoLand

***************************************************

**************************************************

** @Desc : This file for 用户对账 计算
** @Time : 2019.05.29 15:34
** @Author : Joker
** @File : user_reconcile_dao
** @Last Modified by : Joker
** @Last Modified time: 2019.05.29 15:34
** @Software: GoLand

***************************************************

**************************************************

** @Desc : This file for 代付数据模型
** @Time : 2019.04.10 16:45
** @Author : Joker
** @File : withdraw_record
** @Last Modified by : Joker
** @Last Modified time: 2019.04.10 16:45
** @Software: GoLand

***************************************************

Index

Constants

This section is empty.

Variables

View Source
var DBUtils = utils.GenerateSQL{}

Functions

func BankInfoTBName

func BankInfoTBName() string

func CustomPlusMinusTBName

func CustomPlusMinusTBName() string

func MerchantTBName

func MerchantTBName() string

func RechargeRecordTBName

func RechargeRecordTBName() string

func TransferRecordTBName

func TransferRecordTBName() string

func UserHistoryTBName

func UserHistoryTBName() string

func UserInfoExpansionTBName

func UserInfoExpansionTBName() string

func UserInfoTBName

func UserInfoTBName() string

func WithdrawRecordTBName

func WithdrawRecordTBName() string

Types

type ApiPayRequestParams

type ApiPayRequestParams struct {
	MerchantNo   string //商户编号
	OrderPrice   string //订单金额
	OutOrderNo   string //商户充值订单号
	TradeTime    string //交易下单时间
	UserType     string //用户类型
	AccountNo    string //银行卡号
	AccountName  string //银行账号对应的户名
	BankNo       string //银行编码
	Issuer       string //联行号
	ApiNotifyUrl string //后台异步通知地址
	Item         string //扩展字段
	Sign         string //签名串
}

对接代付请求参数

type ApiQueryBalanceParams

type ApiQueryBalanceParams struct {
	MerchantNo string //商户编号
	Timestamp  string //时间戳
	Sign       string //签名串
}

对接代付余额查询请求参数

type ApiQueryBalanceResponseBody

type ApiQueryBalanceResponseBody struct {
	MerchantNo string `json:"merchant_no"` //商户号
	TAmount    string `json:"t_amount"`    //总金额
	UAmount    string `json:"u_amount"`    //可用余额
	FAmount    string `json:"f_amount"`    //冻结金额,出款在途金额
	Sign       string `json:"sign"`        //签名数据
}

对接代付余额查询响应

type ApiQueryParams

type ApiQueryParams struct {
	MerchantNo string //商户编号
	OutTradeNo string //商户充值订单号
	Sign       string //签名串
}

对接查询请求参数

type ApiQueryResponseBody

type ApiQueryResponseBody struct {
	OutTradeNo   string `json:"out_trade_no"`   //交易订单号
	OrderStatus  string `json:"order_status"`   //交易状态
	Amount       string `json:"amount"`         //订单金额
	AmountNotFee string `json:"amount_not_fee"` //扣除手续费金额
	AmountFee    string `json:"amount_fee"`     //手续费
	TradeNo      string `json:"trade_no"`       //交易流水号
	CompleteTime string `json:"complete_time"`  //完成时间
	Sign         string `json:"sign"`           //订单签名数据
}

对接查询响应

type ApiRechargeRequestParams

type ApiRechargeRequestParams struct {
	MerchantNo   string //商户编号
	OrderPrice   string //订单金额
	OutOrderNo   string //商户充值订单号
	TradeTime    string //交易下单时间
	AccountNo    string //银行卡号
	AccountName  string //银行账号对应的户名
	RecevieBank  string //备付金账户标识
	ApiNotifyUrl string //后台异步通知地址
	Item         string //扩展字段
	Sign         string //签名串
}

对接充值请求参数

type ApiResponseBody

type ApiResponseBody struct {
	ResultCode   string `json:"resultCode"`
	Msg          string `json:"msg"`
	MerchantNo   string `json:"merchant_no"`    //商户号
	OutTradeNo   string `json:"out_trade_no"`   //交易订单号
	Amount       string `json:"amount"`         //金额
	AmountNotFee string `json:"amount_not_fee"` //扣除手续费金额
	AmountFee    string `json:"amount_fee"`     //手续费
	TradeStatus  string `json:"trade_status"`   //订单状态
	TradeTime    string `json:"trade_time"`     //交易完成时间
	TradeNo      string `json:"trade_no"`       //交易流水号
	Item         string `json:"item"`           //扩展字段
	Sign         string `json:"sign"`           //订单签名数据
}

对接异步通知参数

type B2CTransferData

type B2CTransferData struct {
	MerchantNo     string `json:"merchantNo"`     //商户订单号
	Source         string `json:"source"`         //来源
	ProductType    string `json:"productType"`    //产品类型
	PayerId        string `json:"payerId"`        //付款方
	Amount         string `json:"amount"`         //金额
	TransCur       string `json:"transCur"`       //币种
	AccountType    string `json:"accountType"`    //卡种
	ProductName    string `json:"productName"`    //商品名称
	ProductInfo    string `json:"productInfo"`    //商品信息
	ReturnUrl      string `json:"returnUrl"`      //前台通知地址
	NoticeUrl      string `json:"noticeUrl"`      //后台通知地址
	ExpireTime     string `json:"expireTime"`     //订单超时时间
	Memo           string `json:"memo"`           //保留域
	TerminalParams string `json:"terminalParams"` //终端信息
}

b2c转账加密数据

type BankInfo

type BankInfo struct {
	Id            int
	BankId        string //金融机构ID
	BankName      string //金融机构名称
	BankShortName string //金融机构简称
}

func (*BankInfo) SelectOneBankInfo

func (*BankInfo) SelectOneBankInfo(name string) (m BankInfo)

读取单个信息

func (*BankInfo) TableEngine

func (*BankInfo) TableEngine() string

func (*BankInfo) TableName

func (*BankInfo) TableName() string

type Count

type Count struct {
	Total  float64 `orm:"column(total)"`
	Length int     `orm:"column(length)"`
}

计算结果

type CustomPlusMinus

type CustomPlusMinus struct {
	Id         int
	CreateTime string
	EditTime   string
	Version    int
	UserId     int
	UserName   string
	Addition   float64
	Deduction  float64
	HandingFee float64
}

func (*CustomPlusMinus) InsertCustomPlusMinus

func (*CustomPlusMinus) InsertCustomPlusMinus(w CustomPlusMinus) (int, int64)

* * @Description: 添加加减款明细 * @Author: Joker * @Date: 2019-5-22 15:05:44 * @Param: Merchant * @return: int: 判断成功的标识 * @return: int64: 在表中哪一行插入 *

func (*CustomPlusMinus) SelectCustomPlusMinusCount

func (*CustomPlusMinus) SelectCustomPlusMinusCount(params map[string]interface{}) int

func (*CustomPlusMinus) SelectCustomPlusMinusListPage

func (*CustomPlusMinus) SelectCustomPlusMinusListPage(params map[string]interface{}, limit, offset int) (list []CustomPlusMinus)

查询分页

func (*CustomPlusMinus) SelectOneCustomPlusMinusByUserId

func (*CustomPlusMinus) SelectOneCustomPlusMinusByUserId(id int) (cs []CustomPlusMinus)

读取多个加减款明细记录通过 用户ID

func (*CustomPlusMinus) TableEngine

func (*CustomPlusMinus) TableEngine() string

func (*CustomPlusMinus) TableName

func (*CustomPlusMinus) TableName() string

type Merchant

type Merchant struct {
	Id           int
	UserId       int
	Version      int
	MerchantName string //商户名
	MerchantNo   string //商户编号
	SecretKey    string `orm:"type(text)"` //密钥
	CreateTime   string
	EditTime     string
	TotalAmount  float64 //总金额
	UsableAmount float64 //可用金额
	FrozenAmount float64 //冻结金额
	Status       int     //状态
	ChannelType  string  //通道类型
}

func (*Merchant) InsertMerchant

func (*Merchant) InsertMerchant(m Merchant) (int, int64)

* * @Description: 添加商户通道 * @Author: Joker * @Date: 2019.04.02 10:02 * @Param: Merchant * @return: int: 判断成功的标识 * @return: int64: 在表中哪一行插入 *

func (*Merchant) MerchantNoIsExit

func (*Merchant) MerchantNoIsExit(no string) bool

判断商户编号是否存在

func (*Merchant) SelectAllMerchantBy

func (*Merchant) SelectAllMerchantBy(params map[string]interface{}) (list []Merchant)

根据条件查询所有激活商户

func (*Merchant) SelectAllMerchantByType

func (*Merchant) SelectAllMerchantByType(t string) (list []Merchant)

选择单通道下所有商户

func (*Merchant) SelectMerchantListPage

func (*Merchant) SelectMerchantListPage(params map[string]interface{}, limit, offset int) (list []Merchant)

查询分页

func (*Merchant) SelectMerchantPageCount

func (*Merchant) SelectMerchantPageCount(params map[string]interface{}) int

func (*Merchant) SelectOneMerchant

func (*Merchant) SelectOneMerchant(id string) (m Merchant)

读取单个商户通道信息

func (*Merchant) SelectOneMerchantByNo

func (*Merchant) SelectOneMerchantByNo(no string) (m Merchant)

读取单个商户通道信息通过商户编号

func (*Merchant) TableEngine

func (*Merchant) TableEngine() string

func (*Merchant) TableName

func (*Merchant) TableName() string

func (*Merchant) UpdateMerchant

func (*Merchant) UpdateMerchant(mt Merchant) int

修改配置信息

type RechargeRecord

type RechargeRecord struct {
	Id                int
	UserId            int
	Version           int
	MerchantNo        string
	CreateTime        string
	EditTime          string
	SerialNumber      string
	ReOrderId         string
	ReAmount          float64
	ReAccountNo       string
	ReAccountName     string
	ReCertificateType string
	ReCertificateNo   string
	ReMobileNo        string
	ReRecevieBank     string
	Status            string
	Remark            string
	RecordType        string
	NoticeUrl         string `orm:"type(text)"`
	RecordClass       string
	ApiNoticeUrl      string `orm:"type(text)"`
	Item              string

	UserName string `orm:"-"`
}

func (*RechargeRecord) InsertRechargeRecord

func (*RechargeRecord) InsertRechargeRecord(r RechargeRecord) (int, int64)

* * @Description: 添加充值记录 * @Author: Joker * @Date: 2019-4-10 11:53:28 * @Param: Merchant * @return: int: 判断成功的标识 * @return: int64: 在表中哪一行插入 *

func (*RechargeRecord) RechargeRecordIsExit

func (*RechargeRecord) RechargeRecordIsExit(orderId string) bool

判断订单是否存在

func (*RechargeRecord) SelectAllRechargeRecordBy

func (*RechargeRecord) SelectAllRechargeRecordBy(params map[string]interface{}) (list []RechargeRecord)

根据条件查询所有充值记录

func (*RechargeRecord) SelectOneRechargeRecord

func (*RechargeRecord) SelectOneRechargeRecord(id string) (r RechargeRecord)

读取单个代付记录

func (*RechargeRecord) SelectOneRechargeRecordByOrderId

func (*RechargeRecord) SelectOneRechargeRecordByOrderId(id string) (r RechargeRecord)

读取单个代付记录通过订单编号

func (*RechargeRecord) SelectRechargeRecordListPage

func (*RechargeRecord) SelectRechargeRecordListPage(params map[string]interface{}, limit, offset int) (list []RechargeRecord)

查询分页

func (*RechargeRecord) SelectRechargeRecordPageCount

func (*RechargeRecord) SelectRechargeRecordPageCount(params map[string]interface{}) int

func (*RechargeRecord) TableEngine

func (*RechargeRecord) TableEngine() string

func (*RechargeRecord) TableName

func (*RechargeRecord) TableName() string

func (*RechargeRecord) UpdateRechargeRecord

func (*RechargeRecord) UpdateRechargeRecord(r RechargeRecord) int

修改充值记录

type RespData

type RespData struct {
	Code       string `json:"code"`
	Message    string `json:"message"`
	MerchantId string `json:"merchantId"`
	Data       string `json:"data"`
	Tm         string `json:"tm"`
	Sign       string `json:"sign"`
}

充值同步响应数据

type TerminalParams

type TerminalParams struct {
	MerEquipmentIp string `json:"merEquipmentIp"` //ip
}

type TransferRecord

type TransferRecord struct {
	Id            int
	MerchantNo    string
	UserId        int
	CreateTime    string
	EditTime      string
	SerialNumber  string
	TrOrderId     string
	TrAmount      float64
	TrAccountType string
	TrProductName string
	Status        string
	TrNoticeUrl   string `orm:"type(text)"`
	Remark        string
	Version       int
	UserName      string `orm:"-"`
}

func (*TransferRecord) InsertTransferRecord

func (*TransferRecord) InsertTransferRecord(r TransferRecord) (int, int64)

* * @Description: 添加B2C转账记录 * @Author: Joker * @Date: 2019-4-13 13:51:09 * @Param: Merchant * @return: int: 判断成功的标识 * @return: int64: 在表中哪一行插入 *

func (*TransferRecord) SelectAllTransferRecordBy

func (*TransferRecord) SelectAllTransferRecordBy(params map[string]interface{}) (list []TransferRecord)

根据条件查询所有转账记录

func (*TransferRecord) SelectOneTransferRecord

func (*TransferRecord) SelectOneTransferRecord(id string) (r TransferRecord)

读取单个转账记录

func (*TransferRecord) SelectOneTransferRecordByOrderId

func (*TransferRecord) SelectOneTransferRecordByOrderId(id string) (w TransferRecord)

读取单个转账记录通过 订单号

func (*TransferRecord) SelectTransferRecordListPage

func (*TransferRecord) SelectTransferRecordListPage(params map[string]interface{}, limit, offset int) (list []TransferRecord)

查询分页

func (*TransferRecord) SelectTransferRecordPageCount

func (*TransferRecord) SelectTransferRecordPageCount(params map[string]interface{}) int

func (*TransferRecord) TableEngine

func (*TransferRecord) TableEngine() string

func (*TransferRecord) TableName

func (*TransferRecord) TableName() string

func (*TransferRecord) UpdateTransferRecord

func (*TransferRecord) UpdateTransferRecord(w TransferRecord) int

修改转账记录

type UserHistory

type UserHistory struct {
	Id           int
	Version      int
	UserId       int
	UserName     string
	CreateTime   string
	EditTime     string
	Addition     float64
	Deduction    float64
	FrozenAdd    float64 //冻结,冻结加,
	FrozenDed    float64 //冻结减
	UsableAmount float64
	TotalAmount  float64
	FrozenAmount float64
}

func (*UserHistory) InsertUserHistory

func (*UserHistory) InsertUserHistory(sr UserHistory) (int, int64)

* * @Description: 添加用户历史信息 * @Author: Joker * @Date: 2019-4-15 17:53:58 * @Param: sr: 用户历史信息 * @return: int: 判断成功的标识 * @return: int64: 在表中哪一行插入 *

func (*UserHistory) SelectOneUserHistoryById

func (*UserHistory) SelectOneUserHistoryById(id int) (info UserHistory)

读取单个用户历史信息通过id

func (*UserHistory) TableEngine

func (*UserHistory) TableEngine() string

func (*UserHistory) TableName

func (*UserHistory) TableName() string

func (*UserHistory) UpdateUserHistory

func (*UserHistory) UpdateUserHistory(history UserHistory) int

修改用户历史信息

type UserInfo

type UserInfo struct {
	Id         int    `orm:"pk"`
	Version    int    //版本
	Mobile     string //手机号
	Status     int    //状态
	EditTime   string
	CreateTime string
	UserName   string //用户名
	LoginName  string //用户登录名
	LoginPwd   string //登录密码
	Salt       string //密码盐

	//权限1:VIP用户;2:普通用户;3:对接用户
	//TODO:VIP用户能使用B2C转账功能,无法添加用户
	Authority int

	TotalAmount  float64 //总金额
	UsableAmount float64 //可用金额
	FrozenAmount float64 //冻结金额
	ApiKey       string  `orm:"type(text)"` //对接用户的api密钥
	PayFee       float64 //代付单笔手续费,元
	RechargeFee  float64 //充值单笔手续费,元
	RechargeRate float64 //充值单笔费率,千分之几

	PayByRecord      float64 `orm:"-"` //根据账单算提现
	RechargeByRecord float64 `orm:"-"` //根据账单算充值
	TransferByRecord float64 `orm:"-"` //根据账单算转账
	ProfitByRecord   float64 `orm:"-"` //根据账单算利润
	BalanceByRecord  float64 `orm:"-"` //根据账单算余额
	HandleAddition   float64 `orm:"-"` //手动加款
	HandleDeduction  float64 `orm:"-"` //手动减款

	PayByRecordToday      float64 `orm:"-"` //根据账单算今日提现
	RechargeByRecordToday float64 `orm:"-"` //根据账单算今日充值
	TransferByRecordToday float64 `orm:"-"` //根据账单算今日转账
	ProfitByRecordToday   float64 `orm:"-"` //根据账单算今日利润
}

用户信息结构

func (*UserInfo) InsertUsers

func (*UserInfo) InsertUsers(sr UserInfo) (int, int64)

* * @Description: 添加用户信息 * @Author: Joker * @Date: 2019.04.01 11:43 * @Param: sr: 用户信息 * @return: int: 判断成功的标识 * @return: int64: 在表中哪一行插入 *

func (*UserInfo) SelectOneUser

func (*UserInfo) SelectOneUser(loginName string) (conf UserInfo)

读取单个用户信息通过登录账号

func (*UserInfo) SelectOneUserAddition

func (the *UserInfo) SelectOneUserAddition(userId int, amount float64, record RechargeRecord) int

用户加款

func (*UserInfo) SelectOneUserAdditionNotFee

func (the *UserInfo) SelectOneUserAdditionNotFee(userId int, amount float64, record TransferRecord) int

用户加款不扣充值手续费

func (*UserInfo) SelectOneUserById

func (*UserInfo) SelectOneUserById(id int) (info UserInfo, err error)

读取单个用户信息通过id

func (*UserInfo) SelectOneUserByUserName

func (*UserInfo) SelectOneUserByUserName(loginName string) (conf UserInfo)

通过用户名查询用户信息

func (*UserInfo) SelectOneUserDeductionForFail

func (the *UserInfo) SelectOneUserDeductionForFail(userId int, amount float64, record WithdrawRecord) int

用户提现失败 不减款

func (*UserInfo) SelectOneUserDeductionForSuccess

func (the *UserInfo) SelectOneUserDeductionForSuccess(userId int, amount float64, record WithdrawRecord) int

用户提现成功 减款

func (*UserInfo) SelectOneUserFrozenSection

func (the *UserInfo) SelectOneUserFrozenSection(userId int, amount float64, record WithdrawRecord) int

用户提现处理中 冻结款

func (*UserInfo) SelectOneUserUsableAmount

func (the *UserInfo) SelectOneUserUsableAmount(userId int, amount float64, record WithdrawRecord) (bool, string)

判断账户可用余额 用户提现处理中 冻结款

func (*UserInfo) SelectUserListPage

func (*UserInfo) SelectUserListPage(params map[string]interface{}, limit, offset int) (list []UserInfo)

查询分页

func (*UserInfo) SelectUserPageCount

func (*UserInfo) SelectUserPageCount(params map[string]interface{}) int

func (*UserInfo) TableEngine

func (*UserInfo) TableEngine() string

func (*UserInfo) TableName

func (*UserInfo) TableName() string

func (*UserInfo) UpdateUserInfo

func (*UserInfo) UpdateUserInfo(info UserInfo) int

修改用户信息

func (*UserInfo) UserIsExit

func (*UserInfo) UserIsExit(uName string) bool

判断当前登录用户是否存在

type UserInfoExpansion

type UserInfoExpansion struct {
	UserId     int `orm:"pk;column(user_id)"`
	CreateTime string
	EditTime   string
	Version    int
	Ips        string `orm:"type(text)"`
}

func (*UserInfoExpansion) InsertUserInfoExpansion

func (*UserInfoExpansion) InsertUserInfoExpansion(sr UserInfoExpansion) (int, int64)

* * @Description: 添加用户扩展信息 * @Author: Joker * @Date: 2019-4-15 17:53:58 * @Param: sr: 用户扩展信息 * @return: int: 判断成功的标识 * @return: int64: 在表中哪一行插入 *

func (*UserInfoExpansion) SelectOneUserInfoExpansion

func (*UserInfoExpansion) SelectOneUserInfoExpansion(id int) (userExpand UserInfoExpansion)

读取单个用户信息通过登录账号

func (*UserInfoExpansion) TableEngine

func (*UserInfoExpansion) TableEngine() string

func (*UserInfoExpansion) TableName

func (*UserInfoExpansion) TableName() string

func (*UserInfoExpansion) UpdateUserInfoExpansion

func (*UserInfoExpansion) UpdateUserInfoExpansion(u UserInfoExpansion) int

修改用户扩展信息

type UserReconcileDao

type UserReconcileDao struct {
	UserId      string `column:"and,user_id,="`
	EditTime    string `column:"and,edit_time,>="`
	EditTimeEnd string `column:"and,edit_time,<="`
	Status      string `column:"and,status,="`
}

查询条件

func (*UserReconcileDao) SelectCountSuccessPay

func (*UserReconcileDao) SelectCountSuccessPay(urd UserReconcileDao) (c Count)

计算成功代付金额

func (*UserReconcileDao) SelectCountSuccessRecharge

func (*UserReconcileDao) SelectCountSuccessRecharge(urd UserReconcileDao) (c Count)

计算成功充值金额

func (*UserReconcileDao) SelectCountSuccessTransfer

func (*UserReconcileDao) SelectCountSuccessTransfer(urd UserReconcileDao) (c Count)

计算成功转账金额

type WithdrawRecord

type WithdrawRecord struct {
	Id               int
	UserId           int
	MerchantNo       string
	CreateTime       string
	EditTime         string
	Version          int
	SerialNumber     string
	WhOrderId        string
	WhAmount         float64
	WhUserType       string
	WhAccountNo      string
	WhIssuer         string
	WhAccountName    string
	WhAccountType    string
	WhMobileNo       string
	WhBankNo         string
	WhBranchProvince string
	WhBranchCity     string
	WhBranchName     string
	Status           string
	RecordType       string
	NoticeUrl        string `orm:"type(text)"`
	Remark           string
	RecordClass      string
	ApiNoticeUrl     string `orm:"type(text)"`
	Item             string

	UserName string `orm:"-"`
}

func (*WithdrawRecord) InsertWithdrawRecord

func (*WithdrawRecord) InsertWithdrawRecord(w WithdrawRecord) (int, int64)

* * @Description: 添加代付记录 * @Author: Joker * @Date: 2019-4-10 16:50:16 * @Param: Merchant * @return: int: 判断成功的标识 * @return: int64: 在表中哪一行插入 *

func (*WithdrawRecord) SelectAllWithdrawRecordBy

func (*WithdrawRecord) SelectAllWithdrawRecordBy(params map[string]interface{}) (list []WithdrawRecord)

根据条件查询所有代付记录

func (*WithdrawRecord) SelectOneWithdrawRecord

func (*WithdrawRecord) SelectOneWithdrawRecord(id string) (w WithdrawRecord)

读取单个代付记录

func (*WithdrawRecord) SelectOneWithdrawRecordByOrderId

func (*WithdrawRecord) SelectOneWithdrawRecordByOrderId(id string) (w WithdrawRecord)

读取单个代付记录通过 订单号

func (*WithdrawRecord) SelectWithdrawRecordListPage

func (*WithdrawRecord) SelectWithdrawRecordListPage(params map[string]interface{}, limit, offset int) (list []WithdrawRecord)

查询分页

func (*WithdrawRecord) SelectWithdrawRecordPageCount

func (*WithdrawRecord) SelectWithdrawRecordPageCount(params map[string]interface{}) int

func (*WithdrawRecord) TableEngine

func (*WithdrawRecord) TableEngine() string

func (*WithdrawRecord) TableName

func (*WithdrawRecord) TableName() string

func (*WithdrawRecord) UpdateWithdrawRecord

func (*WithdrawRecord) UpdateWithdrawRecord(w WithdrawRecord) int

修改充值记录

func (*WithdrawRecord) WithdrawRecordIsExit

func (*WithdrawRecord) WithdrawRecordIsExit(orderId string) bool

判断订单是否存在

type XFBalanceQueryData

type XFBalanceQueryData struct {
	MerchantId string `json:"merchantId"` //商户编号
}

先锋余额查询加密数据

type XFPayData

type XFPayData struct {
	MerchantNo     string `json:"merchantNo"`     //商户订单号
	Source         string `json:"source"`         //来源
	Amount         string `json:"amount"`         //金额
	TransCur       string `json:"transCur"`       //币种
	UserType       string `json:"userType"`       //用户类型
	AccountNo      string `json:"accountNo"`      //账户号
	AccountName    string `json:"accountName"`    //账户名称
	AccountType    string `json:"accountType"`    //账户类型
	MobileNo       string `json:"mobileNo"`       //手机号
	BankNo         string `json:"bankNo"`         //银行编码
	Issuer         string `json:"issuer"`         //联行号
	BranchProvince string `json:"branchProvince"` //开户省
	BranchCity     string `json:"branchCity"`     //开户市
	BranchName     string `json:"branchName"`     //开户支行名称
	TradeProduct   string `json:"tradeProduct"`   //开户支行名称
	NoticeUrl      string `json:"noticeUrl"`      //后台通知地址
	Memo           string `json:"memo"`           //保留域
	TerminalParams string `json:"terminalParams"` //终端信息
}

先锋代付加密数据

type XFPayResponseBody

type XFPayResponseBody struct {
	MerchantId string `json:"merchantId"` //商户号
	MerchantNo string `json:"merchantNo"` //商户订单号
	Amount     string `json:"amount"`     //金额
	TransCur   string `json:"transCur"`   //币种
	TradeNo    string `json:"tradeNo"`    //交易订单号
	TradeTime  string `json:"tradeTime"`  //交易完成时间
	Status     string `json:"status"`     //订单状态
	Memo       string `json:"memo"`       //保留域
	ResCode    string `json:"resCode"`    //应答码
	ResMessage string `json:"resMessage"` //应答信息
	TradeType  string `json:"tradeType"`  //交易类型
	Sign       string `json:"sign"`       //订单签名数据
	ErrorCode  string `json:"errorCode"`  //应答码
	ErrorMsg   string `json:"errorMsg"`   //应答信息
}

先锋代付响应返回参数

type XFQueryResponseBody

type XFQueryResponseBody struct {
	ResCode         string `json:"resCode"`
	ResMessage      string `json:"resMessage"`
	Balance         string `json:"balance"`         //账户总余额单位(分)
	FreezeAmount    string `json:"freezeAmount"`    //出款在途金额(不可用)单位(分)
	Available       string `json:"available"`       //可用金额(总金额-冻结金额)单位(分)
	NonAdvance      string `json:"nonAdvance"`      //代发不会产生垫资的金额,单位(分)
	PreviousBalance string `json:"previousBalance"` //期初余额,单位(分)
}

先锋代付余额查询返回参数

type XFRechargeData

type XFRechargeData struct {
	MerchantNo  string `json:"merchantNo"`  //商户订单号
	Amount      string `json:"amount"`      //金额
	TransCur    string `json:"transCur"`    //币种
	AccountNo   string `json:"accountNo"`   //账户号
	AccountName string `json:"accountName"` //账户名称
	RecevieBank string `json:"recevieBank"` //备付金账户标识
	NoticeUrl   string `json:"noticeUrl"`   //后台通知地址
}

先锋充值加密数据

type XFRechargeQueryData

type XFRechargeQueryData struct {
	MerchantNo string `json:"merchantNo"` //商户订单号
}

先锋充值查询加密数据

type XFRechargeResponseBody

type XFRechargeResponseBody struct {
	MerchantId string `json:"merchantId"` //商户号
	MerchantNo string `json:"merchantNo"` //商户订单号
	TradeNo    string `json:"tradeNo"`    //先锋 交易订单号
	Status     string `json:"status"`     //订单状态
	TradeTime  string `json:"tradeTime"`  //交易完成时间
	Memo       string `json:"memo"`       //保留域
	ResCode    string `json:"resCode"`    //应答码
	ResMessage string `json:"resMessage"` //应答信息
	Sign       string `json:"sign"`       //订单签名数据
}

先锋充值响应返回参数

Directories

Path Synopsis
**************************************************
**************************************************

Jump to

Keyboard shortcuts

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