由gopath形式改为module

This commit is contained in:
kongyuebin
2021-04-27 15:33:49 +08:00
parent aef4dbb33c
commit 77d895e83a
1117 changed files with 332447 additions and 20 deletions

68
gateway/enum/bank_info.go Normal file
View File

@@ -0,0 +1,68 @@
/***************************************************
** @Desc : This file for 银行编码
** @Time : 19.12.4 10:42
** @Author : Joker
** @File : bank_info
** @Last Modified by : Joker
** @Last Modified time: 19.12.4 10:42
** @Software: GoLand
****************************************************/
package enum
const (
ICBC = "ICBC"
ABC = "ABC"
BOC = "BOC"
CCB = "CCB"
BOCOM = "BOCOM"
CNCB = "CNCB"
CEB = "CEB"
HXB = "HXB"
CMBC = "CMBC"
GDB = "GDB"
CMB = "CMB"
CIB = "CIB"
SPDB = "SPDB"
PSBC = "PSBC"
PAB = "PAB"
NJCB = "NJCB"
NBCB = "NBCB"
WZCB = "WZCB"
CSCB = "CSCB"
CZCB = "CZCB"
CCQTGB = "CCQTGB"
SHRCB = "SHRCB"
BJRCB = "BJRCB"
SDB = "SDB"
)
var bankInfo = map[string]string{
ICBC: "中国工商银行",
ABC: "中国农业银行",
BOC: "中国银行",
CCB: "中国建设银行",
BOCOM: "交通银行",
CNCB: "中信银行",
CEB: "中国光大银行",
HXB: "华夏银行",
CMBC: "中国民生银行",
GDB: "广发银行",
CMB: "招商银行",
CIB: "兴业银行",
SPDB: "浦发银行",
PSBC: "中国邮政储蓄银行",
PAB: "平安银行",
NJCB: "南京银行",
NBCB: "宁波银行",
WZCB: "温州市商业银行",
CSCB: "长沙银行",
CZCB: "浙江稠州商业银行",
CCQTGB: "重庆三峡银行",
SHRCB: "上海农村商业银行",
BJRCB: "北京农商行",
SDB: "深圳发展银行",
}
func GetBankInfo() map[string]string {
return bankInfo
}

34
gateway/enum/conf.go Normal file
View File

@@ -0,0 +1,34 @@
/***************************************************
** @Desc : This file for 配置常量
** @Time : 2019.04.01 11:45
** @Author : Joker
** @File : strings
** @Last Modified by : Joker
** @Last Modified time: 2019-11-29 11:05:48
** @Software: GoLand
****************************************************/
package enum
// 对接云片
// 短信配置
const (
ApiKey = "fd264ab6c43c02c52s40eab1ba"
TPL1 = 332236
SendSmsUrl = "https://sms.yunpian.com/v2/sms/tpl_single_send.json"
)
// session 配置
const (
SessionPath = "./sys/temp" // 保存路径
SessionExpireTime = 9600 // 有效时间,秒
CookieExpireTime = 1800 // 有效时间,秒
SmsCookieExpireTime = 60 // 有效时间,秒
LocalSessionName = "JOKERSession" // 客户端session名称
)
// 提现限制金额
const (
WithdrawalMaxAmount = 45000
WithdrawalMinAmount = 2
SettlementFee = 2 // 提现单笔手续费
)

26
gateway/enum/constant.go Normal file
View File

@@ -0,0 +1,26 @@
/***************************************************
** @Desc : This file for 系统常量
** @Time : 19.11.30 11:28
** @Author : Joker
** @File : constant
** @Last Modified by : Joker
** @Last Modified time: 19.11.30 11:28
** @Software: GoLand
****************************************************/
package enum
const (
UserSession = "agent_user"
UserCookie = "agent_user_cookie_md5"
DoMainUrl = "/index/ui/"
PublicAccount = "1" // 对公帐户
PrivateDebitAccount = "0" // 对私借记卡
SettleSingle = "SELFHELP_SETTLE" // 单笔代付
ExcelModelName = "batch_daifa_template.xlsx"
ExcelModelPath = "static/excel/batch_daifa_template.xlsx"
ExcelPath = "static/excel/temp/"
ExcelDownloadPath = "static/excel/download/"
)

60
gateway/enum/pay_type.go Normal file
View File

@@ -0,0 +1,60 @@
/***************************************************
** @Desc : This file for 支付方式
** @Time : 19.12.3 15:24
** @Author : Joker
** @File : pay_type
** @Last Modified by : Joker
** @Last Modified time: 19.12.3 15:24
** @Software: GoLand
****************************************************/
package enum
const (
WEIXIN_SCAN = "WEIXIN_SCAN"
WEIXIN_H5 = "WEIXIN_H5"
WEIXIN_SYT = "WEIXIN_SYT"
ALI_SCAN = "ALI_SCAN"
ALI_H5 = "ALI_H5"
ALI_SYT = "ALI_SYT"
QQ_SCAN = "QQ_SCAN"
QQ_H5 = "QQ_H5"
QQ_SYT = "QQ_SYT"
UNION_SCAN = "UNION_SCAN"
UNION_H5 = "UNION_H5"
UNION_PC_WAP = "UNION_PC_WAP"
UNION_SYT = "UNION_SYT"
UNION_FAST = "UNION_FAST"
BAIDU_SCAN = "BAIDU_SCAN"
BAIDU_H5 = "BAIDU_H5"
BAIDU_SYT = "BAIDU_SYT"
JD_SCAN = "JD_SCAN"
JD_H5 = "JD_H5"
JD_SYT = "JD_SYT"
)
var payType = map[string]string{
WEIXIN_SCAN: "微信扫码",
WEIXIN_H5: "微信H5",
WEIXIN_SYT: "微信收银台",
ALI_SCAN: "支付宝扫码",
ALI_H5: "支付宝H5",
ALI_SYT: "支付宝收银台",
QQ_SCAN: "QQ扫码",
QQ_H5: "QQ-H5",
QQ_SYT: "QQ收银台",
UNION_SCAN: "银联扫码",
UNION_H5: "银联H5",
UNION_PC_WAP: "银联pc-web",
UNION_SYT: "银联收银台",
UNION_FAST: "银联快捷",
BAIDU_SCAN: "百度钱包扫码",
BAIDU_H5: "百度钱包H5",
BAIDU_SYT: "百度钱包收银台",
JD_SCAN: "京东扫码",
JD_H5: "京东H5",
JD_SYT: "京东收银台",
}
func GetPayType() map[string]string {
return payType
}

View File

@@ -0,0 +1,16 @@
/***************************************************
** @Desc : This file for 正则表达式
** @Time : 19.12.5 10:25
** @Author : Joker
** @File : regular_expression
** @Last Modified by : Joker
** @Last Modified time: 19.12.5 10:25
** @Software: GoLand
****************************************************/
package enum
const (
PasswordReg = `^[a-zA-Z]{1}([a-zA-Z0-9]|[._]){5,19}$`
MoneyReg = `^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$`
MobileReg = `^[1]([3-9])[0-9]{9}$`
)

133
gateway/enum/status.go Normal file
View File

@@ -0,0 +1,133 @@
/***************************************************
** @Desc : This file for 状态常量
** @Time : 19.11.30 11:12
** @Author : Joker
** @File : status
** @Last Modified by : Joker
** @Last Modified time: 19.11.30 11:12
** @Software: GoLand
****************************************************/
package enum
// 成功与否
const (
FailedFlag = -9
FailedString = "操作失败! "
FailedToAdmin = "系统内部错误,请联系管理员!"
SuccessFlag = 9
SuccessString = "操作成功! "
)
// 用户状态
const (
ACTIVE = "active"
FREEZE = "FREEZE"
UNACTIVE = "unactive"
)
var userStatus = map[string]string{
ACTIVE: "激活",
FREEZE: "冻结",
UNACTIVE: "冻结",
}
// 用户状态
func GetUserStatus() map[string]string {
return userStatus
}
// 充值订单状态
const (
SUCCESS = "success"
FAILED = "failed"
WAITING_PAYMENT = "wait"
)
var orderStatus = map[string]string{
SUCCESS: "交易成功",
FAILED: "交易失败",
WAITING_PAYMENT: "等待支付",
}
// 充值订单状态
func GetOrderStatus() map[string]string {
return orderStatus
}
// 投诉订单状态
const (
YES = "yes"
NO = "no"
)
var orderComStatus = map[string]string{
YES: "冻结",
NO: "未冻结",
}
// 投诉订单状态
func GetComOrderStatus() map[string]string {
return orderComStatus
}
// 结算订单状态
const (
WAIT_CONFIRM = "payfor_confirm"
REMITTING = "payfor_solving"
REMIT_FAIL = "failed"
BANK_DEALING = "payfor_banking"
REMIT_SUCCESS = "success"
)
var settlementStatus = map[string]string{
WAIT_CONFIRM: "等待审核",
REMITTING: "打款中",
REMIT_FAIL: "打款失败",
BANK_DEALING: "银行处理中",
REMIT_SUCCESS: "打款成功",
}
// 结算订单状态
func GetSettlementStatus() map[string]string {
return settlementStatus
}
// 充值订单状态
const (
RECHARGE = "recharge"
REFUND = "refund"
FREEZER = "freeze"
UNFREEZE = "unfreeze"
)
var rechargeStatus = map[string]string{
RECHARGE: "充值",
REFUND: "退款",
FREEZER: "冻结",
UNFREEZE: "解冻",
}
// 充值订单状态
func GetRechargeStatus() map[string]string {
return rechargeStatus
}
// 历史记录状态
const (
PLUS_AMOUNT = "plus_amount"
SUB_AMOUNT = "sub_amount"
FREEZE_AMOUNT = "freeze_amount"
UNFREEZE_AMOUNT = "unfreeze_amount"
)
var historyStatus = map[string]string{
PLUS_AMOUNT: "加款",
SUB_AMOUNT: "减款",
FREEZE_AMOUNT: "冻结",
UNFREEZE_AMOUNT: "解冻",
}
// 历史记录状态
func GetHistoryStatus() map[string]string {
return historyStatus
}