🎉代码初始化
This commit is contained in:
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
9
.idea/boss.iml
generated
Normal file
9
.idea/boss.iml
generated
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="Go" enabled="true" />
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/boss.iml" filepath="$PROJECT_DIR$/.idea/boss.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
1
build.sh
Normal file
1
build.sh
Normal file
@@ -0,0 +1 @@
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build main.go
|
||||
50
common/consts.go
Normal file
50
common/consts.go
Normal file
@@ -0,0 +1,50 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/11/25 14:14
|
||||
** @Author : yuebin
|
||||
** @File : consts.go
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/11/25 14:14
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package common
|
||||
|
||||
const (
|
||||
ACTIVE = "active"
|
||||
UNACTIVE = "unactive"
|
||||
DELETE = "delete"
|
||||
REFUND = "refund"
|
||||
ORDERROLL = "order_roll"
|
||||
WAIT = "wait"
|
||||
SUCCESS = "success"
|
||||
FAIL = "fail"
|
||||
YES = "yes"
|
||||
NO = "no"
|
||||
ZERO = 0.0 //0元手续费
|
||||
VERIFY_CODE_LEN = 4 //验证码的长度
|
||||
PAYFOR_FEE = 2.00 //代付手续费
|
||||
PAYFOR_INTERVAL = 5 //每过5分钟执行一次代付
|
||||
|
||||
PLUS_AMOUNT = "plus_amount" //加款操作
|
||||
SUB_AMOUNT = "sub_amount" //减款操作
|
||||
FREEZE_AMOUNT = "freeze_amount" //冻结操作
|
||||
UNFREEZE_AMOUNT = "unfreeze_amount" //解冻操作
|
||||
|
||||
PAYFOR_COMFRIM = "payfor_confirm" //下发带审核
|
||||
PAYFOR_SOLVING = "payfor_solving" //发下处理中
|
||||
PAYFOR_HANDING = "payfor_handing" //手动打款中
|
||||
PAYFOR_BANKING = "payfor_banking" //银行处理中
|
||||
PAYFOR_FAIL = "payfor_fail" //代付失败
|
||||
PAYFOR_SUCCESS = "payfor_success" //代付成功
|
||||
|
||||
PAYFOR_ROAD = "payfor_road" //通道打款
|
||||
PAYFOR_HAND = "payfor_hand" //手动打款
|
||||
PAYFOR_REFUSE = "payfor_refuse" // 拒绝打款
|
||||
|
||||
SELF_API = "self_api" //自助api系统下发
|
||||
SELF_MERCHANT = "self_merchant" //管理手动处理商户下发
|
||||
SELF_HELP = "self_help" //管理自己提现
|
||||
|
||||
PUBLIC = "public" //对公卡
|
||||
PRIVATE = "private" //对私卡
|
||||
)
|
||||
23
common/supplier.go
Normal file
23
common/supplier.go
Normal file
@@ -0,0 +1,23 @@
|
||||
/***************************************************
|
||||
** @Desc : 上有支付公司的编号
|
||||
** @Time : 2019/10/28 10:47
|
||||
** @Author : yuebin
|
||||
** @File : supplier
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/10/28 10:47
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package common
|
||||
|
||||
// 添加新的上游通道时,需要添加这里
|
||||
var supplierCode2Name = map[string]string{
|
||||
"KF": "快付支付",
|
||||
"WEIXIN": "官方微信",
|
||||
"ALIPAY": "官方支付宝",
|
||||
"DAILI": "代丽支付",
|
||||
"MF178": "蜜蜂178卡密",
|
||||
}
|
||||
|
||||
func GetSupplierMap() map[string]string {
|
||||
return supplierCode2Name
|
||||
}
|
||||
19
conf/app.conf
Normal file
19
conf/app.conf
Normal file
@@ -0,0 +1,19 @@
|
||||
appname = jhboss
|
||||
httpport = 12306
|
||||
runmode = dev
|
||||
HTTPAddr = localhost
|
||||
sessionon = true
|
||||
|
||||
[mysql]
|
||||
dbhost = localhost
|
||||
dbport = 3306
|
||||
dbuser = root
|
||||
dbpasswd = 123456
|
||||
dbbase = juhe_pay
|
||||
|
||||
[gateway]
|
||||
host = http://localhost:12309/
|
||||
|
||||
[testExtraLink]
|
||||
; 测试连接
|
||||
host = http://localhost:12305
|
||||
440
controllers/addController.go
Normal file
440
controllers/addController.go
Normal file
@@ -0,0 +1,440 @@
|
||||
/***************************************************
|
||||
** @Desc : c file for ...
|
||||
** @Time : 2019/8/19 18:13
|
||||
** @Author : yuebin
|
||||
** @File : add
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/8/19 18:13
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"boss/common"
|
||||
"boss/datas"
|
||||
"boss/models/merchant"
|
||||
"boss/models/payfor"
|
||||
"boss/models/road"
|
||||
"boss/models/system"
|
||||
"boss/service"
|
||||
"boss/utils"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
"github.com/rs/xid"
|
||||
)
|
||||
|
||||
type AddController struct {
|
||||
BaseController
|
||||
}
|
||||
|
||||
/*
|
||||
* 添加一级菜单
|
||||
*/
|
||||
func (c *AddController) AddMenu() {
|
||||
oneMenu := c.GetString("oneMenu")
|
||||
userID := c.GetSession("userID").(string)
|
||||
se := new(service.AddService)
|
||||
dataJSON := se.AddMenu(oneMenu, userID)
|
||||
c.GenerateJSON(dataJSON)
|
||||
}
|
||||
|
||||
/*
|
||||
* 添加二级菜单
|
||||
*/
|
||||
func (c *AddController) AddSecondMenu() {
|
||||
firstMenuUid := c.GetString("preMenuUid")
|
||||
secondMenu := c.GetString("secondMenu")
|
||||
secondRouter := c.GetString("secondRouter")
|
||||
userID := c.GetSession("userID").(string)
|
||||
|
||||
se := new(service.AddService)
|
||||
dataJSON := se.AddSecondMenu(firstMenuUid, secondRouter, secondMenu, userID)
|
||||
|
||||
c.GenerateJSON(dataJSON)
|
||||
}
|
||||
|
||||
/*
|
||||
* 添加权限项的处理函数
|
||||
*/
|
||||
func (c *AddController) AddPower() {
|
||||
firstMenuUid := strings.TrimSpace(c.GetString("firstMenuUid"))
|
||||
secondMenuUid := strings.TrimSpace(c.GetString("secondMenuUid"))
|
||||
powerItem := strings.TrimSpace(c.GetString("powerItem"))
|
||||
powerID := strings.TrimSpace(c.GetString("powerID"))
|
||||
userID := c.GetSession("userID").(string)
|
||||
|
||||
se := new(service.AddService)
|
||||
keyDataJSON := se.AddPower(powerItem, powerID, firstMenuUid, secondMenuUid, userID)
|
||||
|
||||
c.GenerateJSON(keyDataJSON)
|
||||
}
|
||||
|
||||
/*
|
||||
* 添加权限角色
|
||||
*/
|
||||
func (c *AddController) AddRole() {
|
||||
roleName := strings.TrimSpace(c.GetString("roleNameAdd"))
|
||||
roleRemark := strings.TrimSpace(c.GetString("roleRemark"))
|
||||
userID := c.GetSession("userID").(string)
|
||||
se := new(service.AddService)
|
||||
keyDataJSON := se.AddRole(roleName, roleRemark, userID)
|
||||
c.GenerateJSON(keyDataJSON)
|
||||
}
|
||||
|
||||
func (c *AddController) SavePower() {
|
||||
firstMenuUids := c.GetStrings("firstMenuUid[]")
|
||||
secondMenuUids := c.GetStrings("secondMenuUid[]")
|
||||
powerIds := c.GetStrings("powerId[]")
|
||||
roleUid := strings.TrimSpace(c.GetString("roleUid"))
|
||||
|
||||
se := new(service.AddService)
|
||||
dataJSON := se.SavePower(roleUid, firstMenuUids, secondMenuUids, powerIds)
|
||||
c.GenerateJSON(dataJSON)
|
||||
}
|
||||
|
||||
/*
|
||||
* 添加操作员
|
||||
*/
|
||||
func (c *AddController) AddOperator() {
|
||||
loginAccount := strings.TrimSpace(c.GetString("operatorAccount"))
|
||||
loginPassword := strings.TrimSpace(c.GetString("operatorPassword"))
|
||||
role := strings.TrimSpace(c.GetString("operatorRole"))
|
||||
status := strings.TrimSpace(c.GetString("status"))
|
||||
remark := strings.TrimSpace(c.GetString("remark"))
|
||||
|
||||
se := new(service.AddService)
|
||||
keyDataJSON := se.AddOperator(loginAccount, loginPassword, role, status, remark)
|
||||
|
||||
c.GenerateJSON(keyDataJSON)
|
||||
}
|
||||
|
||||
/*
|
||||
* 添加银行卡
|
||||
*/
|
||||
func (c *AddController) AddBankCard() {
|
||||
userName := strings.TrimSpace(c.GetString("userName"))
|
||||
bankCode := strings.TrimSpace(c.GetString("bankCode"))
|
||||
accountName := strings.TrimSpace(c.GetString("accountName"))
|
||||
certificateType := strings.TrimSpace(c.GetString("certificateType"))
|
||||
phoneNo := strings.TrimSpace(c.GetString("phoneNo"))
|
||||
bankName := strings.TrimSpace(c.GetString("bankName"))
|
||||
bankAccountType := strings.TrimSpace(c.GetString("bankAccountType"))
|
||||
bankNo := strings.TrimSpace(c.GetString("bankNo"))
|
||||
identifyCard := strings.TrimSpace(c.GetString("certificateType"))
|
||||
certificateNo := strings.TrimSpace(c.GetString("certificateNo"))
|
||||
bankAddress := strings.TrimSpace(c.GetString("bankAddress"))
|
||||
uid := strings.TrimSpace(c.GetString("uid"))
|
||||
|
||||
se := new(service.AddService)
|
||||
dataJSON := se.AddBankCard(userName, bankCode, accountName, certificateType, phoneNo,
|
||||
bankName, bankAccountType, bankNo, certificateNo, bankAddress, uid, identifyCard)
|
||||
|
||||
c.GenerateJSON(dataJSON)
|
||||
}
|
||||
|
||||
/*
|
||||
* 添加通道
|
||||
*/
|
||||
func (c *AddController) AddRoad() {
|
||||
roadUid := strings.TrimSpace(c.GetString("roadUid"))
|
||||
roadName := strings.TrimSpace(c.GetString("roadName"))
|
||||
roadRemark := strings.TrimSpace(c.GetString("roadRemark"))
|
||||
productUid := strings.TrimSpace(c.GetString("productName"))
|
||||
payType := strings.TrimSpace(c.GetString("payType"))
|
||||
basicRate := strings.TrimSpace(c.GetString("basicRate"))
|
||||
settleFee := strings.TrimSpace(c.GetString("settleFee"))
|
||||
roadTotalLimit := strings.TrimSpace(c.GetString("roadTotalLimit"))
|
||||
roadEverydayLimit := strings.TrimSpace(c.GetString("roadEverydayLimit"))
|
||||
singleMinLimit := strings.TrimSpace(c.GetString("singleMinLimit"))
|
||||
singleMaxLimit := strings.TrimSpace(c.GetString("singleMaxLimit"))
|
||||
startHour := strings.TrimSpace(c.GetString("startHour"))
|
||||
endHour := strings.TrimSpace(c.GetString("endHour"))
|
||||
params := strings.TrimSpace(c.GetString("params"))
|
||||
|
||||
se := new(service.AddService)
|
||||
dataJSON := se.AddRoad(startHour, endHour, roadName, productUid, payType, basicRate, settleFee,
|
||||
roadTotalLimit, roadEverydayLimit, singleMinLimit, singleMaxLimit, roadUid, roadRemark, params)
|
||||
|
||||
c.GenerateJSON(dataJSON)
|
||||
}
|
||||
|
||||
func (c *AddController) AddRoadPool() {
|
||||
roadPoolName := strings.TrimSpace(c.GetString("roadPoolName"))
|
||||
roadPoolCode := strings.TrimSpace(c.GetString("roadPoolCode"))
|
||||
|
||||
se := new(service.AddService)
|
||||
keyDataJSON := se.AddRoadPool(roadPoolName, roadPoolCode)
|
||||
|
||||
c.GenerateJSON(keyDataJSON)
|
||||
}
|
||||
|
||||
/*
|
||||
* 添加或者更新通道池中的通道
|
||||
*/
|
||||
func (c *AddController) SaveRoadUid() {
|
||||
roadUids := c.GetStrings("roadUid[]")
|
||||
roadPoolCode := strings.TrimSpace(c.GetString("roadPoolCode"))
|
||||
|
||||
se := new(service.AddService)
|
||||
dataJSON := se.SaveRoadUid(roadPoolCode, roadUids)
|
||||
|
||||
c.GenerateJSON(dataJSON)
|
||||
}
|
||||
|
||||
/*
|
||||
* 添加代理信息
|
||||
*/
|
||||
func (c *AddController) AddAgent() {
|
||||
agentName := strings.TrimSpace(c.GetString("agentName"))
|
||||
agentPhone := strings.TrimSpace(c.GetString("agentPhone"))
|
||||
agentLoginPassword := strings.TrimSpace(c.GetString("agentLoginPassword"))
|
||||
agentVertifyPassword := strings.TrimSpace(c.GetString("agentVertifyPassword"))
|
||||
agentRemark := strings.TrimSpace(c.GetString("agentRemark"))
|
||||
status := strings.TrimSpace(c.GetString("status"))
|
||||
agentUid := strings.TrimSpace(c.GetString("agentUid"))
|
||||
|
||||
se := new(service.AddService)
|
||||
keyDataJSON := se.AddAgent(agentName, agentPhone, agentLoginPassword, agentVertifyPassword, status, agentUid, agentRemark)
|
||||
|
||||
c.GenerateJSON(keyDataJSON)
|
||||
}
|
||||
|
||||
func (c *AddController) AddMerchant() {
|
||||
merchantName := strings.TrimSpace(c.GetString("merchantName"))
|
||||
phone := strings.TrimSpace(c.GetString("phone"))
|
||||
loginPassword := strings.TrimSpace(c.GetString("loginPassword"))
|
||||
verifyPassword := strings.TrimSpace(c.GetString("verifyPassword"))
|
||||
merchantStatus := strings.TrimSpace(c.GetString("merchantStatus"))
|
||||
remark := strings.TrimSpace(c.GetString("remark"))
|
||||
|
||||
se := new(service.AddService)
|
||||
keyDataJSON := se.AddMerchant(merchantName, phone, loginPassword, verifyPassword, merchantStatus, remark)
|
||||
c.GenerateJSON(keyDataJSON)
|
||||
}
|
||||
|
||||
/*
|
||||
* 添加商戶支付配置參數
|
||||
*/
|
||||
func (c *AddController) AddMerchantDeploy() {
|
||||
merchantUid := strings.TrimSpace(c.GetString("merchantNo"))
|
||||
isAutoSettle := strings.TrimSpace(c.GetString("isAutoSettle"))
|
||||
isAutoPayfor := strings.TrimSpace(c.GetString("isAutoPayfor"))
|
||||
ipWhite := strings.TrimSpace(c.GetString("ipWhite"))
|
||||
payforRoadChoose := strings.TrimSpace(c.GetString("payforRoadChoose"))
|
||||
rollPayforRoadChoose := strings.TrimSpace(c.GetString("rollPayforRoadChoose"))
|
||||
payforFee := strings.TrimSpace(c.GetString("payforFee"))
|
||||
belongAgentName := strings.TrimSpace(c.GetString("belongAgentName"))
|
||||
belongAgentUid := strings.TrimSpace(c.GetString("belongAgentUid"))
|
||||
|
||||
se := new(service.AddService)
|
||||
keyDataJSON := se.AddMerchantDeploy(merchantUid, isAutoSettle, isAutoPayfor, ipWhite, belongAgentName,
|
||||
belongAgentUid, payforRoadChoose, rollPayforRoadChoose, payforFee)
|
||||
|
||||
c.GenerateJSON(keyDataJSON)
|
||||
}
|
||||
|
||||
func (c *AddController) AddMerchantPayType() {
|
||||
merchantNo := strings.TrimSpace(c.GetString("merchantNo"))
|
||||
payType := strings.TrimSpace(c.GetString("payType"))
|
||||
singleRoad := strings.TrimSpace(c.GetString("singleRoad"))
|
||||
singleRoadPlatformFee := strings.TrimSpace(c.GetString("singleRoadPlatformFee"))
|
||||
singleRoadAgentFee := strings.TrimSpace(c.GetString("singleRoadAgentFee"))
|
||||
rollPoolRoad := strings.TrimSpace(c.GetString("rollPoolRoad"))
|
||||
rollRoadPlatformFee := strings.TrimSpace(c.GetString("rollRoadPlatformFee"))
|
||||
rollRoadAgentFee := strings.TrimSpace(c.GetString("rollRoadAgentFee"))
|
||||
isLoan := strings.TrimSpace(c.GetString("isLoan"))
|
||||
loanRate := strings.TrimSpace(c.GetString("loanRate"))
|
||||
loanDays := strings.TrimSpace(c.GetString("loanDays"))
|
||||
unfreezeTimeHour := strings.TrimSpace(c.GetString("unfreezeTimeHour"))
|
||||
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
if payType == "" || payType == "none" {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "操作失败,请选择支付类型"
|
||||
c.GenerateJSON(keyDataJSON)
|
||||
return
|
||||
}
|
||||
|
||||
if singleRoad == "" && rollPoolRoad == "" {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "单通道、轮询通道至少要有一个不为空!"
|
||||
}
|
||||
|
||||
if singleRoad != "" && singleRoadPlatformFee == "" {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "单通道平台利润率不能为0"
|
||||
}
|
||||
|
||||
if rollPoolRoad != "" && rollRoadPlatformFee == "" {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "轮询通道平台利润率不能为0"
|
||||
}
|
||||
|
||||
if keyDataJSON.Code == -1 {
|
||||
c.GenerateJSON(keyDataJSON)
|
||||
return
|
||||
}
|
||||
|
||||
//将字符串转变为float64或者int类型
|
||||
a, err := strconv.ParseFloat(singleRoadPlatformFee, 64)
|
||||
if err != nil {
|
||||
a = 0.0
|
||||
}
|
||||
b, err := strconv.ParseFloat(singleRoadAgentFee, 64)
|
||||
if err != nil {
|
||||
b = 0.0
|
||||
}
|
||||
cs, err := strconv.ParseFloat(rollRoadPlatformFee, 64)
|
||||
if err != nil {
|
||||
cs = 0.0
|
||||
}
|
||||
d, err := strconv.ParseFloat(rollRoadAgentFee, 64)
|
||||
if err != nil {
|
||||
d = 0.0
|
||||
}
|
||||
e, err := strconv.ParseFloat(loanRate, 64)
|
||||
if err != nil {
|
||||
e = 0.0
|
||||
}
|
||||
i, err := strconv.Atoi(loanDays)
|
||||
if err != nil {
|
||||
i = 0
|
||||
}
|
||||
j, err := strconv.Atoi(unfreezeTimeHour)
|
||||
if err != nil {
|
||||
j = 0
|
||||
}
|
||||
|
||||
var merchantDeployInfo merchant.MerchantDeployInfo
|
||||
merchantDeployInfo.MerchantUid = merchantNo
|
||||
merchantDeployInfo.PayType = payType
|
||||
merchantDeployInfo.SingleRoadName = singleRoad
|
||||
merchantDeployInfo.SingleRoadPlatformRate = a
|
||||
merchantDeployInfo.SingleRoadAgentRate = b
|
||||
merchantDeployInfo.RollRoadPlatformRate = cs
|
||||
merchantDeployInfo.RollRoadAgentRate = d
|
||||
merchantDeployInfo.IsLoan = isLoan
|
||||
merchantDeployInfo.LoanRate = e
|
||||
merchantDeployInfo.LoanDays = i
|
||||
merchantDeployInfo.UnfreezeHour = j
|
||||
merchantDeployInfo.RollRoadName = rollPoolRoad
|
||||
roadInfo := road.GetRoadInfoByName(singleRoad)
|
||||
rollPoolInfo := road.GetRoadPoolByName(rollPoolRoad)
|
||||
merchantDeployInfo.SingleRoadUid = roadInfo.RoadUid
|
||||
merchantDeployInfo.RollRoadCode = rollPoolInfo.RoadPoolCode
|
||||
|
||||
//如果该用户的改支付类型已经存在,那么进行更新,否则进行添加
|
||||
if merchant.IsExistByUidAndPayType(merchantNo, payType) {
|
||||
if singleRoad == "" && rollPoolRoad == "" {
|
||||
//表示需要删除该支付类型的通道
|
||||
if merchant.DeleteMerchantDeployByUidAndPayType(merchantNo, payType) {
|
||||
keyDataJSON.Code = 200
|
||||
keyDataJSON.Msg = "删除该支付类型通道成功"
|
||||
} else {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "删除该支付类型通道失败"
|
||||
}
|
||||
} else {
|
||||
tmpInfo := merchant.GetMerchantDeployByUidAndPayType(merchantNo, payType)
|
||||
merchantDeployInfo.Id = tmpInfo.Id
|
||||
merchantDeployInfo.Status = tmpInfo.Status
|
||||
merchantDeployInfo.UpdateTime = utils.GetBasicDateTime()
|
||||
merchantDeployInfo.CreateTime = tmpInfo.CreateTime
|
||||
if merchant.UpdateMerchantDeploy(merchantDeployInfo) {
|
||||
keyDataJSON.Code = 200
|
||||
keyDataJSON.Msg = "更新成功"
|
||||
} else {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "更新失败"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if singleRoad == "" && rollPoolRoad == "" {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "参数不能为空"
|
||||
} else {
|
||||
merchantDeployInfo.CreateTime = utils.GetBasicDateTime()
|
||||
merchantDeployInfo.UpdateTime = utils.GetBasicDateTime()
|
||||
merchantDeployInfo.Status = common.ACTIVE
|
||||
if merchant.InsertMerchantDeployInfo(merchantDeployInfo) {
|
||||
keyDataJSON.Code = 200
|
||||
keyDataJSON.Msg = "添加支付类型成功"
|
||||
} else {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "添加支付类型失败"
|
||||
}
|
||||
}
|
||||
}
|
||||
c.GenerateJSON(keyDataJSON)
|
||||
}
|
||||
|
||||
/*
|
||||
*后台提交的下发记录
|
||||
*/
|
||||
func (c *AddController) AddPayFor() {
|
||||
merchantUid := strings.TrimSpace(c.GetString("merchantUid"))
|
||||
merchantName := strings.TrimSpace(c.GetString("merchantName"))
|
||||
bankName := strings.TrimSpace(c.GetString("bankName"))
|
||||
accountName := strings.TrimSpace(c.GetString("accountName"))
|
||||
bankUid := strings.TrimSpace(c.GetString("bankUid"))
|
||||
bankNo := strings.TrimSpace(c.GetString("bankNo"))
|
||||
bankAddress := strings.TrimSpace(c.GetString("bankAddress"))
|
||||
phone := strings.TrimSpace(c.GetString("phone"))
|
||||
payForAmount := strings.TrimSpace(c.GetString("payForAmount"))
|
||||
|
||||
se := new(service.AddService)
|
||||
keyDataJSON := se.AddPayFor(merchantUid, bankUid, payForAmount, bankNo,
|
||||
accountName, phone, merchantName, bankName, bankAddress)
|
||||
|
||||
c.GenerateJSON(keyDataJSON)
|
||||
}
|
||||
|
||||
func (c *AddController) AddSelfPayFor() {
|
||||
bankUid := strings.TrimSpace(c.GetString("bankUid"))
|
||||
bankName := strings.TrimSpace(c.GetString("bankName"))
|
||||
accountName := strings.TrimSpace(c.GetString("accountName"))
|
||||
bankNo := strings.TrimSpace(c.GetString("bankNo"))
|
||||
bankAddress := strings.TrimSpace(c.GetString("bankAddress"))
|
||||
phone := strings.TrimSpace(c.GetString("phone"))
|
||||
payForAmount := strings.TrimSpace(c.GetString("payForAmount"))
|
||||
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
keyDataJSON.Code = -1
|
||||
|
||||
if bankUid == "" {
|
||||
keyDataJSON.Msg = "银行卡uid不能为空,请联系技术人员"
|
||||
c.GenerateJSON(keyDataJSON)
|
||||
return
|
||||
}
|
||||
money, err := strconv.ParseFloat(payForAmount, 64)
|
||||
if err != nil {
|
||||
logs.Error("self payfor money fail: ", err)
|
||||
keyDataJSON.Msg = "输入金额有误,请仔细检查"
|
||||
c.GenerateJSON(keyDataJSON)
|
||||
return
|
||||
}
|
||||
|
||||
bankInfo := system.GetBankCardByUid(bankUid)
|
||||
|
||||
//需要对前端传入的数据做校验,不能完全相信前端的数据
|
||||
if bankInfo.AccountName != accountName || bankInfo.BankNo != bankNo || bankInfo.PhoneNo != phone {
|
||||
keyDataJSON.Msg = "前端页面数据有篡改,请注意资金安全"
|
||||
c.GenerateJSON(keyDataJSON)
|
||||
return
|
||||
}
|
||||
|
||||
selfPayFor := payfor.PayforInfo{PayforUid: "pppp" + xid.New().String(), BankOrderId: "4444" + xid.New().String(), PayforFee: common.ZERO, Type: common.SELF_HELP,
|
||||
PayforAmount: money, PayforTotalAmount: money + common.ZERO, BankCode: bankInfo.BankCode, BankName: bankName, IsSend: common.NO,
|
||||
BankAccountName: bankInfo.AccountName, BankAccountNo: bankInfo.BankNo, BankAccountType: bankInfo.BankAccountType, BankAccountAddress: bankAddress,
|
||||
Status: common.PAYFOR_COMFRIM, CreateTime: utils.GetBasicDateTime(), UpdateTime: utils.GetBasicDateTime()}
|
||||
|
||||
if payfor.InsertPayfor(selfPayFor) {
|
||||
keyDataJSON.Code = 200
|
||||
} else {
|
||||
keyDataJSON.Msg = "数据处理失败,请重新提交"
|
||||
}
|
||||
|
||||
c.GenerateJSON(keyDataJSON)
|
||||
}
|
||||
30
controllers/baseController.go
Normal file
30
controllers/baseController.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"boss/datas"
|
||||
beego "github.com/beego/beego/v2/server/web"
|
||||
)
|
||||
|
||||
type BaseController struct {
|
||||
beego.Controller
|
||||
}
|
||||
|
||||
func (c *BaseController) GenerateJSON(dataJSON interface{}) {
|
||||
c.Data["json"] = dataJSON
|
||||
_ = c.ServeJSON()
|
||||
}
|
||||
|
||||
func (c *BaseController) Prepare() {
|
||||
userID, ok := c.GetSession("userID").(string)
|
||||
if !ok || userID == "" {
|
||||
//用户没有登录,或者登录到期了,则跳转登录主页面
|
||||
dataJSON := new(datas.BaseDataJSON)
|
||||
dataJSON.Code = 404
|
||||
dataJSON.Msg = "登录已经过期!"
|
||||
c.Data["json"] = dataJSON
|
||||
_ = c.ServeJSON()
|
||||
} else {
|
||||
//重新赋值给session
|
||||
_ = c.SetSession("userID", userID)
|
||||
}
|
||||
}
|
||||
148
controllers/deleteController.go
Normal file
148
controllers/deleteController.go
Normal file
@@ -0,0 +1,148 @@
|
||||
/***************************************************
|
||||
** @Desc : c file for ...
|
||||
** @Time : 2019/8/21 16:51
|
||||
** @Author : yuebin
|
||||
** @File : delete
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/8/21 16:51
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"boss/service"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type DeleteController struct {
|
||||
BaseController
|
||||
}
|
||||
|
||||
func (c *DeleteController) Finish() {
|
||||
se := new(service.DeleteService)
|
||||
se.Finish()
|
||||
}
|
||||
|
||||
func (c *DeleteController) DeleteMenu() {
|
||||
menuUid := c.GetString("menuUid")
|
||||
se := new(service.DeleteService)
|
||||
dataJSON := se.DeleteMenu(menuUid, c.GetSession("userID").(string))
|
||||
|
||||
c.Data["json"] = dataJSON
|
||||
_ = c.ServeJSONP()
|
||||
}
|
||||
|
||||
func (c *DeleteController) DeleteSecondMenu() {
|
||||
secondMenuUid := strings.TrimSpace(c.GetString("secondMenuUid"))
|
||||
se := new(service.DeleteService)
|
||||
dataJSON := se.DeleteSecondMenu(secondMenuUid)
|
||||
|
||||
c.Data["json"] = dataJSON
|
||||
_ = c.ServeJSON()
|
||||
}
|
||||
|
||||
/*
|
||||
* 删除权限项
|
||||
*/
|
||||
func (c *DeleteController) DeletePowerItem() {
|
||||
powerID := strings.TrimSpace(c.GetString("powerID"))
|
||||
se := new(service.DeleteService)
|
||||
dataJSON := se.DeletePowerItem(powerID)
|
||||
c.GenerateJSON(dataJSON)
|
||||
}
|
||||
|
||||
/*
|
||||
* 删除角色
|
||||
*/
|
||||
func (c *DeleteController) DeleteRole() {
|
||||
roleUid := strings.TrimSpace(c.GetString("roleUid"))
|
||||
se := new(service.DeleteService)
|
||||
dataJSON := se.DeleteRole(roleUid)
|
||||
c.GenerateJSON(dataJSON)
|
||||
}
|
||||
|
||||
/*
|
||||
* 删除操作员
|
||||
*/
|
||||
func (c *DeleteController) DeleteOperator() {
|
||||
userId := strings.TrimSpace(c.GetString("userId"))
|
||||
se := new(service.DeleteService)
|
||||
dataJSON := se.DeleteOperator(userId)
|
||||
|
||||
c.GenerateJSON(dataJSON)
|
||||
}
|
||||
|
||||
func (c *DeleteController) DeleteBankCardRecord() {
|
||||
uid := strings.TrimSpace(c.GetString("uid"))
|
||||
se := new(service.DeleteService)
|
||||
|
||||
dataJSON := se.DeleteBankCardRecord(uid)
|
||||
|
||||
c.GenerateJSON(dataJSON)
|
||||
}
|
||||
|
||||
/*
|
||||
* 删除通道操作
|
||||
*/
|
||||
func (c *DeleteController) DeleteRoad() {
|
||||
roadUid := strings.TrimSpace(c.GetString("roadUid"))
|
||||
|
||||
se := new(service.DeleteService)
|
||||
dataJSON := se.DeleteRoad(roadUid)
|
||||
|
||||
c.GenerateJSON(dataJSON)
|
||||
}
|
||||
|
||||
/*
|
||||
* 删除通道池
|
||||
*/
|
||||
func (c *DeleteController) DeleteRoadPool() {
|
||||
roadPoolCode := strings.TrimSpace(c.GetString("roadPoolCode"))
|
||||
|
||||
se := new(service.DeleteService)
|
||||
dataJSON := se.DeleteRoadPool(roadPoolCode)
|
||||
|
||||
c.GenerateJSON(dataJSON)
|
||||
}
|
||||
|
||||
/*
|
||||
* 删除商户
|
||||
*/
|
||||
func (c *DeleteController) DeleteMerchant() {
|
||||
merchantUid := strings.TrimSpace(c.GetString("merchantUid"))
|
||||
se := new(service.DeleteService)
|
||||
keyDataJSON := se.DeleteMerchant(merchantUid)
|
||||
|
||||
c.GenerateJSON(keyDataJSON)
|
||||
}
|
||||
|
||||
/*
|
||||
* 删除账户
|
||||
*/
|
||||
func (c *DeleteController) DeleteAccount() {
|
||||
accountUid := strings.TrimSpace(c.GetString("accountUid"))
|
||||
se := new(service.DeleteService)
|
||||
dataJSON := se.DeleteAccount(accountUid)
|
||||
|
||||
c.GenerateJSON(dataJSON)
|
||||
}
|
||||
|
||||
func (c *DeleteController) DeleteAgent() {
|
||||
agentUid := strings.TrimSpace(c.GetString("agentUid"))
|
||||
|
||||
se := new(service.DeleteService)
|
||||
keyDataJSON := se.DeleteAgent(agentUid)
|
||||
|
||||
c.GenerateJSON(keyDataJSON)
|
||||
}
|
||||
|
||||
func (c *DeleteController) DeleteAgentRelation() {
|
||||
|
||||
merchantUid := strings.TrimSpace(c.GetString("merchantUid"))
|
||||
|
||||
se := new(service.DeleteService)
|
||||
|
||||
keyDataJSON := se.DeleteAgentRelation(merchantUid)
|
||||
|
||||
c.GenerateJSON(keyDataJSON)
|
||||
}
|
||||
38
controllers/filterController.go
Normal file
38
controllers/filterController.go
Normal file
@@ -0,0 +1,38 @@
|
||||
/***************************************************
|
||||
** @Desc : 过滤功能
|
||||
** @Time : 2019/8/8 16:10
|
||||
** @Author : yuebin
|
||||
** @File : filter
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/8/8 16:10
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/beego/beego/v2/server/web"
|
||||
)
|
||||
|
||||
type FilterController struct {
|
||||
web.Controller
|
||||
}
|
||||
|
||||
// jsonp请求过来的函数
|
||||
func (c *FilterController) Filter() {
|
||||
userID, ok := c.GetSession("userID").(string)
|
||||
|
||||
dataJSON := new(struct {
|
||||
Code int
|
||||
})
|
||||
|
||||
if !ok || userID == "" {
|
||||
dataJSON.Code = 404
|
||||
} else {
|
||||
dataJSON.Code = 200
|
||||
_ = c.SetSession("userID", userID)
|
||||
}
|
||||
fmt.Println(dataJSON)
|
||||
c.Data["json"] = dataJSON
|
||||
_ = c.ServeJSON()
|
||||
}
|
||||
1057
controllers/getController.go
Normal file
1057
controllers/getController.go
Normal file
File diff suppressed because it is too large
Load Diff
111
controllers/loginController.go
Normal file
111
controllers/loginController.go
Normal file
@@ -0,0 +1,111 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"boss/common"
|
||||
"boss/datas"
|
||||
"boss/models/user"
|
||||
"boss/utils"
|
||||
"github.com/beego/beego/v2/adapter/validation"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
beego "github.com/beego/beego/v2/server/web"
|
||||
)
|
||||
|
||||
type LoginController struct {
|
||||
beego.Controller
|
||||
}
|
||||
|
||||
func (c *LoginController) Prepare() {
|
||||
|
||||
}
|
||||
|
||||
func (c *LoginController) Login() {
|
||||
|
||||
userID := c.GetString("userID")
|
||||
passWD := c.GetString("passwd")
|
||||
code := c.GetString("Code")
|
||||
|
||||
dataJSON := new(datas.KeyDataJSON)
|
||||
|
||||
valid := validation.Validation{}
|
||||
|
||||
if v := valid.Required(userID, "userID"); !v.Ok {
|
||||
dataJSON.Key = v.Error.Key
|
||||
dataJSON.Msg = "手机号不能为空!"
|
||||
} else if v := valid.Required(passWD, "passWD"); !v.Ok {
|
||||
dataJSON.Key = v.Error.Key
|
||||
dataJSON.Msg = "登录密码不能为空!"
|
||||
} else if v := valid.Length(code, common.VERIFY_CODE_LEN, "code"); !v.Ok {
|
||||
dataJSON.Key = v.Error.Key
|
||||
dataJSON.Msg = "验证码不正确!"
|
||||
}
|
||||
|
||||
userInfo := user.GetUserInfoByUserID(userID)
|
||||
|
||||
if userInfo.UserId == "" {
|
||||
dataJSON.Key = "userID"
|
||||
dataJSON.Msg = "用户不存在,请求联系管理员!"
|
||||
} else {
|
||||
codeInterface := c.GetSession("verifyCode")
|
||||
if userInfo.Passwd != utils.GetMD5Upper(passWD) {
|
||||
dataJSON.Key = "passWD"
|
||||
dataJSON.Msg = "密码不正确!"
|
||||
} else if codeInterface == nil {
|
||||
dataJSON.Key = "code"
|
||||
dataJSON.Msg = "验证码失效!"
|
||||
} else if code != codeInterface.(string) {
|
||||
dataJSON.Key = "code"
|
||||
dataJSON.Msg = "验证码不正确!"
|
||||
} else if userInfo.Status == common.UNACTIVE {
|
||||
dataJSON.Key = common.UNACTIVE
|
||||
dataJSON.Msg = "用户已被冻结!"
|
||||
} else if userInfo.Status == "del" {
|
||||
dataJSON.Key = "del"
|
||||
dataJSON.Msg = "用户已被删除!"
|
||||
}
|
||||
}
|
||||
|
||||
go func() {
|
||||
userInfo.Ip = c.Ctx.Input.IP()
|
||||
user.UpdateUserInfoIP(userInfo)
|
||||
}()
|
||||
|
||||
if dataJSON.Key == "" {
|
||||
_ = c.SetSession("userID", userID)
|
||||
_ = c.DelSession("verifyCode")
|
||||
}
|
||||
|
||||
c.Data["json"] = dataJSON
|
||||
_ = c.ServeJSON()
|
||||
}
|
||||
|
||||
/*
|
||||
* 退出登录,删除session中的数据,避免数据量过大,内存吃紧
|
||||
*/
|
||||
|
||||
func (c *LoginController) Logout() {
|
||||
dataJSON := new(datas.BaseDataJSON)
|
||||
|
||||
_ = c.DelSession("userID")
|
||||
dataJSON.Code = 200
|
||||
|
||||
c.Data["json"] = dataJSON
|
||||
_ = c.ServeJSON()
|
||||
}
|
||||
|
||||
/*
|
||||
* 验证码获取,如果获取成功,并将验证码存到session中
|
||||
*/
|
||||
func (c *LoginController) GetVerifyImg() {
|
||||
Image, verifyCode := utils.GenerateVerifyCodeImg()
|
||||
if Image == nil || len(verifyCode) != common.VERIFY_CODE_LEN {
|
||||
logs.Error("获取验证码图片失败!")
|
||||
} else {
|
||||
_ = c.SetSession("verifyCode", verifyCode)
|
||||
}
|
||||
logs.Info("验证码:", verifyCode)
|
||||
if Image == nil {
|
||||
logs.Error("生成验证码失败!")
|
||||
} else {
|
||||
_, _ = Image.WriteTo(c.Ctx.ResponseWriter)
|
||||
}
|
||||
}
|
||||
133
controllers/pageController.go
Normal file
133
controllers/pageController.go
Normal file
@@ -0,0 +1,133 @@
|
||||
// Package controllers /
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"github.com/beego/beego/v2/server/web"
|
||||
)
|
||||
|
||||
type PageController struct {
|
||||
web.Controller
|
||||
}
|
||||
|
||||
func (c *PageController) Index() {
|
||||
c.TplName = "index.html"
|
||||
testExtraLink, err := web.AppConfig.String("testExtraLink::host")
|
||||
|
||||
if err != nil {
|
||||
testExtraLink = "http://127.0.0.1:12305"
|
||||
}
|
||||
|
||||
c.Data["extraAddr"] = testExtraLink
|
||||
}
|
||||
|
||||
func (c *PageController) LoginPage() {
|
||||
c.TplName = "login.html"
|
||||
}
|
||||
|
||||
func (c *PageController) AccountPage() {
|
||||
c.TplName = "account.html"
|
||||
}
|
||||
|
||||
func (c *PageController) AccountHistoryPage() {
|
||||
c.TplName = "account_history.html"
|
||||
}
|
||||
|
||||
func (c *PageController) BankCardPage() {
|
||||
c.TplName = "bank_card.html"
|
||||
}
|
||||
|
||||
func (c *PageController) CreateAgentPage() {
|
||||
c.TplName = "create_agent.html"
|
||||
}
|
||||
|
||||
func (c *PageController) EditRolePage() {
|
||||
c.TplName = "edit_role.html"
|
||||
}
|
||||
|
||||
func (c *PageController) FirstMenuPage() {
|
||||
c.TplName = "first_menu.html"
|
||||
}
|
||||
|
||||
func (c *PageController) MainPage() {
|
||||
c.TplName = "main.html"
|
||||
}
|
||||
|
||||
func (c *PageController) MenuPage() {
|
||||
c.TplName = "menu.html"
|
||||
}
|
||||
|
||||
func (c *PageController) MerchantPage() {
|
||||
c.TplName = "merchant.html"
|
||||
}
|
||||
|
||||
func (c *PageController) OperatorPage() {
|
||||
c.TplName = "operator.html"
|
||||
}
|
||||
|
||||
func (c *PageController) PowerPage() {
|
||||
c.TplName = "power.html"
|
||||
}
|
||||
|
||||
func (c *PageController) RoadPage() {
|
||||
c.TplName = "road.html"
|
||||
}
|
||||
|
||||
func (c *PageController) RoadPoolPage() {
|
||||
c.TplName = "road_pool.html"
|
||||
}
|
||||
|
||||
func (c *PageController) RoadProfitPage() {
|
||||
c.TplName = "road_profit.html"
|
||||
}
|
||||
|
||||
func (c *PageController) RolePage() {
|
||||
c.TplName = "role.html"
|
||||
}
|
||||
|
||||
func (c *PageController) SecondMenuPage() {
|
||||
c.TplName = "second_menu.html"
|
||||
}
|
||||
|
||||
func (c *PageController) OrderInfoPage() {
|
||||
c.TplName = "order_info.html"
|
||||
}
|
||||
|
||||
func (c *PageController) OrderProfitPage() {
|
||||
c.TplName = "order_profit.html"
|
||||
}
|
||||
|
||||
func (c *PageController) MerchantPayforPage() {
|
||||
c.TplName = "merchant_payfor.html"
|
||||
}
|
||||
|
||||
func (c *PageController) SelfPayforPage() {
|
||||
c.TplName = "self_payfor.html"
|
||||
}
|
||||
|
||||
func (c *PageController) PayforRecordPage() {
|
||||
c.TplName = "payfor_record.html"
|
||||
}
|
||||
|
||||
func (c *PageController) ConfirmPage() {
|
||||
c.TplName = "confirm.html"
|
||||
}
|
||||
|
||||
func (c *PageController) SelfNotifyPage() {
|
||||
c.TplName = "self_notify.html"
|
||||
}
|
||||
|
||||
func (c *PageController) SelfPlusSubPage() {
|
||||
c.TplName = "self_plus_sub.html"
|
||||
}
|
||||
|
||||
func (c *PageController) AgentToMerchantPage() {
|
||||
c.TplName = "agent_to_merchant.html"
|
||||
}
|
||||
|
||||
func (c *PageController) PlatFormProfitPage() {
|
||||
c.TplName = "platform_profit.html"
|
||||
}
|
||||
|
||||
func (c *PageController) AgentProfitPage() {
|
||||
c.TplName = "agent_profit.html"
|
||||
}
|
||||
42
controllers/queryController.go
Normal file
42
controllers/queryController.go
Normal file
@@ -0,0 +1,42 @@
|
||||
package controllers
|
||||
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/11/6 14:03
|
||||
** @Author : yuebin
|
||||
** @File : query.go
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/11/6 14:03
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
import (
|
||||
"boss/service"
|
||||
"github.com/beego/beego/v2/server/web"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type SupplierQuery struct {
|
||||
web.Controller
|
||||
}
|
||||
|
||||
func (c *SupplierQuery) SupplierOrderQuery() {
|
||||
|
||||
bankOrderId := strings.TrimSpace(c.GetString("bankOrderId"))
|
||||
|
||||
se := new(service.QueryService)
|
||||
keyDataJSON := se.SupplierOrderQuery(bankOrderId)
|
||||
|
||||
c.Data["json"] = keyDataJSON
|
||||
_ = c.ServeJSON()
|
||||
}
|
||||
|
||||
// SupplierPayForQuery 向上游查询代付结果
|
||||
func (c *SupplierQuery) SupplierPayForQuery() {
|
||||
bankOrderId := strings.TrimSpace(c.GetString("bankOrderId"))
|
||||
|
||||
se := new(service.QueryService)
|
||||
keyDataJSON := se.SupplierPayForQuery(bankOrderId)
|
||||
|
||||
c.Data["json"] = keyDataJSON
|
||||
_ = c.ServeJSON()
|
||||
}
|
||||
38
controllers/sendNotifyMerchantController.go
Normal file
38
controllers/sendNotifyMerchantController.go
Normal file
@@ -0,0 +1,38 @@
|
||||
package controllers
|
||||
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/12/8 22:15
|
||||
** @Author : yuebin
|
||||
** @File : send_notify_merchant
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/12/8 22:15
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
import (
|
||||
"boss/service"
|
||||
"github.com/beego/beego/v2/server/web"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type SendNotify struct {
|
||||
web.Controller
|
||||
}
|
||||
|
||||
func (c *SendNotify) SendNotifyToMerchant() {
|
||||
bankOrderId := strings.TrimSpace(c.GetString("bankOrderId"))
|
||||
se := new(service.SendNotifyMerchantService)
|
||||
keyDataJSON := se.SendNotifyToMerchant(bankOrderId)
|
||||
|
||||
c.Data["json"] = keyDataJSON
|
||||
_ = c.ServeJSON()
|
||||
}
|
||||
|
||||
func (c *SendNotify) SelfSendNotify() {
|
||||
bankOrderId := strings.TrimSpace(c.GetString("bankOrderId"))
|
||||
|
||||
se := new(service.SendNotifyMerchantService)
|
||||
keyDataJSON := se.SelfSendNotify(bankOrderId)
|
||||
c.Data["json"] = keyDataJSON
|
||||
_ = c.ServeJSON()
|
||||
}
|
||||
236
controllers/updateController.go
Normal file
236
controllers/updateController.go
Normal file
@@ -0,0 +1,236 @@
|
||||
package controllers
|
||||
|
||||
/***************************************************
|
||||
** @Desc : c file for ...
|
||||
** @Time : 2019/8/16 9:49
|
||||
** @Author : yuebin
|
||||
** @File : update
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/8/16 9:49
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
import (
|
||||
"boss/datas"
|
||||
"boss/models/user"
|
||||
"boss/service"
|
||||
"boss/utils"
|
||||
"github.com/beego/beego/v2/adapter/validation"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type UpdateController struct {
|
||||
BaseController
|
||||
}
|
||||
|
||||
/*
|
||||
*更新密码
|
||||
*/
|
||||
func (c *UpdateController) UpdatePassword() {
|
||||
oldPassword := c.GetString("oldPassword")
|
||||
newPassword := c.GetString("newPassword")
|
||||
twicePassword := c.GetString("twicePassword")
|
||||
|
||||
userID, ok := c.GetSession("userID").(string)
|
||||
|
||||
dataJSON := new(datas.KeyDataJSON)
|
||||
dataJSON.Code = -1
|
||||
if !ok || userID == "" {
|
||||
dataJSON.Code = 404
|
||||
dataJSON.Msg = "请重新登录!"
|
||||
} else {
|
||||
userInfo := user.GetUserInfoByUserID(userID)
|
||||
valid := validation.Validation{}
|
||||
if userInfo.Passwd != utils.GetMD5Upper(oldPassword) {
|
||||
dataJSON.Key = ".old-error"
|
||||
dataJSON.Msg = "输入密码不正确"
|
||||
} else if v := valid.Min(len(newPassword), 8, ".new-error"); !v.Ok {
|
||||
dataJSON.Key = v.Error.Key
|
||||
dataJSON.Msg = "新密码长度必须大于等于8个字符!"
|
||||
} else if v := valid.Max(len(newPassword), 16, ".new-error"); !v.Ok {
|
||||
dataJSON.Key = v.Error.Key
|
||||
dataJSON.Msg = "新密码长度不能大于16个字符!"
|
||||
} else if v := valid.AlphaNumeric(newPassword, ".new-error"); !v.Ok {
|
||||
dataJSON.Key = v.Error.Key
|
||||
dataJSON.Msg = "新密码必须有数字和字母组成!"
|
||||
} else if newPassword != twicePassword {
|
||||
dataJSON.Key = ".twice-error"
|
||||
dataJSON.Msg = "两次密码不一致!"
|
||||
} else {
|
||||
dataJSON.Code = 200
|
||||
dataJSON.Msg = "密码修改成功!"
|
||||
//删除原先的session状态
|
||||
_ = c.DelSession("userID")
|
||||
//更新数据库的密码
|
||||
userInfo.Passwd = utils.GetMD5Upper(newPassword)
|
||||
user.UpdateUserInfoPassword(userInfo)
|
||||
}
|
||||
}
|
||||
c.GenerateJSON(dataJSON)
|
||||
}
|
||||
|
||||
/*
|
||||
* 更新菜单的排列顺序
|
||||
*/
|
||||
func (c *UpdateController) UpMenu() {
|
||||
menuUid := c.GetString("menuUid")
|
||||
se := new(service.UpdateService)
|
||||
dataJSON := se.UpMenu(menuUid)
|
||||
|
||||
c.GenerateJSON(dataJSON)
|
||||
}
|
||||
func (c *UpdateController) DownMenu() {
|
||||
menuUid := c.GetString("menuUid")
|
||||
se := new(service.UpdateService)
|
||||
dataJSON := se.DownMenu(menuUid)
|
||||
|
||||
c.GenerateJSON(dataJSON)
|
||||
}
|
||||
|
||||
/*
|
||||
* 提升二级菜单的顺序号
|
||||
*/
|
||||
func (c *UpdateController) UpSecondMenu() {
|
||||
secondMenuUid := c.GetString("secondMenuUid")
|
||||
se := new(service.UpdateService)
|
||||
dataJSON := se.UpSecondMenu(secondMenuUid)
|
||||
|
||||
c.GenerateJSON(dataJSON)
|
||||
}
|
||||
|
||||
/*
|
||||
* 降低二级菜单的顺序号
|
||||
*/
|
||||
func (c *UpdateController) DownSecondMenu() {
|
||||
secondMenuUid := c.GetString("secondMenuUid")
|
||||
se := new(service.UpdateService)
|
||||
dataJSON := se.DownSecondMenu(secondMenuUid)
|
||||
c.GenerateJSON(dataJSON)
|
||||
}
|
||||
|
||||
func (c *UpdateController) FreezeOperator() {
|
||||
userId := strings.TrimSpace(c.GetString("operatorName"))
|
||||
se := new(service.UpdateService)
|
||||
dataJSON := se.FreezeOperator(userId)
|
||||
|
||||
c.GenerateJSON(dataJSON)
|
||||
}
|
||||
|
||||
func (c *UpdateController) UnfreezeOperator() {
|
||||
userId := strings.TrimSpace(c.GetString("operatorName"))
|
||||
|
||||
se := new(service.UpdateService)
|
||||
dataJSON := se.UnfreezeOperator(userId)
|
||||
|
||||
c.GenerateJSON(dataJSON)
|
||||
}
|
||||
|
||||
func (c *UpdateController) EditOperator() {
|
||||
userId := strings.TrimSpace(c.GetString("userId"))
|
||||
password := strings.TrimSpace(c.GetString("password"))
|
||||
changePassword := strings.TrimSpace(c.GetString("changePassword"))
|
||||
role := strings.TrimSpace(c.GetString("role"))
|
||||
nick := strings.TrimSpace(c.GetString("nick"))
|
||||
remark := strings.TrimSpace(c.GetString("remark"))
|
||||
|
||||
se := new(service.UpdateService)
|
||||
keyDataJSON := se.EditOperator(password, changePassword, role, userId, nick, remark)
|
||||
|
||||
c.GenerateJSON(keyDataJSON)
|
||||
}
|
||||
|
||||
/*
|
||||
* 更新通道的状态
|
||||
*/
|
||||
func (c *UpdateController) UpdateRoadStatus() {
|
||||
roadUid := strings.TrimSpace(c.GetString("roadUid"))
|
||||
|
||||
se := new(service.UpdateService)
|
||||
dataJSON := se.UpdateRoadStatus(roadUid)
|
||||
|
||||
c.GenerateJSON(dataJSON)
|
||||
}
|
||||
|
||||
/*
|
||||
* 冻结商户
|
||||
*/
|
||||
func (c *UpdateController) UpdateMerchantStatus() {
|
||||
merchantUid := strings.TrimSpace(c.GetString("merchantUid"))
|
||||
se := new(service.UpdateService)
|
||||
keyDataJSON := se.UpdateMerchantStatus(merchantUid)
|
||||
|
||||
c.GenerateJSON(keyDataJSON)
|
||||
}
|
||||
|
||||
/*
|
||||
* 更新账户的状态
|
||||
*/
|
||||
func (c *UpdateController) UpdateAccountStatus() {
|
||||
accountUid := strings.TrimSpace(c.GetString("accountUid"))
|
||||
|
||||
se := new(service.UpdateService)
|
||||
dataJSON := se.UpdateAccountStatus(accountUid)
|
||||
|
||||
c.GenerateJSON(dataJSON)
|
||||
}
|
||||
func (c *UpdateController) OperatorAccount() {
|
||||
accountUid := strings.TrimSpace(c.GetString("accountUid"))
|
||||
accountOperator := strings.TrimSpace(c.GetString("accountOperator"))
|
||||
amount := strings.TrimSpace(c.GetString("amount"))
|
||||
|
||||
se := new(service.UpdateService)
|
||||
accountDataJSON := se.OperatorAccount(accountOperator, amount, accountUid)
|
||||
|
||||
c.GenerateJSON(accountDataJSON)
|
||||
}
|
||||
|
||||
func (c *UpdateController) UpdateAgentStatus() {
|
||||
agentUid := strings.TrimSpace(c.GetString("agentUid"))
|
||||
se := new(service.UpdateService)
|
||||
c.GenerateJSON(se.UpdateAgentStatus(agentUid))
|
||||
}
|
||||
|
||||
func (c *UpdateController) ResetAgentPassword() {
|
||||
agentUid := strings.TrimSpace(c.GetString("agentUid"))
|
||||
newPassword := strings.TrimSpace(c.GetString("newPassword"))
|
||||
newVertifyPassword := strings.TrimSpace(c.GetString("newVertifyPassword"))
|
||||
|
||||
se := new(service.UpdateService)
|
||||
|
||||
c.GenerateJSON(se.ResetAgentPassword(agentUid, newPassword, newVertifyPassword))
|
||||
}
|
||||
|
||||
/*
|
||||
* 手动选择了打款通道
|
||||
*/
|
||||
func (c *UpdateController) ChoosePayForRoad() {
|
||||
roadName := strings.TrimSpace(c.GetString("roadName"))
|
||||
bankOrderId := strings.TrimSpace(c.GetString("bankOrderId"))
|
||||
remark := strings.TrimSpace(c.GetString("remark"))
|
||||
confirmType := strings.TrimSpace(c.GetString("confirmType"))
|
||||
|
||||
se := new(service.UpdateService)
|
||||
|
||||
c.GenerateJSON(se.ChoosePayForRoad(confirmType, roadName, bankOrderId, remark))
|
||||
}
|
||||
|
||||
/*
|
||||
* 处理打款结果的处理
|
||||
*/
|
||||
func (c *UpdateController) ResultPayFor() {
|
||||
resultType := strings.TrimSpace(c.GetString("resultType"))
|
||||
bankOrderId := strings.TrimSpace(c.GetString("bankOrderId"))
|
||||
|
||||
se := new(service.UpdateService)
|
||||
|
||||
c.GenerateJSON(se.ResultPayFor(resultType, bankOrderId))
|
||||
}
|
||||
|
||||
func (c *UpdateController) UpdateOrderStatus() {
|
||||
bankOrderId := strings.TrimSpace(c.GetString("bankOrderId"))
|
||||
solveType := strings.TrimSpace(c.GetString("solveType"))
|
||||
operator := strings.TrimSpace(c.GetString("operator"))
|
||||
|
||||
se := new(service.UpdateService)
|
||||
|
||||
c.GenerateJSON(se.UpdateOrderStatus(bankOrderId, solveType, operator))
|
||||
}
|
||||
9
data/demo.json
Normal file
9
data/demo.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"appKey": "972381004",
|
||||
"appSecret": "8dc29e5993e66937",
|
||||
"app_key": "972381004",
|
||||
"app_secret": "8dc29e5993e66937",
|
||||
"username": "15034401707",
|
||||
"password": "qwe123456",
|
||||
"goodsSku": "SK000117"
|
||||
}
|
||||
240
datas/datas.go
Normal file
240
datas/datas.go
Normal file
@@ -0,0 +1,240 @@
|
||||
package datas
|
||||
|
||||
import (
|
||||
"boss/models/accounts"
|
||||
"boss/models/agent"
|
||||
"boss/models/merchant"
|
||||
"boss/models/order"
|
||||
"boss/models/payfor"
|
||||
"boss/models/road"
|
||||
"boss/models/system"
|
||||
"boss/models/user"
|
||||
)
|
||||
|
||||
type BaseDataJSON struct {
|
||||
Msg string
|
||||
Code int
|
||||
}
|
||||
|
||||
type KeyDataJSON struct {
|
||||
Msg string
|
||||
Code int
|
||||
Key string
|
||||
}
|
||||
|
||||
type MenuDataJSON struct {
|
||||
StartIndex int
|
||||
DisplayCount int
|
||||
CurrentPage int
|
||||
TotalPage int
|
||||
Code int
|
||||
Msg string
|
||||
MenuList []system.MenuInfo
|
||||
}
|
||||
|
||||
type SecondMenuDataJSON struct {
|
||||
StartIndex int
|
||||
DisplayCount int
|
||||
CurrentPage int
|
||||
TotalPage int
|
||||
Code int
|
||||
Msg string
|
||||
SecondMenuList []system.SecondMenuInfo
|
||||
}
|
||||
|
||||
type PowerItemDataJSON struct {
|
||||
StartIndex int
|
||||
DisplayCount int
|
||||
CurrentPage int
|
||||
TotalPage int
|
||||
Code int
|
||||
Msg string
|
||||
PowerItemList []system.PowerInfo
|
||||
}
|
||||
|
||||
type RoleInfoDataJSON struct {
|
||||
StartIndex int
|
||||
DisplayCount int
|
||||
CurrentPage int
|
||||
TotalPage int
|
||||
Code int
|
||||
Msg string
|
||||
RoleInfoList []system.RoleInfo
|
||||
}
|
||||
|
||||
type DeployTreeJSON struct {
|
||||
Msg string
|
||||
Code int
|
||||
Key string
|
||||
AllFirstMenu []system.MenuInfo
|
||||
ShowFirstMenuUid map[string]bool
|
||||
AllSecondMenu []system.SecondMenuInfo
|
||||
ShowSecondMenuUid map[string]bool
|
||||
AllPower []system.PowerInfo
|
||||
ShowPowerUid map[string]bool
|
||||
}
|
||||
|
||||
type OperatorDataJSON struct {
|
||||
Msg string
|
||||
Code int
|
||||
StartIndex int
|
||||
DisplayCount int
|
||||
CurrentPage int
|
||||
TotalPage int
|
||||
OperatorList []user.UserInfo
|
||||
}
|
||||
|
||||
type EditOperatorDataJSON struct {
|
||||
Code int
|
||||
Msg string
|
||||
OperatorList []user.UserInfo
|
||||
RoleList []system.RoleInfo
|
||||
}
|
||||
|
||||
type BankCardDataJSON struct {
|
||||
Msg string
|
||||
Code int
|
||||
StartIndex int
|
||||
DisplayCount int
|
||||
CurrentPage int
|
||||
TotalPage int
|
||||
BankCardInfoList []system.BankCardInfo
|
||||
}
|
||||
|
||||
type RoadDataJSON struct {
|
||||
Msg string
|
||||
Code int
|
||||
StartIndex int
|
||||
DisplayCount int
|
||||
CurrentPage int
|
||||
TotalPage int
|
||||
RoadInfoList []road.RoadInfo
|
||||
RoadPool road.RoadPoolInfo
|
||||
}
|
||||
|
||||
type RoadPoolDataJSON struct {
|
||||
Msg string
|
||||
Code int
|
||||
StartIndex int
|
||||
DisplayCount int
|
||||
CurrentPage int
|
||||
TotalPage int
|
||||
RoadPoolInfoList []road.RoadPoolInfo
|
||||
}
|
||||
|
||||
type MerchantDataJSON struct {
|
||||
Msg string
|
||||
Code int
|
||||
StartIndex int
|
||||
DisplayCount int
|
||||
CurrentPage int
|
||||
TotalPage int
|
||||
MerchantList []merchant.MerchantInfo
|
||||
}
|
||||
|
||||
type MerchantDeployDataJSON struct {
|
||||
Code int
|
||||
Msg string
|
||||
MerchantDeploy merchant.MerchantDeployInfo
|
||||
}
|
||||
|
||||
type AccountDataJSON struct {
|
||||
Msg string
|
||||
Code int
|
||||
StartIndex int
|
||||
DisplayCount int
|
||||
CurrentPage int
|
||||
TotalPage int
|
||||
AccountList []accounts.AccountInfo
|
||||
}
|
||||
|
||||
type AccountHistoryDataJSON struct {
|
||||
Msg string
|
||||
Code int
|
||||
StartIndex int
|
||||
DisplayCount int
|
||||
CurrentPage int
|
||||
TotalPage int
|
||||
AccountHistoryList []accounts.AccountHistoryInfo
|
||||
}
|
||||
|
||||
type AgentDataJSON struct {
|
||||
Msg string
|
||||
Code int
|
||||
StartIndex int
|
||||
DisplayCount int
|
||||
CurrentPage int
|
||||
TotalPage int
|
||||
AgentList []agent.AgentInfo
|
||||
}
|
||||
|
||||
type ProductDataJSON struct {
|
||||
Msg string
|
||||
Code int
|
||||
ProductMap map[string]string
|
||||
}
|
||||
|
||||
type OrderDataJSON struct {
|
||||
Msg string
|
||||
Code int
|
||||
StartIndex int
|
||||
DisplayCount int
|
||||
CurrentPage int
|
||||
TotalPage int
|
||||
OrderList []order.OrderInfo
|
||||
AllAmount float64
|
||||
SuccessRate string
|
||||
NotifyUrl string
|
||||
}
|
||||
|
||||
type ListDataJSON struct {
|
||||
Msg string
|
||||
Code int
|
||||
StartIndex int
|
||||
DisplayCount int
|
||||
CurrentPage int
|
||||
TotalPage int
|
||||
List []order.OrderProfitInfo
|
||||
AllAmount float64
|
||||
SupplierProfit float64
|
||||
AgentProfit float64
|
||||
PlatformProfit float64
|
||||
|
||||
TadayAllAmount float64
|
||||
TadaySupplierProfit float64
|
||||
TadayAgentProfit float64
|
||||
TadayPlatformProfit float64
|
||||
TadaySuccessNum int //今日成功笔数
|
||||
TadayAllNum int //今日总订单数据
|
||||
}
|
||||
|
||||
type PayForDataJSON struct {
|
||||
Msg string
|
||||
Code int
|
||||
StartIndex int
|
||||
DisplayCount int
|
||||
CurrentPage int
|
||||
TotalPage int
|
||||
PayForList []payfor.PayforInfo
|
||||
}
|
||||
|
||||
type BalanceDataJSON struct {
|
||||
Msg string
|
||||
Code int
|
||||
Balance float64
|
||||
}
|
||||
|
||||
type NotifyBankOrderIdListJSON struct {
|
||||
Msg string
|
||||
Code int
|
||||
NotifyIdList []string
|
||||
}
|
||||
|
||||
type ProfitListJSON struct {
|
||||
TotalAmount float64
|
||||
PlatformTotalProfit float64
|
||||
AgentTotalProfit float64
|
||||
Msg string
|
||||
Code int
|
||||
ProfitList []order.PlatformProfit
|
||||
}
|
||||
10
go.mod
Normal file
10
go.mod
Normal file
@@ -0,0 +1,10 @@
|
||||
module boss
|
||||
|
||||
go 1.13
|
||||
|
||||
require (
|
||||
github.com/beego/beego/v2 v2.0.2
|
||||
github.com/go-sql-driver/mysql v1.6.0
|
||||
github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect
|
||||
github.com/rs/xid v1.2.1
|
||||
)
|
||||
552
go.sum
Normal file
552
go.sum
Normal file
@@ -0,0 +1,552 @@
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
|
||||
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
|
||||
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
|
||||
github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
|
||||
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
|
||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
|
||||
github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc=
|
||||
github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk=
|
||||
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
|
||||
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
|
||||
github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
|
||||
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
|
||||
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
|
||||
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
|
||||
github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A=
|
||||
github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU=
|
||||
github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
||||
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
|
||||
github.com/beego/beego/v2 v2.0.2 h1:Mx2MWMHJN1oFBHewHWyIhR25tXB9IPceIK8X7OuMdZM=
|
||||
github.com/beego/beego/v2 v2.0.2/go.mod h1:4pxstbxq+2qE8IUzFsVK8X9BsqfRjbp7ohbapTrTLho=
|
||||
github.com/beego/x2j v0.0.0-20131220205130-a0352aadc542/go.mod h1:kSeGC/p1AbBiEp5kat81+DSQrZenVBZXklMLaELspWU=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
||||
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA=
|
||||
github.com/casbin/casbin v1.9.1/go.mod h1:z8uPsfBJGUsnkagrt3G8QvjgTKFMBJ32UP8HpZllfog=
|
||||
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
|
||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
|
||||
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
|
||||
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
github.com/couchbase/go-couchbase v0.1.0/go.mod h1:+/bddYDxXsf9qt0xpDUtRR47A2GjaXmGGAqQ/k3GJ8A=
|
||||
github.com/couchbase/gomemcached v0.1.3/go.mod h1:mxliKQxOv84gQ0bJWbI+w9Wxdpt9HjDvgW9MjCym5Vo=
|
||||
github.com/couchbase/goutils v0.1.0/go.mod h1:BQwMFlJzDjFDG3DJUdU0KORxn88UlsOULuxLExMh3Hs=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
|
||||
github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76/go.mod h1:vYwsqCOLxGiisLwp9rITslkFNpZD5rz43tf41QFkTWY=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
|
||||
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
|
||||
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
|
||||
github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
|
||||
github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
|
||||
github.com/elastic/go-elasticsearch/v6 v6.8.10/go.mod h1:UwaDJsD3rWLM5rKNFzv9hgox93HoX8utj1kxD9aFUcI=
|
||||
github.com/elazarl/go-bindata-assetfs v1.0.1 h1:m0kkaHRKEu7tUIUFVwhGGGYClXvyl4RE03qmvRTNfbw=
|
||||
github.com/elazarl/go-bindata-assetfs v1.0.1/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4=
|
||||
github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=
|
||||
github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/glendc/gopher-json v0.0.0-20170414221815-dc4743023d0c/go.mod h1:Gja1A+xZ9BoviGJNA2E9vFkPjjsl+CoJxSXiQM1UXtw=
|
||||
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o=
|
||||
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
|
||||
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
||||
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
|
||||
github.com/go-redis/redis/v7 v7.4.0/go.mod h1:JDNMw23GTyLNC4GZu9njt15ctBQVn7xjRfnwdHj/Dcg=
|
||||
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
|
||||
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
|
||||
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
|
||||
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
||||
github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
||||
github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
|
||||
github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE=
|
||||
github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
|
||||
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
|
||||
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
||||
github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
|
||||
github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
|
||||
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
|
||||
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
|
||||
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
|
||||
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
|
||||
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
|
||||
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
|
||||
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg=
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
|
||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
||||
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
|
||||
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
|
||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/ledisdb/ledisdb v0.0.0-20200510135210-d35789ec47e6/go.mod h1:n931TsDuKuq+uX4v1fulaMbA/7ZLLhjc85h7chZGBCQ=
|
||||
github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8=
|
||||
github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=
|
||||
github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
|
||||
github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
|
||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||
github.com/mattn/go-sqlite3 v1.14.7/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||
github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U=
|
||||
github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
||||
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
|
||||
github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
|
||||
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
|
||||
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag=
|
||||
github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg=
|
||||
github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU=
|
||||
github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k=
|
||||
github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w=
|
||||
github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
|
||||
github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
|
||||
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||
github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs=
|
||||
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
|
||||
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg=
|
||||
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
|
||||
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
|
||||
github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74=
|
||||
github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
||||
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
||||
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
|
||||
github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA=
|
||||
github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
|
||||
github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
|
||||
github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
|
||||
github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM=
|
||||
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
||||
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
|
||||
github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
github.com/pelletier/go-toml v1.9.2/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
|
||||
github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac=
|
||||
github.com/peterh/liner v1.0.1-0.20171122030339-3681c2a91233/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc=
|
||||
github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=
|
||||
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
|
||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
|
||||
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
|
||||
github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og=
|
||||
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
|
||||
github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ=
|
||||
github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
|
||||
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||
github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=
|
||||
github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||
github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA=
|
||||
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
|
||||
github.com/prometheus/common v0.26.0 h1:iMAkS2TDoNWnKM+Kopnx/8tnEStIfpYA0ur0xQzzhMQ=
|
||||
github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
|
||||
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
||||
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
|
||||
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
|
||||
github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4=
|
||||
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
|
||||
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
|
||||
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
|
||||
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rs/xid v1.2.1 h1:mhH9Nq+C1fY2l1XIpgxIiUOfNpRBYH1kKcr+qfKgjRc=
|
||||
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
|
||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
|
||||
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
|
||||
github.com/shiena/ansicolor v0.0.0-20200904210342-c7312218db18 h1:DAYUYH5869yV94zvCES9F51oYtN5oGlwjxJJz7ZCnik=
|
||||
github.com/shiena/ansicolor v0.0.0-20200904210342-c7312218db18/go.mod h1:nkxAfR/5quYxwPZhyDxgasBMnRtBZd0FCEpawpjMUFg=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/siddontang/go v0.0.0-20170517070808-cb568a3e5cc0/go.mod h1:3yhqj7WBBfRhbBlzyOC3gUxftwsU0u8gqevxwIHQpMw=
|
||||
github.com/siddontang/goredis v0.0.0-20150324035039-760763f78400/go.mod h1:DDcKzU3qCuvj/tPnimWSsZZzvk9qvkvrIL5naVBPh5s=
|
||||
github.com/siddontang/rdb v0.0.0-20150307021120-fc89ed2e418d/go.mod h1:AMEsy7v5z92TR1JKMkLLoaOQk++LVnOKL3ScbJ8GNGA=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
||||
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
|
||||
github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=
|
||||
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
||||
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/ssdb/gossdb v0.0.0-20180723034631-88f6b59b84ec/go.mod h1:QBvMkMya+gXctz3kmljlUCu/yB3GZ6oee+dUozsezQE=
|
||||
github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
|
||||
github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
|
||||
github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/syndtr/goleveldb v0.0.0-20160425020131-cfa635847112/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0=
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||
github.com/ugorji/go v0.0.0-20171122102828-84cb69a8af83/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ=
|
||||
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
||||
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/yuin/gopher-lua v0.0.0-20171031051903-609c9cd26973/go.mod h1:aEV29XrmTYFr3CiRxZeGHpkvbwq+prZduBqMaascyCU=
|
||||
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
|
||||
go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
|
||||
go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0=
|
||||
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
|
||||
go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
|
||||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
|
||||
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||
go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
|
||||
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
|
||||
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
|
||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
|
||||
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a h1:kr2P4QFmQr29mSLA43kwrOcgcReGTfbE9N577tCTuBc=
|
||||
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
||||
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40 h1:JWgyZ1qgdTaF3N3oxC+MdTV7qvEEgHo3otj+HB5CM7Q=
|
||||
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ=
|
||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s=
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
|
||||
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM=
|
||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||
google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
||||
google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
|
||||
google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
|
||||
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
|
||||
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
|
||||
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
|
||||
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
|
||||
38
main.go
Normal file
38
main.go
Normal file
@@ -0,0 +1,38 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
_ "boss/models"
|
||||
_ "boss/routers"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
"github.com/beego/beego/v2/server/web"
|
||||
)
|
||||
|
||||
func main() {
|
||||
//println(utils.GetMD5Upper("123456"))
|
||||
RegisterLogs()
|
||||
web.Run()
|
||||
}
|
||||
|
||||
/**
|
||||
** 注册日志信息
|
||||
*/
|
||||
func RegisterLogs() {
|
||||
_ = logs.SetLogger(logs.AdapterFile,
|
||||
`{
|
||||
"filename":"../logs/legend.log",
|
||||
"level":4,
|
||||
"maxlines":0,
|
||||
"maxsize":0,
|
||||
"daily":true,
|
||||
"maxdays":10,
|
||||
"color":true
|
||||
}`)
|
||||
|
||||
f := &logs.PatternLogFormatter{
|
||||
Pattern: "%F:%n|%w%t>> %m",
|
||||
WhenFormat: "2006-01-02",
|
||||
}
|
||||
|
||||
logs.RegisterFormatter("pattern", f)
|
||||
_ = logs.SetGlobalFormatter("pattern")
|
||||
}
|
||||
119
models/accounts/account.go
Normal file
119
models/accounts/account.go
Normal file
@@ -0,0 +1,119 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/10/16 11:11
|
||||
** @Author : yuebin
|
||||
** @File : account
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/10/16 11:11
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package accounts
|
||||
|
||||
import (
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
type AccountInfo struct {
|
||||
Id int
|
||||
Status string
|
||||
AccountUid string
|
||||
AccountName string
|
||||
Balance float64 //账户总余额
|
||||
SettleAmount float64 //已经结算的金额
|
||||
LoanAmount float64 //账户押款金额
|
||||
FreezeAmount float64 //账户冻结金额
|
||||
WaitAmount float64 //待结算资金
|
||||
PayforAmount float64 //代付在途金额
|
||||
//AbleBalance float64 //账户可用金额
|
||||
UpdateTime string
|
||||
CreateTime string
|
||||
}
|
||||
|
||||
const ACCOUNT_INFO = "account_info"
|
||||
|
||||
func InsetAcount(account AccountInfo) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.Insert(&account)
|
||||
if err != nil {
|
||||
logs.Error("insert account fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func GetAccountByUid(accountUid string) AccountInfo {
|
||||
o := orm.NewOrm()
|
||||
var account AccountInfo
|
||||
_, err := o.QueryTable(ACCOUNT_INFO).Filter("account_uid", accountUid).Limit(1).All(&account)
|
||||
if err != nil {
|
||||
logs.Error("get account by uid fail: ", err)
|
||||
}
|
||||
|
||||
return account
|
||||
}
|
||||
|
||||
func GetAccountLenByMap(params map[string]string) int {
|
||||
o := orm.NewOrm()
|
||||
qs := o.QueryTable(ACCOUNT_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
cnt, err := qs.Limit(-1).OrderBy("-update_time").Count()
|
||||
if err != nil {
|
||||
logs.Error("get account len by map fail: ", err)
|
||||
}
|
||||
return int(cnt)
|
||||
}
|
||||
|
||||
func GetAccountByMap(params map[string]string, displayCount, offset int) []AccountInfo {
|
||||
o := orm.NewOrm()
|
||||
var accountList []AccountInfo
|
||||
qs := o.QueryTable(ACCOUNT_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
|
||||
_, err := qs.Limit(displayCount, offset).OrderBy("-update_time").All(&accountList)
|
||||
if err != nil {
|
||||
logs.Error("get account by map fail: ", err)
|
||||
}
|
||||
return accountList
|
||||
}
|
||||
|
||||
func GetAllAccount() []AccountInfo {
|
||||
o := orm.NewOrm()
|
||||
var accountList []AccountInfo
|
||||
|
||||
_, err := o.QueryTable(ACCOUNT_INFO).Limit(-1).All(&accountList)
|
||||
|
||||
if err != nil {
|
||||
logs.Error("get all account fail: ", err)
|
||||
}
|
||||
|
||||
return accountList
|
||||
}
|
||||
|
||||
func UpdateAccount(account AccountInfo) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.Update(&account)
|
||||
if err != nil {
|
||||
logs.Error("update account fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func DeleteAccountByUid(accountUid string) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.QueryTable(ACCOUNT_INFO).Filter("account_uid", accountUid).Delete()
|
||||
if err != nil {
|
||||
logs.Error("delete account fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
59
models/accounts/account_history_info.go
Normal file
59
models/accounts/account_history_info.go
Normal file
@@ -0,0 +1,59 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/10/19 14:56
|
||||
** @Author : yuebin
|
||||
** @File : account_history_info
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/10/19 14:56
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package accounts
|
||||
|
||||
import (
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
type AccountHistoryInfo struct {
|
||||
Id int
|
||||
AccountUid string
|
||||
AccountName string
|
||||
Type string
|
||||
Amount float64
|
||||
Balance float64
|
||||
UpdateTime string
|
||||
CreateTime string
|
||||
}
|
||||
|
||||
const ACCOUNT_HISTORY_INFO = "account_history_info"
|
||||
|
||||
func GetAccountHistoryLenByMap(params map[string]string) int {
|
||||
o := orm.NewOrm()
|
||||
qs := o.QueryTable(ACCOUNT_HISTORY_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
cnt, err := qs.Limit(-1).Count()
|
||||
if err != nil {
|
||||
logs.Error("get account history len by map fail: ", err)
|
||||
}
|
||||
return int(cnt)
|
||||
}
|
||||
|
||||
func GetAccountHistoryByMap(params map[string]string, displayCount, offset int) []AccountHistoryInfo {
|
||||
o := orm.NewOrm()
|
||||
qs := o.QueryTable(ACCOUNT_HISTORY_INFO)
|
||||
var accountHistoryList []AccountHistoryInfo
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
_, err := qs.Limit(displayCount, offset).OrderBy("-update_time").All(&accountHistoryList)
|
||||
if err != nil {
|
||||
logs.Error("get account history by map fail: ", err)
|
||||
}
|
||||
return accountHistoryList
|
||||
}
|
||||
150
models/agent/agent_info.go
Normal file
150
models/agent/agent_info.go
Normal file
@@ -0,0 +1,150 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/9/19 14:41
|
||||
** @Author : yuebin
|
||||
** @File : agent_info
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/9/19 14:41
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package agent
|
||||
|
||||
import (
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
type AgentInfo struct {
|
||||
Id int
|
||||
Status string
|
||||
AgentName string
|
||||
AgentPassword string
|
||||
PayPassword string
|
||||
AgentRemark string
|
||||
AgentUid string
|
||||
AgentPhone string
|
||||
UpdateTime string
|
||||
CreateTime string
|
||||
}
|
||||
|
||||
const AGENT_INFO = "agent_info"
|
||||
|
||||
func IsEixstByAgentName(agentName string) bool {
|
||||
o := orm.NewOrm()
|
||||
exist := o.QueryTable(AGENT_INFO).Filter("agent_name", agentName).Exist()
|
||||
|
||||
return exist
|
||||
}
|
||||
|
||||
func IsExistByAgentUid(uid string) bool {
|
||||
o := orm.NewOrm()
|
||||
exist := o.QueryTable(AGENT_INFO).Filter("agent_uid", uid).Exist()
|
||||
|
||||
return exist
|
||||
}
|
||||
|
||||
func IsEixstByAgentPhone(agentPhone string) bool {
|
||||
o := orm.NewOrm()
|
||||
exist := o.QueryTable(AGENT_INFO).Filter("agent_phone", agentPhone).Exist()
|
||||
return exist
|
||||
}
|
||||
|
||||
func InsertAgentInfo(agentInfo AgentInfo) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.Insert(&agentInfo)
|
||||
if err != nil {
|
||||
logs.Error("insert agent info fail: ", err)
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func GetAgentInfoByAgentUid(agentUid string) AgentInfo {
|
||||
o := orm.NewOrm()
|
||||
var agentInfo AgentInfo
|
||||
_, err := o.QueryTable(AGENT_INFO).Filter("agent_uid", agentUid).Limit(1).All(&agentInfo)
|
||||
|
||||
if err != nil {
|
||||
logs.Error("get agent info by agentUid fail: ", err)
|
||||
}
|
||||
|
||||
return agentInfo
|
||||
}
|
||||
|
||||
func GetAgentInfoLenByMap(params map[string]string) int {
|
||||
o := orm.NewOrm()
|
||||
qs := o.QueryTable(AGENT_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
cnt, err := qs.Limit(-1).Count()
|
||||
if err != nil {
|
||||
logs.Error("get agentinfo len by map fail: ", err)
|
||||
}
|
||||
|
||||
return int(cnt)
|
||||
}
|
||||
|
||||
func GetAgentInfoByMap(params map[string]string, displayCount, offset int) []AgentInfo {
|
||||
o := orm.NewOrm()
|
||||
var agentInfoList []AgentInfo
|
||||
|
||||
qs := o.QueryTable(AGENT_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
|
||||
_, err := qs.Limit(displayCount, offset).OrderBy("-update_time").All(&agentInfoList)
|
||||
|
||||
if err != nil {
|
||||
logs.Error("get agentInfo by map fail: ", err)
|
||||
}
|
||||
|
||||
return agentInfoList
|
||||
}
|
||||
|
||||
func GetAllAgentByMap(parmas map[string]string) []AgentInfo {
|
||||
o := orm.NewOrm()
|
||||
var agentList []AgentInfo
|
||||
|
||||
qs := o.QueryTable(AGENT_INFO)
|
||||
for k, v := range parmas {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
|
||||
_, err := qs.Limit(-1).All(&agentList)
|
||||
if err != nil {
|
||||
logs.Error("get all agent by map fail: ", err)
|
||||
}
|
||||
|
||||
return agentList
|
||||
}
|
||||
|
||||
func UpdateAgentInfo(agentInfo AgentInfo) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.Update(&agentInfo)
|
||||
|
||||
if err != nil {
|
||||
logs.Error("update agentinfo fail: ", err)
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func DeleteAgentByAgentUid(agentUid string) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.QueryTable(AGENT_INFO).Filter("agent_uid", agentUid).Delete()
|
||||
if err != nil {
|
||||
logs.Error("delete agent by agent uid fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
13
models/agent/agent_profit.go
Normal file
13
models/agent/agent_profit.go
Normal file
@@ -0,0 +1,13 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/12/17 17:50
|
||||
** @Author : yuebin
|
||||
** @File : agent_profit
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/12/17 17:50
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package agent
|
||||
|
||||
type AgentProfit struct {
|
||||
}
|
||||
48
models/init.go
Normal file
48
models/init.go
Normal file
@@ -0,0 +1,48 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/8/9 13:48
|
||||
** @Author : yuebin
|
||||
** @File : init
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/8/9 13:48
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package models
|
||||
|
||||
import (
|
||||
"boss/models/accounts"
|
||||
"boss/models/agent"
|
||||
"boss/models/merchant"
|
||||
"boss/models/notify"
|
||||
"boss/models/order"
|
||||
"boss/models/payfor"
|
||||
"boss/models/road"
|
||||
"boss/models/system"
|
||||
"boss/models/user"
|
||||
"fmt"
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
"github.com/beego/beego/v2/server/web"
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
)
|
||||
|
||||
func init() {
|
||||
dbHost, _ := web.AppConfig.String("mysql::dbhost")
|
||||
dbUser, _ := web.AppConfig.String("mysql::dbuser")
|
||||
dbPassword, _ := web.AppConfig.String("mysql::dbpasswd")
|
||||
dbBase, _ := web.AppConfig.String("mysql::dbbase")
|
||||
dbPort, _ := web.AppConfig.String("mysql::dbport")
|
||||
|
||||
link := fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?charset=utf8", dbUser, dbPassword, dbHost, dbPort, dbBase)
|
||||
|
||||
logs.Info("mysql init.....", link)
|
||||
|
||||
_ = orm.RegisterDriver("mysql", orm.DRMySQL)
|
||||
_ = orm.RegisterDataBase("default", "mysql", link)
|
||||
orm.RegisterModel(new(user.UserInfo), new(system.MenuInfo), new(system.SecondMenuInfo),
|
||||
new(system.PowerInfo), new(system.RoleInfo), new(system.BankCardInfo), new(road.RoadInfo),
|
||||
new(road.RoadPoolInfo), new(agent.AgentInfo), new(merchant.MerchantInfo), new(merchant.MerchantDeployInfo),
|
||||
new(accounts.AccountInfo), new(accounts.AccountHistoryInfo), new(order.OrderInfo), new(order.OrderProfitInfo),
|
||||
new(order.OrderSettleInfo), new(notify.NotifyInfo), new(merchant.MerchantLoadInfo),
|
||||
new(payfor.PayforInfo))
|
||||
}
|
||||
86
models/merchant/merchant_deploy_info.go
Normal file
86
models/merchant/merchant_deploy_info.go
Normal file
@@ -0,0 +1,86 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/10/7 11:52
|
||||
** @Author : yuebin
|
||||
** @File : merchant_deploy_info
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/10/7 11:52
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package merchant
|
||||
|
||||
import (
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
type MerchantDeployInfo struct {
|
||||
Id int
|
||||
Status string
|
||||
MerchantUid string
|
||||
PayType string
|
||||
SingleRoadUid string
|
||||
SingleRoadName string
|
||||
SingleRoadPlatformRate float64
|
||||
SingleRoadAgentRate float64
|
||||
RollRoadCode string
|
||||
RollRoadName string
|
||||
RollRoadPlatformRate float64
|
||||
RollRoadAgentRate float64
|
||||
IsLoan string
|
||||
LoanRate float64
|
||||
LoanDays int
|
||||
UnfreezeHour int
|
||||
WaitUnfreezeAmount float64
|
||||
LoanAmount float64
|
||||
UpdateTime string
|
||||
CreateTime string
|
||||
}
|
||||
|
||||
const MERCHANT_DEPLOY_INFO = "merchant_deploy_info"
|
||||
|
||||
func InsertMerchantDeployInfo(merchantDeployInfo MerchantDeployInfo) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.Insert(&merchantDeployInfo)
|
||||
if err != nil {
|
||||
logs.Error("insert merchant deploy info fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func IsExistByUidAndPayType(uid, payType string) bool {
|
||||
o := orm.NewOrm()
|
||||
isEixst := o.QueryTable(MERCHANT_DEPLOY_INFO).Filter("merchant_uid", uid).Filter("pay_type", payType).Exist()
|
||||
return isEixst
|
||||
}
|
||||
|
||||
func GetMerchantDeployByUidAndPayType(uid, payType string) MerchantDeployInfo {
|
||||
o := orm.NewOrm()
|
||||
var merchantDeployInfo MerchantDeployInfo
|
||||
_, err := o.QueryTable(MERCHANT_DEPLOY_INFO).Filter("merchant_uid", uid).Filter("pay_type", payType).Limit(1).All(&merchantDeployInfo)
|
||||
if err != nil {
|
||||
logs.Error("get merchant deploy by uid and paytype fail:", err)
|
||||
}
|
||||
return merchantDeployInfo
|
||||
}
|
||||
|
||||
func DeleteMerchantDeployByUidAndPayType(uid, payType string) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.QueryTable(MERCHANT_DEPLOY_INFO).Filter("merchant_uid", uid).Filter("pay_type", payType).Delete()
|
||||
if err != nil {
|
||||
logs.Error("delete merchant deploy by uid and payType fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func UpdateMerchantDeploy(merchantDeploy MerchantDeployInfo) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.Update(&merchantDeploy)
|
||||
if err != nil {
|
||||
logs.Error("update merchant deploy fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
186
models/merchant/merchant_info.go
Normal file
186
models/merchant/merchant_info.go
Normal file
@@ -0,0 +1,186 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/9/28 16:47
|
||||
** @Author : yuebin
|
||||
** @File : merchant_info
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/9/28 16:47
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package merchant
|
||||
|
||||
import (
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
type MerchantInfo struct {
|
||||
Id int
|
||||
Status string
|
||||
BelongAgentUid string
|
||||
BelongAgentName string
|
||||
MerchantName string
|
||||
MerchantUid string
|
||||
MerchantKey string
|
||||
MerchantSecret string
|
||||
LoginPassword string
|
||||
LoginAccount string
|
||||
AutoSettle string
|
||||
AutoPayFor string
|
||||
WhiteIps string
|
||||
Remark string
|
||||
SinglePayForRoadUid string
|
||||
SinglePayForRoadName string
|
||||
RollPayForRoadCode string
|
||||
RollPayForRoadName string
|
||||
PayforFee float64
|
||||
UpdateTime string
|
||||
CreateTime string
|
||||
}
|
||||
|
||||
const MERCHANT_INFO = "merchant_info"
|
||||
|
||||
func IsExistByMerchantName(merchantName string) bool {
|
||||
o := orm.NewOrm()
|
||||
exist := o.QueryTable(MERCHANT_INFO).Filter("merchant_name", merchantName).Exist()
|
||||
|
||||
return exist
|
||||
}
|
||||
|
||||
func IsExistByMerchantUid(uid string) bool {
|
||||
o := orm.NewOrm()
|
||||
exist := o.QueryTable(MERCHANT_INFO).Filter("merchant_uid", uid).Exist()
|
||||
|
||||
return exist
|
||||
}
|
||||
|
||||
func IsExistMerchantByAgentUid(uid string) bool {
|
||||
o := orm.NewOrm()
|
||||
exist := o.QueryTable(MERCHANT_INFO).Filter("belong_agent_uid", uid).Exist()
|
||||
|
||||
return exist
|
||||
}
|
||||
|
||||
func IsExistByMerchantPhone(phone string) bool {
|
||||
o := orm.NewOrm()
|
||||
exist := o.QueryTable(MERCHANT_INFO).Filter("LoginAccount", phone).Exist()
|
||||
|
||||
return exist
|
||||
}
|
||||
|
||||
func InsertMerchantInfo(merchantInfo MerchantInfo) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.Insert(&merchantInfo)
|
||||
if err != nil {
|
||||
logs.Error("insert merchant fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func GetMerchantLenByMap(params map[string]string) int {
|
||||
o := orm.NewOrm()
|
||||
qs := o.QueryTable(MERCHANT_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
cnt, err := qs.Count()
|
||||
if err != nil {
|
||||
logs.Error("get merchant len by map fail: ", err)
|
||||
}
|
||||
return int(cnt)
|
||||
}
|
||||
|
||||
func GetMerchantListByMap(params map[string]string, displayCount, offset int) []MerchantInfo {
|
||||
o := orm.NewOrm()
|
||||
qs := o.QueryTable(MERCHANT_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
var merchantList []MerchantInfo
|
||||
_, err := qs.Limit(displayCount, offset).OrderBy("-update_time").All(&merchantList)
|
||||
if err != nil {
|
||||
logs.Error("get merchant list by map fail: ", err)
|
||||
}
|
||||
return merchantList
|
||||
}
|
||||
|
||||
func GetAllMerchant() []MerchantInfo {
|
||||
o := orm.NewOrm()
|
||||
var merchantList []MerchantInfo
|
||||
|
||||
_, err := o.QueryTable(MERCHANT_INFO).Limit(-1).All(&merchantList)
|
||||
if err != nil {
|
||||
logs.Error("get all merchant fail:", err)
|
||||
}
|
||||
|
||||
return merchantList
|
||||
}
|
||||
|
||||
func GetMerchantByParams(params map[string]string, displayCount, offset int) []MerchantInfo {
|
||||
o := orm.NewOrm()
|
||||
var merchantList []MerchantInfo
|
||||
qs := o.QueryTable(MERCHANT_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
|
||||
qs.Limit(displayCount, offset).All(&merchantList)
|
||||
|
||||
return merchantList
|
||||
}
|
||||
|
||||
func GetMerchantLenByParams(params map[string]string) int {
|
||||
o := orm.NewOrm()
|
||||
qs := o.QueryTable(MERCHANT_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
|
||||
cnt, err := qs.Limit(-1).Count()
|
||||
|
||||
if err != nil {
|
||||
logs.Error("get merchant len by params fail: ", err)
|
||||
}
|
||||
return int(cnt)
|
||||
}
|
||||
|
||||
func GetMerchantByUid(merchantUid string) MerchantInfo {
|
||||
o := orm.NewOrm()
|
||||
var merchantInfo MerchantInfo
|
||||
_, err := o.QueryTable(MERCHANT_INFO).Filter("merchant_uid", merchantUid).Limit(1).All(&merchantInfo)
|
||||
if err != nil {
|
||||
logs.Error("get merchant info fail: ", err)
|
||||
}
|
||||
return merchantInfo
|
||||
}
|
||||
|
||||
func UpdateMerchant(merchantInfo MerchantInfo) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.Update(&merchantInfo)
|
||||
|
||||
if err != nil {
|
||||
logs.Error("update merchant fail: ", err)
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func DeleteMerchantByUid(merchantUid string) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.QueryTable(MERCHANT_INFO).Filter("merchant_uid", merchantUid).Delete()
|
||||
if err != nil {
|
||||
logs.Error("delete merchant fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
56
models/merchant/merchant_load_info.go
Normal file
56
models/merchant/merchant_load_info.go
Normal file
@@ -0,0 +1,56 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/11/22 13:07
|
||||
** @Author : yuebin
|
||||
** @File : merchant_load_info
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/11/22 13:07
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package merchant
|
||||
|
||||
import (
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
type MerchantLoadInfo struct {
|
||||
Id int
|
||||
Status string
|
||||
MerchantUid string
|
||||
RoadUid string
|
||||
LoadDate string
|
||||
LoadAmount float64
|
||||
UpdateTime string
|
||||
CreateTime string
|
||||
}
|
||||
|
||||
const MERCHANT_LOAD_INFO = "merchant_load_info"
|
||||
|
||||
func GetMerchantLoadInfoByMap(params map[string]string) []MerchantLoadInfo {
|
||||
o := orm.NewOrm()
|
||||
qs := o.QueryTable(MERCHANT_LOAD_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
var merchantLoadList []MerchantLoadInfo
|
||||
_, err := qs.Limit(-11).All(&merchantLoadList)
|
||||
if err != nil {
|
||||
logs.Error("get merchant load info fail: ", err)
|
||||
}
|
||||
return merchantLoadList
|
||||
}
|
||||
|
||||
func IsExistMerchantLoadByParams(params map[string]string) bool {
|
||||
o := orm.NewOrm()
|
||||
qs := o.QueryTable(MERCHANT_LOAD_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
|
||||
return qs.Exist()
|
||||
}
|
||||
69
models/notify/notify_info.go
Normal file
69
models/notify/notify_info.go
Normal file
@@ -0,0 +1,69 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/11/20 13:13
|
||||
** @Author : yuebin
|
||||
** @File : notify_info
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/11/20 13:13
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package notify
|
||||
|
||||
import (
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
type NotifyInfo struct {
|
||||
Id int
|
||||
Type string //订单-order,代付-payfor
|
||||
BankOrderId string
|
||||
MerchantOrderId string
|
||||
Status string
|
||||
Times int
|
||||
Url string
|
||||
Response string
|
||||
UpdateTime string
|
||||
CreateTime string
|
||||
}
|
||||
|
||||
const NOTIFYINFO = "notify_info"
|
||||
|
||||
func InsertNotifyInfo(notifyInfo NotifyInfo) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.Insert(¬ifyInfo)
|
||||
if err != nil {
|
||||
logs.Error("insert notify fail:", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func GetNotifyInfoByBankOrderId(bankOrderId string) NotifyInfo {
|
||||
o := orm.NewOrm()
|
||||
var notifyInfo NotifyInfo
|
||||
_, err := o.QueryTable(NOTIFYINFO).Filter("bank_order_id", bankOrderId).All(¬ifyInfo)
|
||||
if err != nil {
|
||||
logs.Error("get notify info by bankOrderId fail: ", err)
|
||||
}
|
||||
return notifyInfo
|
||||
}
|
||||
|
||||
func GetNotifyBankOrderIdListByParams(params map[string]string) []string {
|
||||
o := orm.NewOrm()
|
||||
qs := o.QueryTable(NOTIFYINFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
|
||||
var notifyList []NotifyInfo
|
||||
qs.Limit(-1).All(¬ifyList)
|
||||
var list []string
|
||||
for _, n := range notifyList {
|
||||
list = append(list, n.BankOrderId)
|
||||
}
|
||||
|
||||
return list
|
||||
}
|
||||
226
models/order/order_info.go
Normal file
226
models/order/order_info.go
Normal file
@@ -0,0 +1,226 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/10/28 10:15
|
||||
** @Author : yuebin
|
||||
** @File : order_info
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/10/28 10:15
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package order
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
type OrderInfo struct {
|
||||
Id int
|
||||
ShopName string //商品名称
|
||||
OrderPeriod string //订单有效时间
|
||||
MerchantOrderId string //商户订单id
|
||||
BankOrderId string //本系统订单id
|
||||
BankTransId string //上游流水id
|
||||
OrderAmount float64 //订单提交的金额
|
||||
ShowAmount float64 //待支付的金额
|
||||
FactAmount float64 //用户实际支付金额
|
||||
RollPoolCode string //轮询池编码
|
||||
RollPoolName string //轮询池名臣
|
||||
RoadUid string //通道标识
|
||||
RoadName string //通道名称
|
||||
PayProductName string //上游支付公司的名称
|
||||
PayProductCode string //上游支付公司的编码代号
|
||||
PayTypeCode string //支付产品编码
|
||||
PayTypeName string //支付产品名称
|
||||
OsType string //操作系统类型
|
||||
Status string //订单支付状态
|
||||
Refund string //退款状态
|
||||
RefundTime string //退款操作时间
|
||||
Freeze string //冻结状态
|
||||
FreezeTime string //冻结时间
|
||||
Unfreeze string //是否已经解冻
|
||||
UnfreezeTime string //解冻时间
|
||||
ReturnUrl string //支付完跳转地址
|
||||
NotifyUrl string //下游回调地址
|
||||
MerchantUid string //商户id
|
||||
MerchantName string //商户名称
|
||||
AgentUid string //该商户所属代理
|
||||
AgentName string //该商户所属代理名称
|
||||
ExValue string
|
||||
CardData string
|
||||
UpdateTime string
|
||||
CreateTime string
|
||||
}
|
||||
|
||||
const ORDER_INFO = "order_info"
|
||||
|
||||
func BankOrderIdIsEixst(bankOrderId string) bool {
|
||||
o := orm.NewOrm()
|
||||
exists := o.QueryTable(ORDER_INFO).Filter("bank_order_id", bankOrderId).Exist()
|
||||
return exists
|
||||
}
|
||||
|
||||
func GetOrderLenByMap(params map[string]string) int {
|
||||
o := orm.NewOrm()
|
||||
qs := o.QueryTable(ORDER_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
cnt, _ := qs.Limit(-1).Count()
|
||||
return int(cnt)
|
||||
}
|
||||
|
||||
func GetOrderByMap(params map[string]string, display, offset int) []OrderInfo {
|
||||
o := orm.NewOrm()
|
||||
var orderInfoList []OrderInfo
|
||||
qs := o.QueryTable(ORDER_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
_, err := qs.Limit(display, offset).OrderBy("-create_time").All(&orderInfoList)
|
||||
if err != nil {
|
||||
logs.Error("get order by map fail: ", err)
|
||||
}
|
||||
return orderInfoList
|
||||
}
|
||||
|
||||
// 获得今日数据
|
||||
func GetToDayInfo() string {
|
||||
//2022-11-21 04:09:00
|
||||
var params map[string]string = map[string]string{}
|
||||
//params["create_time__gte"] = startTime
|
||||
//params["create_time__lte"] = endTime
|
||||
o := orm.NewOrm()
|
||||
qs := o.QueryTable(ORDER_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
|
||||
successRate := "0%"
|
||||
allCount, _ := qs.Limit(-1).Count()
|
||||
successCount, _ := qs.Filter("status", "success").Limit(-1).Count()
|
||||
if allCount == 0 {
|
||||
return successRate
|
||||
}
|
||||
tmp := float64(successCount) / float64(allCount) * 100
|
||||
successRate = fmt.Sprintf("%.1f", tmp)
|
||||
return successRate + "%"
|
||||
}
|
||||
|
||||
// 获得成功率
|
||||
func GetSuccessRateByMap(params map[string]string) string {
|
||||
o := orm.NewOrm()
|
||||
qs := o.QueryTable(ORDER_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
|
||||
successRate := "0%"
|
||||
allCount, _ := qs.Limit(-1).Count()
|
||||
successCount, _ := qs.Filter("status", "success").Limit(-1).Count()
|
||||
if allCount == 0 {
|
||||
return successRate
|
||||
}
|
||||
tmp := float64(successCount) / float64(allCount) * 100
|
||||
successRate = fmt.Sprintf("%.1f", tmp)
|
||||
return successRate + "%"
|
||||
}
|
||||
|
||||
func GetAllAmountByMap(params map[string]string) float64 {
|
||||
o := orm.NewOrm()
|
||||
condition := "select sum(order_amount) as allAmount from order_info "
|
||||
for _, v := range params {
|
||||
if len(v) > 0 {
|
||||
condition = condition + "where "
|
||||
break
|
||||
}
|
||||
}
|
||||
flag := false
|
||||
if params["create_time__gte"] != "" {
|
||||
flag = true
|
||||
condition = condition + " create_time >= '" + params["create_time__gte"] + "'"
|
||||
}
|
||||
if params["create_time__lte"] != "" {
|
||||
if flag {
|
||||
condition = condition + " and "
|
||||
}
|
||||
condition = condition + " create_time <= '" + params["create_time__lte"] + "'"
|
||||
}
|
||||
if params["merchant_name__icontains"] != "" {
|
||||
if flag {
|
||||
condition = condition + " and "
|
||||
}
|
||||
condition = condition + "merchant_name like %'" + params["merchant_name__icontains"] + "'% "
|
||||
}
|
||||
if params["merchant_order_id"] != "" {
|
||||
if flag {
|
||||
condition = condition + " and "
|
||||
}
|
||||
condition = condition + " merchant_order_id = '" + params["merchant_order_id"] + "'"
|
||||
}
|
||||
if params["bank_order_id"] != "" {
|
||||
if flag {
|
||||
condition = condition + " and "
|
||||
}
|
||||
condition = condition + " bank_order_id = '" + params["bank_order_id"] + "'"
|
||||
}
|
||||
if params["status"] != "" {
|
||||
if flag {
|
||||
condition = condition + " and "
|
||||
}
|
||||
condition = condition + "status = '" + params["status"] + "'"
|
||||
}
|
||||
if params["pay_product_code"] != "" {
|
||||
if flag {
|
||||
condition = condition + " and "
|
||||
}
|
||||
condition = condition + "pay_product_code = " + params["pay_product_code"] + "'"
|
||||
}
|
||||
if params["pay_type_code"] != "" {
|
||||
if flag {
|
||||
condition = condition + " and "
|
||||
}
|
||||
condition = condition + "pay_type_code = " + params["pay_type_code"]
|
||||
}
|
||||
logs.Info("get order amount str = ", condition)
|
||||
var maps []orm.Params
|
||||
allAmount := 0.00
|
||||
num, err := o.Raw(condition).Values(&maps)
|
||||
if err == nil && num > 0 {
|
||||
if maps[0]["allAmount"] != nil {
|
||||
allAmount, _ = strconv.ParseFloat(maps[0]["allAmount"].(string), 64)
|
||||
}
|
||||
}
|
||||
return allAmount
|
||||
}
|
||||
|
||||
func GetOrderByBankOrderId(bankOrderId string) OrderInfo {
|
||||
o := orm.NewOrm()
|
||||
var orderInfo OrderInfo
|
||||
_, err := o.QueryTable(ORDER_INFO).Filter("bank_order_id", bankOrderId).Limit(1).All(&orderInfo)
|
||||
if err != nil {
|
||||
logs.Error("get order info by bankOrderId fail: ", err)
|
||||
}
|
||||
return orderInfo
|
||||
}
|
||||
|
||||
func GetOneOrder(bankOrderId string) OrderInfo {
|
||||
o := orm.NewOrm()
|
||||
var orderInfo OrderInfo
|
||||
_, err := o.QueryTable(ORDER_INFO).Filter("bank_order_id", bankOrderId).Limit(1).All(&orderInfo)
|
||||
if err != nil {
|
||||
logs.Error("get one order fail: ", err)
|
||||
}
|
||||
|
||||
return orderInfo
|
||||
}
|
||||
119
models/order/order_profit_info.go
Normal file
119
models/order/order_profit_info.go
Normal file
@@ -0,0 +1,119 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/10/30 11:44
|
||||
** @Author : yuebin
|
||||
** @File : order_profit_info
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/10/30 11:44
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package order
|
||||
|
||||
import (
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type OrderProfitInfo struct {
|
||||
Id int
|
||||
MerchantName string
|
||||
MerchantUid string
|
||||
AgentName string
|
||||
AgentUid string
|
||||
PayProductCode string
|
||||
PayProductName string
|
||||
PayTypeCode string
|
||||
PayTypeName string
|
||||
Status string
|
||||
MerchantOrderId string
|
||||
BankOrderId string
|
||||
BankTransId string
|
||||
OrderAmount float64
|
||||
ShowAmount float64
|
||||
FactAmount float64 //实际支付金额
|
||||
UserInAmount float64
|
||||
SupplierRate float64
|
||||
PlatformRate float64
|
||||
AgentRate float64
|
||||
AllProfit float64
|
||||
SupplierProfit float64
|
||||
PlatformProfit float64
|
||||
AgentProfit float64
|
||||
UpdateTime string
|
||||
CreateTime string
|
||||
}
|
||||
|
||||
const ORDER_PROFIT_INFO = "order_profit_info"
|
||||
|
||||
func GetOrderProfitByBankOrderId(bankOrderId string) OrderProfitInfo {
|
||||
o := orm.NewOrm()
|
||||
var orderProfit OrderProfitInfo
|
||||
_, err := o.QueryTable(ORDER_PROFIT_INFO).Filter("bank_order_id", bankOrderId).Limit(1).All(&orderProfit)
|
||||
if err != nil {
|
||||
logs.Error("GetOrderProfitByBankOrderId fail:", err)
|
||||
}
|
||||
return orderProfit
|
||||
}
|
||||
|
||||
func GetOrderProfitLenByMap(params map[string]string) int {
|
||||
o := orm.NewOrm()
|
||||
qs := o.QueryTable(ORDER_PROFIT_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
cnt, _ := qs.Limit(-1).Count()
|
||||
return int(cnt)
|
||||
}
|
||||
|
||||
func GetOrderProfitByMap(params map[string]string, display, offset int) []OrderProfitInfo {
|
||||
o := orm.NewOrm()
|
||||
var orderProfitInfoList []OrderProfitInfo
|
||||
qs := o.QueryTable(ORDER_PROFIT_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
_, err := qs.Limit(display, offset).OrderBy("-update_time").All(&orderProfitInfoList)
|
||||
if err != nil {
|
||||
logs.Error("get order by map fail: ", err)
|
||||
}
|
||||
return orderProfitInfoList
|
||||
}
|
||||
|
||||
func GetPlatformProfitByMap(params map[string]string) []PlatformProfit {
|
||||
|
||||
o := orm.NewOrm()
|
||||
|
||||
cond := "select merchant_name, agent_name, pay_product_name as supplier_name, pay_type_name, sum(fact_amount) as order_amount, count(1) as order_count, " +
|
||||
"sum(platform_profit) as platform_profit, sum(agent_profit) as agent_profit from " + ORDER_PROFIT_INFO + " where status='success' "
|
||||
flag := false
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
if flag {
|
||||
cond += " and"
|
||||
}
|
||||
if strings.Contains(k, "create_time__gte") {
|
||||
cond = cond + " create_time>='" + v + "'"
|
||||
} else if strings.Contains(k, "create_time__lte") {
|
||||
cond = cond + " create_time<='" + v + "'"
|
||||
} else {
|
||||
cond = cond + " " + k + "='" + v + "'"
|
||||
}
|
||||
flag = true
|
||||
}
|
||||
}
|
||||
|
||||
cond += " group by merchant_uid, agent_uid, pay_product_code, pay_type_code"
|
||||
|
||||
var platformProfitList []PlatformProfit
|
||||
_, err := o.Raw(cond).QueryRows(&platformProfitList)
|
||||
if err != nil {
|
||||
logs.Error("get platform profit by map fail:", err)
|
||||
}
|
||||
|
||||
return platformProfitList
|
||||
}
|
||||
51
models/order/order_settle_info.go
Normal file
51
models/order/order_settle_info.go
Normal file
@@ -0,0 +1,51 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/10/30 11:41
|
||||
** @Author : yuebin
|
||||
** @File : order_settle_info
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/10/30 11:41
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package order
|
||||
|
||||
import (
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
type OrderSettleInfo struct {
|
||||
Id int
|
||||
PayProductCode string
|
||||
PayProductName string
|
||||
PayTypeCode string
|
||||
RoadUid string
|
||||
PayTypeName string
|
||||
MerchantUid string
|
||||
MerchantName string
|
||||
MerchantOrderId string
|
||||
BankOrderId string
|
||||
SettleAmount float64
|
||||
IsAllowSettle string
|
||||
IsCompleteSettle string
|
||||
UpdateTime string
|
||||
CreateTime string
|
||||
}
|
||||
|
||||
const ORDER_SETTLE_INFO = "order_settle_info"
|
||||
|
||||
func GetOrderSettleListByParams(params map[string]string) []OrderSettleInfo {
|
||||
o := orm.NewOrm()
|
||||
qs := o.QueryTable(ORDER_SETTLE_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
var orderSettleList []OrderSettleInfo
|
||||
if _, err := qs.Limit(-1).All(&orderSettleList); err != nil {
|
||||
logs.Error("get order settle list fail: ", err)
|
||||
}
|
||||
|
||||
return orderSettleList
|
||||
}
|
||||
21
models/order/platform_profit.go
Normal file
21
models/order/platform_profit.go
Normal file
@@ -0,0 +1,21 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/12/17 17:50
|
||||
** @Author : yuebin
|
||||
** @File : platform_profit
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/12/17 17:50
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package order
|
||||
|
||||
type PlatformProfit struct {
|
||||
MerchantName string
|
||||
AgentName string
|
||||
SupplierName string
|
||||
PayTypeName string
|
||||
OrderAmount float64
|
||||
OrderCount int
|
||||
PlatformProfit float64
|
||||
AgentProfit float64
|
||||
}
|
||||
202
models/payfor/payfor_info.go
Normal file
202
models/payfor/payfor_info.go
Normal file
@@ -0,0 +1,202 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/11/25 14:32
|
||||
** @Author : yuebin
|
||||
** @File : payfor_info
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/11/25 14:32
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package payfor
|
||||
|
||||
import (
|
||||
"boss/common"
|
||||
"boss/models/accounts"
|
||||
"boss/utils"
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
type PayforInfo struct {
|
||||
Id int
|
||||
PayforUid string
|
||||
MerchantUid string
|
||||
MerchantName string
|
||||
MerchantOrderId string
|
||||
BankOrderId string
|
||||
BankTransId string
|
||||
RoadUid string
|
||||
RoadName string
|
||||
RollPoolCode string
|
||||
RollPoolName string
|
||||
PayforFee float64
|
||||
PayforAmount float64
|
||||
PayforTotalAmount float64
|
||||
BankCode string
|
||||
BankName string
|
||||
BankAccountName string
|
||||
BankAccountNo string
|
||||
BankAccountType string
|
||||
Country string
|
||||
City string
|
||||
Ares string
|
||||
BankAccountAddress string
|
||||
PhoneNo string
|
||||
GiveType string
|
||||
Type string
|
||||
NotifyUrl string
|
||||
Status string
|
||||
IsSend string
|
||||
RequestTime string
|
||||
ResponseTime string
|
||||
ResponseContent string
|
||||
Remark string
|
||||
CreateTime string
|
||||
UpdateTime string
|
||||
}
|
||||
|
||||
const PAYFORINFO = "payfor_info"
|
||||
|
||||
func InsertPayfor(payFor PayforInfo) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.Insert(&payFor)
|
||||
if err != nil {
|
||||
logs.Error("insert payfor fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func GetPayForLenByMap(params map[string]string) int {
|
||||
o := orm.NewOrm()
|
||||
qs := o.QueryTable(PAYFORINFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
|
||||
cnt, err := qs.Limit(-1).Count()
|
||||
|
||||
if err != nil {
|
||||
logs.Error("get pay for len by map fail: ", err)
|
||||
}
|
||||
|
||||
return int(cnt)
|
||||
}
|
||||
|
||||
func GetPayForByMap(params map[string]string, displayCount, offset int) []PayforInfo {
|
||||
o := orm.NewOrm()
|
||||
var payForList []PayforInfo
|
||||
|
||||
qs := o.QueryTable(PAYFORINFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
|
||||
_, err := qs.Limit(displayCount, offset).OrderBy("-create_time").All(&payForList)
|
||||
|
||||
if err != nil {
|
||||
logs.Error("get agentInfo by map fail: ", err)
|
||||
}
|
||||
|
||||
return payForList
|
||||
}
|
||||
|
||||
func GetPayForListByParams(params map[string]string) []PayforInfo {
|
||||
o := orm.NewOrm()
|
||||
var payForList []PayforInfo
|
||||
qs := o.QueryTable(PAYFORINFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
_, err := qs.Limit(-1).All(&payForList)
|
||||
if err != nil {
|
||||
logs.Error("GetPayForListByParams fail:", err)
|
||||
}
|
||||
return payForList
|
||||
}
|
||||
|
||||
func GetPayForByBankOrderId(bankOrderId string) PayforInfo {
|
||||
o := orm.NewOrm()
|
||||
var payFor PayforInfo
|
||||
_, err := o.QueryTable(PAYFORINFO).Filter("bank_order_id", bankOrderId).Limit(1).All(&payFor)
|
||||
|
||||
if err != nil {
|
||||
logs.Error("get pay for by bank_order_id fail: ", err)
|
||||
}
|
||||
|
||||
return payFor
|
||||
}
|
||||
|
||||
func ForUpdatePayFor(payFor PayforInfo) bool {
|
||||
o := orm.NewOrm()
|
||||
|
||||
if err := o.DoTx(func(ctx context.Context, txOrm orm.TxOrmer) error {
|
||||
|
||||
var tmp PayforInfo
|
||||
if err := txOrm.Raw("select * from payfor_info where bank_order_id = ? for update", payFor.BankOrderId).QueryRow(&tmp); err != nil || tmp.PayforUid == "" {
|
||||
logs.Error("for update payfor select fail:", err)
|
||||
return err
|
||||
}
|
||||
|
||||
if tmp.Status == common.PAYFOR_FAIL || tmp.Status == common.PAYFOR_SUCCESS {
|
||||
return errors.New("订单已经处理")
|
||||
}
|
||||
|
||||
//如果是手动打款,并且是需要处理商户金额
|
||||
if payFor.Status == common.PAYFOR_SOLVING && tmp.Status == common.PAYFOR_COMFRIM &&
|
||||
payFor.GiveType == common.PAYFOR_HAND && payFor.Type != common.SELF_HELP {
|
||||
|
||||
var account accounts.AccountInfo
|
||||
if err := txOrm.Raw("select * from account_info where account_uid = ? for update", payFor.MerchantUid).QueryRow(&account); err != nil || account.AccountUid == "" {
|
||||
logs.Error("for update payfor select account info,fail:", err)
|
||||
return err
|
||||
}
|
||||
//计算该用户的可用金额
|
||||
ableAmount := account.SettleAmount - account.FreezeAmount - account.PayforAmount - account.LoanAmount
|
||||
if ableAmount >= payFor.PayforAmount+payFor.PayforFee {
|
||||
account.PayforAmount += payFor.PayforFee + payFor.PayforAmount
|
||||
account.UpdateTime = utils.GetBasicDateTime()
|
||||
if _, err := txOrm.Update(&account); err != nil {
|
||||
logs.Error("for update payfor update account fail:", err)
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
logs.Error(fmt.Sprintf("商户uid=%s,可用金额不够", payFor.MerchantUid))
|
||||
payFor.ResponseContent = "商户可用余额不足"
|
||||
payFor.Status = common.PAYFOR_FAIL
|
||||
}
|
||||
}
|
||||
|
||||
if _, err := txOrm.Update(&payFor); err != nil {
|
||||
logs.Error("for update payfor fail: ", err)
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
}); err != nil {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func UpdatePayFor(payFor PayforInfo) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.Update(&payFor)
|
||||
|
||||
if err != nil {
|
||||
logs.Error("update pay for fail:", err)
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
162
models/road/road_info.go
Normal file
162
models/road/road_info.go
Normal file
@@ -0,0 +1,162 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/9/8 12:09
|
||||
** @Author : yuebin
|
||||
** @File : road_info
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/9/8 12:09
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package road
|
||||
|
||||
import (
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
type RoadInfo struct {
|
||||
Id int
|
||||
Status string
|
||||
RoadName string
|
||||
RoadUid string
|
||||
Remark string
|
||||
ProductName string
|
||||
ProductUid string
|
||||
PayType string
|
||||
BasicFee float64
|
||||
SettleFee float64
|
||||
TotalLimit float64
|
||||
TodayLimit float64
|
||||
SingleMinLimit float64
|
||||
SingleMaxLimit float64
|
||||
StarHour int
|
||||
EndHour int
|
||||
Params string
|
||||
TodayIncome float64
|
||||
TotalIncome float64
|
||||
TodayProfit float64
|
||||
TotalProfit float64
|
||||
Balance float64
|
||||
RequestAll int
|
||||
RequestSuccess int
|
||||
UpdateTime string
|
||||
CreateTime string
|
||||
}
|
||||
|
||||
const ROAD_INFO = "road_info"
|
||||
|
||||
func GetRoadInfoByRoadUid(roadUid string) RoadInfo {
|
||||
o := orm.NewOrm()
|
||||
var roadInfo RoadInfo
|
||||
_, err := o.QueryTable(ROAD_INFO).Exclude("status", "delete").Filter("road_uid", roadUid).Limit(1).All(&roadInfo)
|
||||
if err != nil {
|
||||
logs.Error("get road info by road uid fail: ", err)
|
||||
}
|
||||
return roadInfo
|
||||
}
|
||||
|
||||
func GetRoadInfosByRoadUids(roadUids []string) []RoadInfo {
|
||||
o := orm.NewOrm()
|
||||
var roadInfoList []RoadInfo
|
||||
_, err := o.QueryTable(ROAD_INFO).Filter("road_uid__in", roadUids).OrderBy("update_time").All(&roadInfoList)
|
||||
if err != nil {
|
||||
logs.Error("get roadInfos by roadUids fail: ", err)
|
||||
}
|
||||
return roadInfoList
|
||||
}
|
||||
|
||||
func GetRoadInfoByName(roadName string) RoadInfo {
|
||||
o := orm.NewOrm()
|
||||
var roadInfo RoadInfo
|
||||
_, err := o.QueryTable(ROAD_INFO).Exclude("status", "delete").Filter("road_name", roadName).Limit(1).All(&roadInfo)
|
||||
if err != nil {
|
||||
logs.Error("get road info by name fail: ", err)
|
||||
}
|
||||
return roadInfo
|
||||
}
|
||||
|
||||
func GetRoadLenByMap(params map[string]string) int {
|
||||
o := orm.NewOrm()
|
||||
qs := o.QueryTable(ROAD_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
cnt, err := qs.Exclude("status", "delete").Limit(-1).Count()
|
||||
if err != nil {
|
||||
logs.Error("get road len by map fail: ", err)
|
||||
}
|
||||
return int(cnt)
|
||||
}
|
||||
|
||||
func GetRoadInfoByMap(params map[string]string, displayCount, offset int) []RoadInfo {
|
||||
o := orm.NewOrm()
|
||||
var roadInfoList []RoadInfo
|
||||
qs := o.QueryTable(ROAD_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
|
||||
_, err := qs.Exclude("status", "delete").Limit(displayCount, offset).OrderBy("-update_time").All(&roadInfoList)
|
||||
if err != nil {
|
||||
logs.Error("get road info by map fail: ", err)
|
||||
}
|
||||
return roadInfoList
|
||||
}
|
||||
|
||||
func GetAllRoad(params map[string]string) []RoadInfo {
|
||||
o := orm.NewOrm()
|
||||
var roadInfoList []RoadInfo
|
||||
qs := o.QueryTable(ROAD_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
_, err := qs.Limit(-1).All(&roadInfoList)
|
||||
if err != nil {
|
||||
logs.Error("get all road fail: ", err)
|
||||
}
|
||||
return roadInfoList
|
||||
}
|
||||
|
||||
func InsertRoadInfo(roadInfo RoadInfo) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.Insert(&roadInfo)
|
||||
|
||||
if err != nil {
|
||||
logs.Error("insert road info fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func RoadInfoExistByRoadUid(roadUid string) bool {
|
||||
o := orm.NewOrm()
|
||||
exist := o.QueryTable(ROAD_INFO).Filter("status", "active").Filter("road_uid", roadUid).Exist()
|
||||
|
||||
return exist
|
||||
}
|
||||
|
||||
func UpdateRoadInfo(roadInfo RoadInfo) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.Update(&roadInfo)
|
||||
if err != nil {
|
||||
logs.Error("update road info fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func DeleteRoadByRoadUid(roadUid string) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.QueryTable(ROAD_INFO).Filter("road_uid", roadUid).Delete()
|
||||
if err != nil {
|
||||
logs.Error("delete road by road uid fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
127
models/road/road_pool_info.go
Normal file
127
models/road/road_pool_info.go
Normal file
@@ -0,0 +1,127 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/9/9 16:35
|
||||
** @Author : yuebin
|
||||
** @File : road_pool_info
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/9/9 16:35
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package road
|
||||
|
||||
import (
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
type RoadPoolInfo struct {
|
||||
Id int
|
||||
Status string
|
||||
RoadPoolName string
|
||||
RoadPoolCode string
|
||||
RoadUidPool string
|
||||
UpdateTime string
|
||||
CreateTime string
|
||||
}
|
||||
|
||||
const ROAD_POOL_INFO = "road_pool_info"
|
||||
|
||||
func InsertRoadPool(roadPool RoadPoolInfo) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.Insert(&roadPool)
|
||||
if err != nil {
|
||||
logs.Error("insert road pool fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func GetRoadPoolLenByMap(params map[string]string) int {
|
||||
o := orm.NewOrm()
|
||||
qs := o.QueryTable(ROAD_POOL_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
cnt, err := qs.Limit(-1).Count()
|
||||
if err != nil {
|
||||
logs.Error("get road pool len by map fail: ", err)
|
||||
}
|
||||
return int(cnt)
|
||||
}
|
||||
|
||||
func GetRoadPoolByMap(params map[string]string, displayCount, offset int) []RoadPoolInfo {
|
||||
o := orm.NewOrm()
|
||||
var roadPoolList []RoadPoolInfo
|
||||
qs := o.QueryTable(ROAD_POOL_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
_, err := qs.Limit(displayCount, offset).OrderBy("-update_time").All(&roadPoolList)
|
||||
if err != nil {
|
||||
logs.Error("get road pool by map fail: ", err)
|
||||
}
|
||||
return roadPoolList
|
||||
}
|
||||
|
||||
func GetRoadPoolByRoadPoolCode(roadPoolCode string) RoadPoolInfo {
|
||||
o := orm.NewOrm()
|
||||
var roadPoolInfo RoadPoolInfo
|
||||
_, err := o.QueryTable(ROAD_POOL_INFO).Filter("road_pool_code", roadPoolCode).Limit(1).All(&roadPoolInfo)
|
||||
|
||||
if err != nil {
|
||||
logs.Error("get road pool info by road pool code fail: ", err)
|
||||
}
|
||||
|
||||
return roadPoolInfo
|
||||
}
|
||||
|
||||
func GetAllRollPool(params map[string]string) []RoadPoolInfo {
|
||||
o := orm.NewOrm()
|
||||
var roadPoolList []RoadPoolInfo
|
||||
qs := o.QueryTable(ROAD_POOL_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
_, err := qs.Limit(-1).All(&roadPoolList)
|
||||
if err != nil {
|
||||
logs.Error("get all roll pool fail: ", err)
|
||||
}
|
||||
return roadPoolList
|
||||
}
|
||||
|
||||
func GetRoadPoolByName(roadPoolName string) RoadPoolInfo {
|
||||
o := orm.NewOrm()
|
||||
var roadPoolInfo RoadPoolInfo
|
||||
_, err := o.QueryTable(ROAD_POOL_INFO).Filter("road_pool_name", roadPoolName).Limit(1).All(&roadPoolInfo)
|
||||
if err != nil {
|
||||
logs.Error("get road pool by name fail: ", err)
|
||||
}
|
||||
return roadPoolInfo
|
||||
}
|
||||
|
||||
func DeleteRoadPoolByCode(roadPoolCode string) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.QueryTable(ROAD_POOL_INFO).Filter("road_pool_code", roadPoolCode).Delete()
|
||||
if err != nil {
|
||||
logs.Error("delete road pool by code fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func UpdateRoadPool(roadPool RoadPoolInfo) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.Update(&roadPool)
|
||||
|
||||
if err != nil {
|
||||
logs.Error("update road pool fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
106
models/system/bank_card_info.go
Normal file
106
models/system/bank_card_info.go
Normal file
@@ -0,0 +1,106 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/9/6 10:19
|
||||
** @Author : yuebin
|
||||
** @File : bank_card_info
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/9/6 10:19
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
type BankCardInfo struct {
|
||||
Id int
|
||||
Uid string
|
||||
UserName string
|
||||
BankName string
|
||||
BankCode string
|
||||
BankAccountType string
|
||||
AccountName string
|
||||
BankNo string
|
||||
IdentifyCard string
|
||||
CertificateNo string
|
||||
PhoneNo string
|
||||
BankAddress string
|
||||
UpdateTime string
|
||||
CreateTime string
|
||||
}
|
||||
|
||||
const BANK_CARD_INFO = "bank_card_info"
|
||||
|
||||
func InsertBankCardInfo(bankCardInfo BankCardInfo) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.Insert(&bankCardInfo)
|
||||
|
||||
if err != nil {
|
||||
logs.Error("insert bank card info fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func GetBankCardLenByMap(params map[string]string) int {
|
||||
o := orm.NewOrm()
|
||||
qs := o.QueryTable(BANK_CARD_INFO)
|
||||
for k, v := range params {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
cnt, err := qs.Limit(-1).Count()
|
||||
if err != nil {
|
||||
logs.Error("get bank card len by map fail: ", err)
|
||||
}
|
||||
return int(cnt)
|
||||
}
|
||||
|
||||
func GetBankCardByMap(params map[string]string, displayCount, offset int) []BankCardInfo {
|
||||
o := orm.NewOrm()
|
||||
var bankCardList []BankCardInfo
|
||||
qs := o.QueryTable(BANK_CARD_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
_, err := qs.Limit(displayCount, offset).OrderBy("-update_time").All(&bankCardList)
|
||||
if err != nil {
|
||||
logs.Error("get bank card by map fail: ", err)
|
||||
}
|
||||
return bankCardList
|
||||
}
|
||||
|
||||
func GetBankCardByUid(uid string) BankCardInfo {
|
||||
o := orm.NewOrm()
|
||||
var bankCardInfo BankCardInfo
|
||||
_, err := o.QueryTable(bankCardInfo).Filter("uid", uid).Limit(1).All(&bankCardInfo)
|
||||
if err != nil {
|
||||
logs.Error("get bank card by uid fail: ", err)
|
||||
}
|
||||
|
||||
return bankCardInfo
|
||||
}
|
||||
|
||||
func DeleteBankCardByUid(uid string) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.QueryTable(BANK_CARD_INFO).Filter("uid", uid).Delete()
|
||||
|
||||
if err != nil {
|
||||
logs.Error("delete bank card by uid fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func UpdateBankCard(bankCard BankCardInfo) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.Update(&bankCard)
|
||||
if err != nil {
|
||||
logs.Error("update bank card fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
169
models/system/menu_info.go
Normal file
169
models/system/menu_info.go
Normal file
@@ -0,0 +1,169 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/8/21 9:33
|
||||
** @Author : yuebin
|
||||
** @File : menu_info
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/8/21 9:33
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
type MenuInfo struct {
|
||||
Id int
|
||||
MenuOrder int
|
||||
MenuUid string
|
||||
FirstMenu string
|
||||
SecondMenu string
|
||||
Creater string
|
||||
Status string
|
||||
CreateTime string
|
||||
UpdateTime string
|
||||
}
|
||||
|
||||
// 实现排序的三个接口函数
|
||||
type MenuInfoSlice []MenuInfo
|
||||
|
||||
func (m MenuInfoSlice) Len() int {
|
||||
return len(m)
|
||||
}
|
||||
|
||||
func (m MenuInfoSlice) Swap(i, j int) {
|
||||
m[i], m[j] = m[j], m[i]
|
||||
}
|
||||
|
||||
func (m MenuInfoSlice) Less(i, j int) bool {
|
||||
return m[i].MenuOrder < m[j].MenuOrder //从小到大排序
|
||||
}
|
||||
|
||||
const MENUINFO = "menu_info"
|
||||
|
||||
func InsertMenu(menuInfo MenuInfo) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.Insert(&menuInfo)
|
||||
if err != nil {
|
||||
logs.Error("insert new menu info fail:", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func FirstMenuIsExists(firstMenu string) bool {
|
||||
o := orm.NewOrm()
|
||||
exist := o.QueryTable(MENUINFO).Filter("first_menu", firstMenu).Exist()
|
||||
return exist
|
||||
}
|
||||
|
||||
func FirstMenuUidIsExists(firstMenUid string) bool {
|
||||
o := orm.NewOrm()
|
||||
exist := o.QueryTable(MENUINFO).Filter("menu_uid", firstMenUid).Exist()
|
||||
return exist
|
||||
}
|
||||
|
||||
func MenuOrderIsExists(menuOrder int) bool {
|
||||
o := orm.NewOrm()
|
||||
exist := o.QueryTable(MENUINFO).Filter("menu_order", menuOrder).Exist()
|
||||
return exist
|
||||
}
|
||||
|
||||
func GetMenuLen() int {
|
||||
o := orm.NewOrm()
|
||||
cnt, err := o.QueryTable(MENUINFO).Count()
|
||||
if err != nil {
|
||||
logs.Error("get menu info len length fail: ", err)
|
||||
}
|
||||
return int(cnt)
|
||||
}
|
||||
|
||||
func GetMenuInfoByMenuUid(menuUid string) MenuInfo {
|
||||
o := orm.NewOrm()
|
||||
var menuInfo MenuInfo
|
||||
_, err := o.QueryTable(MENUINFO).Filter("menu_uid", menuUid).Limit(1).All(&menuInfo)
|
||||
if err != nil {
|
||||
logs.Error("get menu info by menuUid fail: ", err)
|
||||
}
|
||||
return menuInfo
|
||||
}
|
||||
|
||||
func GetMenuInfosByMenuUids(menuUids []string) []MenuInfo {
|
||||
menuInfoList := make([]MenuInfo, 0)
|
||||
for _, v := range menuUids {
|
||||
m := GetMenuInfoByMenuUid(v)
|
||||
menuInfoList = append(menuInfoList, m)
|
||||
}
|
||||
return menuInfoList
|
||||
}
|
||||
|
||||
func GetMenuInfoByMenuOrder(menuOrder int) MenuInfo {
|
||||
o := orm.NewOrm()
|
||||
var menuInfo MenuInfo
|
||||
_, err := o.QueryTable(MENUINFO).Filter("menu_order", menuOrder).Limit(1).All(&menuInfo)
|
||||
if err != nil {
|
||||
logs.Error("get menu info by menu order fail: ", err)
|
||||
}
|
||||
return menuInfo
|
||||
}
|
||||
|
||||
func GetMenuAll() []MenuInfo {
|
||||
o := orm.NewOrm()
|
||||
var menuInfoList []MenuInfo
|
||||
_, err := o.QueryTable(MENUINFO).OrderBy("-update_time").All(&menuInfoList)
|
||||
if err != nil {
|
||||
logs.Error("get all menu list fail:", err)
|
||||
}
|
||||
return menuInfoList
|
||||
}
|
||||
|
||||
func GetMenuOffsetByMap(params map[string]string, displayCount, offset int) []MenuInfo {
|
||||
o := orm.NewOrm()
|
||||
var menuInfoList []MenuInfo
|
||||
qs := o.QueryTable(MENUINFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
_, err := qs.Limit(displayCount, offset).OrderBy("-update_time").All(&menuInfoList)
|
||||
if err != nil {
|
||||
logs.Error("get menu offset by map fail: ", err)
|
||||
}
|
||||
return menuInfoList
|
||||
}
|
||||
|
||||
func GetMenuLenByMap(params map[string]string) int {
|
||||
o := orm.NewOrm()
|
||||
qs := o.QueryTable(MENUINFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
cnt, err := qs.Count()
|
||||
if err != nil {
|
||||
logs.Error("get menu len by map fail: ", err)
|
||||
}
|
||||
return int(cnt)
|
||||
}
|
||||
|
||||
func UpdateMenuInfo(menuInfo MenuInfo) {
|
||||
o := orm.NewOrm()
|
||||
cnt, err := o.Update(&menuInfo)
|
||||
if err != nil {
|
||||
logs.Error("update menu info fail: ", err)
|
||||
}
|
||||
logs.Info("update menu info success, num: ", cnt)
|
||||
}
|
||||
|
||||
func DeleteMenuInfo(menuUid string) {
|
||||
o := orm.NewOrm()
|
||||
cnt, err := o.QueryTable(MENUINFO).Filter("menu_uid", menuUid).Delete()
|
||||
if err != nil {
|
||||
logs.Error("delete menu info fail: ", err)
|
||||
}
|
||||
logs.Info("delete menu info num: ", cnt)
|
||||
}
|
||||
143
models/system/power_info.go
Normal file
143
models/system/power_info.go
Normal file
@@ -0,0 +1,143 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/8/28 17:59
|
||||
** @Author : yuebin
|
||||
** @File : power_info
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/8/28 17:59
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
type PowerInfo struct {
|
||||
Id int
|
||||
FirstMenuUid string
|
||||
SecondMenuUid string
|
||||
SecondMenu string
|
||||
PowerId string
|
||||
PowerItem string
|
||||
Creater string
|
||||
Status string
|
||||
CreateTime string
|
||||
UpdateTime string
|
||||
}
|
||||
|
||||
const POWER_INFO = "power_info"
|
||||
|
||||
type PowerInfoSlice []PowerInfo
|
||||
|
||||
func (sm PowerInfoSlice) Len() int {
|
||||
return len(sm)
|
||||
}
|
||||
|
||||
func (sm PowerInfoSlice) Swap(i, j int) {
|
||||
sm[i], sm[j] = sm[j], sm[i]
|
||||
}
|
||||
|
||||
func (sm PowerInfoSlice) Less(i, j int) bool {
|
||||
return sm[i].SecondMenuUid < sm[j].SecondMenuUid
|
||||
}
|
||||
|
||||
func PowerUidExists(powerUid string) bool {
|
||||
o := orm.NewOrm()
|
||||
exists := o.QueryTable(POWER_INFO).Filter("power_id", powerUid).Exist()
|
||||
return exists
|
||||
}
|
||||
|
||||
func InsertPowerInfo(powerInfo PowerInfo) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.Insert(&powerInfo)
|
||||
if err != nil {
|
||||
logs.Error("insert power info fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func GetPower() []PowerInfo {
|
||||
o := orm.NewOrm()
|
||||
var powerInfo []PowerInfo
|
||||
_, err := o.QueryTable(POWER_INFO).Limit(-1).All(&powerInfo)
|
||||
|
||||
if err != nil {
|
||||
logs.Error("get power fail: ", err)
|
||||
}
|
||||
return powerInfo
|
||||
}
|
||||
|
||||
func GetPowerById(powerId string) PowerInfo {
|
||||
o := orm.NewOrm()
|
||||
var powerInfo PowerInfo
|
||||
_, err := o.QueryTable(POWER_INFO).Filter("power_id", powerId).Limit(1).All(&powerInfo)
|
||||
if err != nil {
|
||||
logs.Error("get power by id fail: ", err)
|
||||
}
|
||||
return powerInfo
|
||||
}
|
||||
|
||||
func GetPowerByIds(powerIds []string) []PowerInfo {
|
||||
var powerInfoList []PowerInfo
|
||||
for _, v := range powerIds {
|
||||
m := GetPowerById(v)
|
||||
powerInfoList = append(powerInfoList, m)
|
||||
}
|
||||
return powerInfoList
|
||||
}
|
||||
|
||||
func GetPowerItemLenByMap(params map[string]string) int {
|
||||
o := orm.NewOrm()
|
||||
qs := o.QueryTable(POWER_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
cnt, err := qs.Limit(-1).Count()
|
||||
if err != nil {
|
||||
logs.Error("get power item len by map fail: ", err)
|
||||
}
|
||||
return int(cnt)
|
||||
}
|
||||
|
||||
func GetPowerItemByMap(params map[string]string, displpay, offset int) []PowerInfo {
|
||||
o := orm.NewOrm()
|
||||
var powerItemList []PowerInfo
|
||||
qs := o.QueryTable(POWER_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
|
||||
_, err := qs.Limit(displpay, offset).OrderBy("-update_time").All(&powerItemList)
|
||||
if err != nil {
|
||||
logs.Error("get power item by map fail: ", err)
|
||||
}
|
||||
return powerItemList
|
||||
}
|
||||
|
||||
func DeletePowerItemByPowerID(powerID string) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.QueryTable(POWER_INFO).Filter("power_id", powerID).Delete()
|
||||
if err != nil {
|
||||
logs.Error("delete power item by powerID fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func DeletePowerBySecondUid(secondUid string) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.QueryTable(POWER_INFO).Filter("second_menu_uid", secondUid).Delete()
|
||||
|
||||
if err != nil {
|
||||
logs.Error("delete power by second menu uid fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
123
models/system/role_info.go
Normal file
123
models/system/role_info.go
Normal file
@@ -0,0 +1,123 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/8/29 14:43
|
||||
** @Author : yuebin
|
||||
** @File : role_info
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/8/29 14:43
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
type RoleInfo struct {
|
||||
Id int
|
||||
RoleName string
|
||||
RoleUid string
|
||||
ShowFirstMenu string
|
||||
ShowFirstUid string
|
||||
ShowSecondMenu string
|
||||
ShowSecondUid string
|
||||
ShowPower string
|
||||
ShowPowerUid string
|
||||
Creater string
|
||||
Status string
|
||||
Remark string
|
||||
CreateTime string
|
||||
UpdateTime string
|
||||
}
|
||||
|
||||
const ROLE_INFO = "role_info"
|
||||
|
||||
func GetRoleLenByMap(params map[string]string) int {
|
||||
o := orm.NewOrm()
|
||||
qs := o.QueryTable(ROLE_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
cnt, err := qs.Count()
|
||||
if err != nil {
|
||||
logs.Error("get role len by map fail: ", err)
|
||||
}
|
||||
return int(cnt)
|
||||
}
|
||||
|
||||
func GetRole() []RoleInfo {
|
||||
o := orm.NewOrm()
|
||||
var roleInfo []RoleInfo
|
||||
_, err := o.QueryTable(ROLE_INFO).Limit(-1).OrderBy("-update_time").All(&roleInfo)
|
||||
if err != nil {
|
||||
logs.Error("get all role fail: ", err)
|
||||
}
|
||||
return roleInfo
|
||||
}
|
||||
|
||||
func GetRoleByMap(params map[string]string, display, offset int) []RoleInfo {
|
||||
o := orm.NewOrm()
|
||||
var roleInfo []RoleInfo
|
||||
qs := o.QueryTable(ROLE_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
_, err := qs.Limit(display, offset).OrderBy("-update_time").All(&roleInfo)
|
||||
if err != nil {
|
||||
logs.Error("get role by map fail: ", err)
|
||||
}
|
||||
return roleInfo
|
||||
}
|
||||
|
||||
func GetRoleByRoleUid(roleUid string) RoleInfo {
|
||||
o := orm.NewOrm()
|
||||
var roleInfo RoleInfo
|
||||
_, err := o.QueryTable(ROLE_INFO).Filter("role_uid", roleUid).Limit(1).All(&roleInfo)
|
||||
|
||||
if err != nil {
|
||||
logs.Error("get role by role uid fail: ", err)
|
||||
}
|
||||
return roleInfo
|
||||
}
|
||||
|
||||
func RoleNameExists(roleName string) bool {
|
||||
o := orm.NewOrm()
|
||||
exists := o.QueryTable(ROLE_INFO).Filter("role_name", roleName).Exist()
|
||||
return exists
|
||||
}
|
||||
|
||||
func InsertRole(roleInfo RoleInfo) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.Insert(&roleInfo)
|
||||
if err != nil {
|
||||
logs.Error("insert role fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func DeleteRoleByRoleUid(roleUid string) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.QueryTable(ROLE_INFO).Filter("role_uid", roleUid).Delete()
|
||||
if err != nil {
|
||||
logs.Error("delete role by role uid fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func UpdateRoleInfo(roleInfo RoleInfo) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.Update(&roleInfo)
|
||||
|
||||
if err != nil {
|
||||
logs.Error("update role info fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
201
models/system/second_menu_info.go
Normal file
201
models/system/second_menu_info.go
Normal file
@@ -0,0 +1,201 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/8/26 9:33
|
||||
** @Author : yuebin
|
||||
** @File : second_menu_info
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/8/26 9:33
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
const SECOND_MENU_INFO = "second_menu_info"
|
||||
|
||||
type SecondMenuInfo struct {
|
||||
Id int
|
||||
FirstMenuOrder int
|
||||
FirstMenuUid string
|
||||
FirstMenu string
|
||||
MenuOrder int
|
||||
SecondMenuUid string
|
||||
SecondMenu string
|
||||
SecondRouter string
|
||||
Creater string
|
||||
Status string
|
||||
CreateTime string
|
||||
UpdateTime string
|
||||
}
|
||||
|
||||
type SecondMenuSlice []SecondMenuInfo
|
||||
|
||||
func (sm SecondMenuSlice) Len() int {
|
||||
return len(sm)
|
||||
}
|
||||
|
||||
func (sm SecondMenuSlice) Swap(i, j int) {
|
||||
sm[i], sm[j] = sm[j], sm[i]
|
||||
}
|
||||
|
||||
func (sm SecondMenuSlice) Less(i, j int) bool {
|
||||
if sm[i].FirstMenuOrder == sm[j].FirstMenuOrder {
|
||||
return sm[i].MenuOrder < sm[j].MenuOrder
|
||||
}
|
||||
return sm[i].FirstMenuOrder < sm[j].FirstMenuOrder
|
||||
}
|
||||
|
||||
func GetSecondMenuInfoByMenuOrder(menuOrder int, firstMenuUid string) SecondMenuInfo {
|
||||
o := orm.NewOrm()
|
||||
var secondMenuInfo SecondMenuInfo
|
||||
_, err := o.QueryTable(SECOND_MENU_INFO).Filter("first_menu_uid", firstMenuUid).Filter("menu_order", menuOrder).Limit(1).All(&secondMenuInfo)
|
||||
if err != nil {
|
||||
logs.Error("get second menu info by menu order fail: ", err)
|
||||
}
|
||||
return secondMenuInfo
|
||||
}
|
||||
|
||||
func GetSecondMenuLenByFirstMenuUid(firstMenuUid string) int {
|
||||
o := orm.NewOrm()
|
||||
cnt, err := o.QueryTable(SECOND_MENU_INFO).Filter("first_menu_uid", firstMenuUid).Count()
|
||||
if err != nil {
|
||||
logs.Error("get second menu len by first menu uid fail: ", err)
|
||||
}
|
||||
return int(cnt)
|
||||
}
|
||||
|
||||
func GetSecondMenuList() []SecondMenuInfo {
|
||||
o := orm.NewOrm()
|
||||
var secondMenuList []SecondMenuInfo
|
||||
_, err := o.QueryTable(SECOND_MENU_INFO).Limit(-1).OrderBy("-update_time").All(&secondMenuList)
|
||||
if err != nil {
|
||||
logs.Error("get second menu list fail: ", err)
|
||||
}
|
||||
return secondMenuList
|
||||
}
|
||||
|
||||
func GetSecondMenuInfoBySecondMenuUid(secondMenuUid string) SecondMenuInfo {
|
||||
o := orm.NewOrm()
|
||||
var secondMenuInfo SecondMenuInfo
|
||||
_, err := o.QueryTable(SECOND_MENU_INFO).Filter("second_menu_uid", secondMenuUid).Limit(1).All(&secondMenuInfo)
|
||||
if err != nil {
|
||||
logs.Error("get scond menu info by second menu uid fail: ", err)
|
||||
}
|
||||
return secondMenuInfo
|
||||
}
|
||||
|
||||
func GetSecondMenuInfoBySecondMenuUids(secondMenuUids []string) []SecondMenuInfo {
|
||||
secondMenuInfoList := make([]SecondMenuInfo, 0)
|
||||
for _, v := range secondMenuUids {
|
||||
sm := GetSecondMenuInfoBySecondMenuUid(v)
|
||||
secondMenuInfoList = append(secondMenuInfoList, sm)
|
||||
}
|
||||
return secondMenuInfoList
|
||||
}
|
||||
|
||||
func GetSecondMenuListByFirstMenuUid(firstMenuUid string) []SecondMenuInfo {
|
||||
o := orm.NewOrm()
|
||||
var secondMenuList []SecondMenuInfo
|
||||
_, err := o.QueryTable(SECOND_MENU_INFO).Filter("first_menu_uid", firstMenuUid).Limit(-1).OrderBy("-update_time").All(&secondMenuList)
|
||||
if err != nil {
|
||||
logs.Error("get second menu list by first menu uid fail: ", err)
|
||||
}
|
||||
return secondMenuList
|
||||
}
|
||||
|
||||
func GetSecondMenuLenByMap(params map[string]string) int {
|
||||
o := orm.NewOrm()
|
||||
qs := o.QueryTable(SECOND_MENU_INFO)
|
||||
for k, v := range params {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
cnt, err := qs.Limit(-1).Count()
|
||||
if err != nil {
|
||||
logs.Error("get second menu len by map fail: ", err)
|
||||
}
|
||||
return int(cnt)
|
||||
}
|
||||
|
||||
func GetSecondMenuByMap(params map[string]string, displayCount, offset int) []SecondMenuInfo {
|
||||
o := orm.NewOrm()
|
||||
var secondMenuList []SecondMenuInfo
|
||||
qs := o.QueryTable(SECOND_MENU_INFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
_, err := qs.Limit(displayCount, offset).OrderBy("-update_time").All(&secondMenuList)
|
||||
if err != nil {
|
||||
logs.Error("get second menu by map fail: ", err)
|
||||
}
|
||||
return secondMenuList
|
||||
}
|
||||
func InsertSecondMenu(secondMenuInfo SecondMenuInfo) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.Insert(&secondMenuInfo)
|
||||
if err != nil {
|
||||
logs.Error("insert second menu fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func SecondMenuIsExists(seconfMenu string) bool {
|
||||
o := orm.NewOrm()
|
||||
exist := o.QueryTable(SECOND_MENU_INFO).Filter("second_menu", seconfMenu).Exist()
|
||||
return exist
|
||||
}
|
||||
|
||||
func SecondMenuUidIsExists(secondMenuUid string) bool {
|
||||
o := orm.NewOrm()
|
||||
exist := o.QueryTable(SECOND_MENU_INFO).Filter("second_menu_uid", secondMenuUid).Exist()
|
||||
return exist
|
||||
}
|
||||
|
||||
func SecondRouterExists(secondRouter string) bool {
|
||||
o := orm.NewOrm()
|
||||
exist := o.QueryTable(SECOND_MENU_INFO).Filter("second_router", secondRouter).Exist()
|
||||
return exist
|
||||
}
|
||||
|
||||
func DeleteSecondMenuByFirstMenuUid(firstMenuUid string) bool {
|
||||
o := orm.NewOrm()
|
||||
num, err := o.QueryTable(SECOND_MENU_INFO).Filter("first_menu_uid", firstMenuUid).Delete()
|
||||
if err != nil {
|
||||
logs.Error("delete second menu by first menu uid fail: ", err)
|
||||
return false
|
||||
}
|
||||
logs.Info("delete second menu by first menu uid success, num: ", num)
|
||||
return true
|
||||
}
|
||||
|
||||
func DeleteSecondMenuBySecondMenuUid(secondMenuUid string) bool {
|
||||
o := orm.NewOrm()
|
||||
num, err := o.QueryTable(SECOND_MENU_INFO).Filter("second_menu_uid", secondMenuUid).Delete()
|
||||
if err != nil {
|
||||
logs.Error("delete second menu by second menu uid fail: ", err)
|
||||
return false
|
||||
}
|
||||
logs.Info("delete second menu by second menu uid success, num: ", num)
|
||||
return true
|
||||
}
|
||||
|
||||
func UpdateSecondMenuOrderBySecondUid(secondUid string, order int) {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.QueryTable(SECOND_MENU_INFO).Filter("second_menu_uid", secondUid).Update(orm.Params{"menu_order": order})
|
||||
if err != nil {
|
||||
logs.Error("update second menu order by second menu uid fail: ", err)
|
||||
}
|
||||
}
|
||||
|
||||
func UpdateSecondMenu(secondMenu SecondMenuInfo) {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.Update(&secondMenu)
|
||||
if err != nil {
|
||||
logs.Error("update second menu for first order fail: ", err)
|
||||
}
|
||||
}
|
||||
83
models/transaction.go
Normal file
83
models/transaction.go
Normal file
@@ -0,0 +1,83 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/10/19 14:17
|
||||
** @Author : yuebin
|
||||
** @File : transaction
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/10/19 14:17
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package models
|
||||
|
||||
import (
|
||||
"boss/common"
|
||||
"boss/models/accounts"
|
||||
"boss/utils"
|
||||
"context"
|
||||
"errors"
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
func OperatorAccount(accountUid, operatorType string, amount float64) (string, bool) {
|
||||
o := orm.NewOrm()
|
||||
|
||||
msg := ""
|
||||
if err := o.DoTx(func(ctx context.Context, txOrm orm.TxOrmer) error {
|
||||
|
||||
//处理事务
|
||||
accountInfo := new(accounts.AccountInfo)
|
||||
if err := txOrm.Raw("select * from account_info where account_uid = ? for update", accountUid).QueryRow(accountInfo); err != nil || accountInfo.AccountUid == "" {
|
||||
logs.Error("operator account get account info for update fail: ", err)
|
||||
return err
|
||||
}
|
||||
|
||||
accountInfo.UpdateTime = utils.GetBasicDateTime()
|
||||
flag := true
|
||||
|
||||
switch operatorType {
|
||||
case common.PLUS_AMOUNT: //处理加款操作
|
||||
accountInfo.Balance = accountInfo.Balance + amount
|
||||
accountInfo.SettleAmount = accountInfo.SettleAmount + amount
|
||||
case common.SUB_AMOUNT: //处理减款
|
||||
if accountInfo.Balance >= amount && accountInfo.SettleAmount >= amount {
|
||||
accountInfo.Balance = accountInfo.Balance - amount
|
||||
accountInfo.SettleAmount = accountInfo.SettleAmount - amount
|
||||
} else {
|
||||
msg = "账户余额不够减"
|
||||
flag = false
|
||||
}
|
||||
case common.FREEZE_AMOUNT: //处理冻结款
|
||||
accountInfo.FreezeAmount = accountInfo.FreezeAmount + amount
|
||||
case common.UNFREEZE_AMOUNT: //处理解冻款
|
||||
if accountInfo.FreezeAmount >= amount {
|
||||
accountInfo.FreezeAmount = accountInfo.FreezeAmount - amount
|
||||
} else {
|
||||
msg = "账户冻结金额不够解冻款"
|
||||
flag = false
|
||||
}
|
||||
}
|
||||
if !flag {
|
||||
return errors.New("处理失败")
|
||||
}
|
||||
|
||||
if _, err := txOrm.Update(accountInfo); err != nil {
|
||||
logs.Error("operator account update account fail: ", err)
|
||||
return err
|
||||
}
|
||||
//往account_history表中插入一条动账记录
|
||||
accountHistory := accounts.AccountHistoryInfo{AccountUid: accountUid, AccountName: accountInfo.AccountName, Type: operatorType,
|
||||
Amount: amount, Balance: accountInfo.Balance, CreateTime: utils.GetBasicDateTime(), UpdateTime: utils.GetBasicDateTime()}
|
||||
|
||||
if _, err := txOrm.Insert(&accountHistory); err != nil {
|
||||
logs.Error("operator account insert account history fail: ", err)
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}); err != nil {
|
||||
return msg, false
|
||||
}
|
||||
|
||||
return msg, true
|
||||
}
|
||||
146
models/user/user_info.go
Normal file
146
models/user/user_info.go
Normal file
@@ -0,0 +1,146 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/8/9 14:02
|
||||
** @Author : yuebin
|
||||
** @File : user_info
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/8/9 14:02
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package user
|
||||
|
||||
import (
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
const (
|
||||
USERINFO = "user_info"
|
||||
)
|
||||
|
||||
type UserInfo struct {
|
||||
Id int
|
||||
UserId string
|
||||
Passwd string
|
||||
Nick string
|
||||
Remark string
|
||||
Ip string
|
||||
Status string
|
||||
Role string
|
||||
RoleName string
|
||||
CreateTime string
|
||||
UpdateTime string
|
||||
}
|
||||
|
||||
func GetUserInfoByUserID(userID string) UserInfo {
|
||||
o := orm.NewOrm()
|
||||
var userInfo UserInfo
|
||||
err := o.QueryTable(USERINFO).Exclude("status", "delete").Filter("user_id", userID).One(&userInfo)
|
||||
if err != nil {
|
||||
logs.Error("get user info fail: ", err)
|
||||
}
|
||||
return userInfo
|
||||
}
|
||||
|
||||
func GetOperatorByMap(params map[string]string, displayCount, offset int) []UserInfo {
|
||||
o := orm.NewOrm()
|
||||
var userInfo []UserInfo
|
||||
qs := o.QueryTable(USERINFO)
|
||||
for k, v := range params {
|
||||
if len(v) > 0 {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
_, err := qs.Exclude("status", "delete").Limit(displayCount, offset).OrderBy("-update_time").All(&userInfo)
|
||||
|
||||
if err != nil {
|
||||
logs.Error("get operator by map fail: ", err)
|
||||
}
|
||||
return userInfo
|
||||
}
|
||||
|
||||
func GetOperatorLenByMap(params map[string]string) int {
|
||||
o := orm.NewOrm()
|
||||
qs := o.QueryTable(USERINFO)
|
||||
for k, v := range params {
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
cnt, err := qs.Exclude("status", "delete").Count()
|
||||
if err != nil {
|
||||
logs.Error("get operator len by map fail: ", err)
|
||||
}
|
||||
return int(cnt)
|
||||
}
|
||||
|
||||
func UpdateUserInfoIP(userInfo UserInfo) {
|
||||
o := orm.NewOrm()
|
||||
num, err := o.QueryTable(USERINFO).Exclude("status", "delete").Filter("user_id", userInfo.UserId).Update(orm.Params{"ip": userInfo.Ip})
|
||||
if err != nil {
|
||||
logs.Error("%s update user info ip fail: %v", userInfo.UserId, err)
|
||||
} else {
|
||||
logs.Info("%s update user info ip success, num: %d", userInfo.UserId, num)
|
||||
}
|
||||
}
|
||||
|
||||
func UpdateUserInfoPassword(userInfo UserInfo) {
|
||||
o := orm.NewOrm()
|
||||
num, err := o.QueryTable(USERINFO).Exclude("status", "delete").Filter("user_id", userInfo.UserId).Update(orm.Params{"passwd": userInfo.Passwd})
|
||||
if err != nil {
|
||||
logs.Error("%s update user info password fail: %v", userInfo.UserId, err)
|
||||
} else {
|
||||
logs.Info("%s update user info password success, update num: %d", userInfo.UserId, num)
|
||||
}
|
||||
}
|
||||
|
||||
func UpdateUserInfo(userInfo UserInfo) {
|
||||
o := orm.NewOrm()
|
||||
if num, err := o.Update(&userInfo); err != nil {
|
||||
logs.Error("update user info fail: ", err)
|
||||
} else {
|
||||
logs.Info("update user info success, num: ", num)
|
||||
}
|
||||
}
|
||||
|
||||
func UpdateStauts(status, userId string) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.QueryTable(USERINFO).Filter("user_id", userId).Update(orm.Params{"status": status})
|
||||
|
||||
if err != nil {
|
||||
logs.Error("update status fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func UserInfoExistByUserId(userId string) bool {
|
||||
o := orm.NewOrm()
|
||||
exist := o.QueryTable(USERINFO).Exclude("status", "delete").Filter("user_id", userId).Exist()
|
||||
return exist
|
||||
}
|
||||
|
||||
func NickIsExist(nick string) bool {
|
||||
o := orm.NewOrm()
|
||||
exist := o.QueryTable(USERINFO).Exclude("status", "delete").Filter("nick", nick).Exist()
|
||||
return exist
|
||||
}
|
||||
|
||||
func InsertUser(userInfo UserInfo) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.Insert(&userInfo)
|
||||
if err != nil {
|
||||
logs.Error("insert user fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func DeleteUserByUserId(userId string) bool {
|
||||
o := orm.NewOrm()
|
||||
_, err := o.QueryTable(USERINFO).Exclude("status", "delete").Filter("user_id", userId).Update(orm.Params{"status": "delete"})
|
||||
|
||||
if err != nil {
|
||||
logs.Error("delete user by userId fail: ", err)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
110
routers/router.go
Normal file
110
routers/router.go
Normal file
@@ -0,0 +1,110 @@
|
||||
package routers
|
||||
|
||||
import (
|
||||
"boss/controllers"
|
||||
"github.com/beego/beego/v2/server/web"
|
||||
)
|
||||
|
||||
func test() {
|
||||
//web.Router("/accept/notify", &controllers.TestController{}, "*:AcceptNotify")
|
||||
}
|
||||
|
||||
func init() {
|
||||
test()
|
||||
//beego.Router("/", &controllers.PageController{}, "*:Index")
|
||||
//添加过滤函数
|
||||
web.Router("/filter.html", &controllers.FilterController{}, "*:Filter")
|
||||
//登录验证接口
|
||||
web.Router("/login", &controllers.LoginController{}, "*:Login")
|
||||
web.Router("/logout", &controllers.LoginController{}, "*:Logout")
|
||||
web.Router("/getVerifyImg", &controllers.LoginController{}, "*:GetVerifyImg")
|
||||
web.Router("/update/password", &controllers.UpdateController{}, "*:UpdatePassword")
|
||||
web.Router("/freeze/operator", &controllers.UpdateController{}, "*:FreezeOperator")
|
||||
web.Router("/freeze/merchant", &controllers.UpdateController{}, "*:UpdateMerchantStatus")
|
||||
web.Router("/unfreeze/operator", &controllers.UpdateController{}, "*:UnfreezeOperator")
|
||||
web.Router("/unfreeze/merchant", &controllers.UpdateController{}, "*:UpdateMerchantStatus")
|
||||
web.Router("/edit/operator", &controllers.UpdateController{}, "*:EditOperator")
|
||||
web.Router("/add/menu", &controllers.AddController{}, "*:AddMenu")
|
||||
web.Router("/add/secondMenu", &controllers.AddController{}, "*:AddSecondMenu")
|
||||
web.Router("/add/power", &controllers.AddController{}, "*:AddPower")
|
||||
web.Router("/add/role", &controllers.AddController{}, "*:AddRole")
|
||||
web.Router("/add/operator", &controllers.AddController{}, "*:AddOperator")
|
||||
web.Router("/add/bankCard", &controllers.AddController{}, "*:AddBankCard")
|
||||
web.Router("/add/road", &controllers.AddController{}, "*:AddRoad")
|
||||
web.Router("/add/roadPool", &controllers.AddController{}, "*:AddRoadPool")
|
||||
web.Router("/add/merchant", &controllers.AddController{}, "*:AddMerchant")
|
||||
web.Router("/add/agent", &controllers.AddController{}, "*:AddAgent")
|
||||
web.Router("/add/merchant/deploy", &controllers.AddController{}, "*:AddMerchantDeploy")
|
||||
web.Router("/add/merchant/payType", &controllers.AddController{}, "*:AddMerchantPayType")
|
||||
web.Router("/add/payfor", &controllers.AddController{}, "*:AddPayFor")
|
||||
web.Router("/add/self/payfor", &controllers.AddController{}, "*:AddSelfPayFor")
|
||||
web.Router("/get/menu", &controllers.GetController{}, "*:GetMenu")
|
||||
web.Router("/get/secondMenu", &controllers.GetController{}, "*:GetSecondMenu")
|
||||
web.Router("/get/secondMenus", &controllers.GetController{}, "*:GetSecondMenus")
|
||||
web.Router("/get/oneMenu", &controllers.GetController{}, "*:GetOneMenu")
|
||||
web.Router("/get/firstMenu", &controllers.GetController{}, "*:GetFirstMenu")
|
||||
web.Router("/get/powerItem", &controllers.GetController{}, "*:GetPowerItem")
|
||||
web.Router("/get/role", &controllers.GetController{}, "*:GetRole")
|
||||
web.Router("/get/allRole", &controllers.GetController{}, "*:GetAllRole")
|
||||
web.Router("/get/deployTree", &controllers.GetController{}, "*:GetDeployTree")
|
||||
web.Router("/get/operator", &controllers.GetController{}, "*:GetOperator")
|
||||
web.Router("/get/oneOperator", &controllers.GetController{}, "*:GetOneOperator")
|
||||
web.Router("/get/editOperator", &controllers.GetController{}, "*:GetEditOperator")
|
||||
web.Router("/get/bankCard", &controllers.GetController{}, "*:GetBankCard")
|
||||
web.Router("/get/oneBankCard", &controllers.GetController{}, "*:GetOneBankCard")
|
||||
web.Router("/get/road", &controllers.GetController{}, "*:GetRoad")
|
||||
web.Router("/get/oneRoad", &controllers.GetController{}, "*:GetOneRoad")
|
||||
web.Router("/get/all/road", &controllers.GetController{}, "*:GetAllRoad")
|
||||
web.Router("/get/roadPool", &controllers.GetController{}, "*:GetRoadPool")
|
||||
web.Router("/get/all/roll/pool", &controllers.GetController{}, "*:GetAllRollPool")
|
||||
web.Router("/get/merchant", &controllers.GetController{}, "*:GetMerchant")
|
||||
web.Router("/get/all/merchant", &controllers.GetController{}, "*:GetAllMerchant")
|
||||
web.Router("/get/one/merchant", &controllers.GetController{}, "*:GetOneMerchant")
|
||||
web.Router("/get/one/merchant/deploy", &controllers.GetController{}, "*:GetOneMerchantDeploy")
|
||||
web.Router("/get/all/account", &controllers.GetController{}, "*:GetAllAccount")
|
||||
web.Router("/get/account", &controllers.GetController{}, "*:GetAccount")
|
||||
web.Router("/get/one/account", &controllers.GetController{}, "*:GetOneAccount")
|
||||
web.Router("/get/account/history", &controllers.GetController{}, "*:GetAccountHistory")
|
||||
web.Router("/get/agent", &controllers.GetController{}, "*:GetAgent")
|
||||
web.Router("/get/all/agent", &controllers.GetController{}, "*:GetAllAgent")
|
||||
web.Router("/get/product", &controllers.GetController{}, "*:GetProduct")
|
||||
web.Router("/get/order", &controllers.GetController{}, "*:GetOrder")
|
||||
web.Router("/get/one/order", &controllers.GetController{}, "*:GetOneOrder")
|
||||
web.Router("/get/orderProfit", &controllers.GetController{}, "*:GetOrderProfit")
|
||||
web.Router("/get/payfor", &controllers.GetController{}, "*:GetPayFor")
|
||||
web.Router("/get/one/payfor", &controllers.GetController{}, "*:GetOnePayFor")
|
||||
web.Router("/get/balance", &controllers.GetController{}, "*:GetBalance")
|
||||
web.Router("/get/notify/bankOrderId/list", &controllers.GetController{}, "*:GetNotifyBankOrderIdList")
|
||||
web.Router("/get/agent/to/merchant", &controllers.GetController{}, "*:GetAgentToMerchant")
|
||||
web.Router("/get/profit", &controllers.GetController{}, "*:GetProfit")
|
||||
web.Router("/save/power", &controllers.AddController{}, "*:SavePower")
|
||||
web.Router("/save/roadUid", &controllers.AddController{}, "*:SaveRoadUid")
|
||||
web.Router("/up/menu", &controllers.UpdateController{}, "*:UpMenu")
|
||||
web.Router("/down/menu", &controllers.UpdateController{}, "*:DownMenu")
|
||||
web.Router("/up/secondMenu", &controllers.UpdateController{}, "*:UpSecondMenu")
|
||||
web.Router("/down/secondMenu", &controllers.UpdateController{}, "*:DownSecondMenu")
|
||||
web.Router("/update/roadStatus", &controllers.UpdateController{}, "*:UpdateRoadStatus")
|
||||
web.Router("/update/account/status", &controllers.UpdateController{}, "*:UpdateAccountStatus")
|
||||
web.Router("/update/agent/status", &controllers.UpdateController{}, "*:UpdateAgentStatus")
|
||||
web.Router("/update/order/status", &controllers.UpdateController{}, "*:UpdateOrderStatus")
|
||||
web.Router("/account/operator", &controllers.UpdateController{}, "*:OperatorAccount")
|
||||
web.Router("/delete/menu", &controllers.DeleteController{}, "*:DeleteMenu")
|
||||
web.Router("/delete/secondMenu", &controllers.DeleteController{}, "*:DeleteSecondMenu")
|
||||
web.Router("/delete/powerItem", &controllers.DeleteController{}, "*:DeletePowerItem")
|
||||
web.Router("/delete/role", &controllers.DeleteController{}, "*:DeleteRole")
|
||||
web.Router("/delete/operator", &controllers.DeleteController{}, "*:DeleteOperator")
|
||||
web.Router("/delete/bankCardRecord", &controllers.DeleteController{}, "*:DeleteBankCardRecord")
|
||||
web.Router("/delete/road", &controllers.DeleteController{}, "*:DeleteRoad")
|
||||
web.Router("/delete/roadPool", &controllers.DeleteController{}, "*:DeleteRoadPool")
|
||||
web.Router("/delete/merchant", &controllers.DeleteController{}, "*:DeleteMerchant")
|
||||
web.Router("/delete/account", &controllers.DeleteController{}, "*:DeleteAccount")
|
||||
web.Router("/delete/agent", &controllers.DeleteController{}, "*:DeleteAgent")
|
||||
web.Router("/delete/agent/merchant/relation", &controllers.DeleteController{}, "*:DeleteAgentRelation")
|
||||
web.Router("/reset/agent/password", &controllers.UpdateController{}, "*:ResetAgentPassword")
|
||||
web.Router("/supplier/order/query", &controllers.SupplierQuery{}, "*:SupplierOrderQuery")
|
||||
web.Router("/supplier/payfor/query", &controllers.SupplierQuery{}, "*:SupplierPayForQuery")
|
||||
web.Router("/choose/payfor/road", &controllers.UpdateController{}, "*:ChoosePayForRoad")
|
||||
web.Router("/result/payfor", &controllers.UpdateController{}, "*:ResultPayFor")
|
||||
web.Router("/send/notify", &controllers.SendNotify{}, "*:SendNotifyToMerchant")
|
||||
web.Router("/self/send/notify", &controllers.SendNotify{}, "*:SelfSendNotify")
|
||||
}
|
||||
48
routers/router_pages.go
Normal file
48
routers/router_pages.go
Normal file
@@ -0,0 +1,48 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/10/23 15:17
|
||||
** @Author : yuebin
|
||||
** @File : router_pages
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/10/23 15:17
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package routers
|
||||
|
||||
import (
|
||||
"boss/controllers"
|
||||
beego "github.com/beego/beego/v2/server/web"
|
||||
)
|
||||
|
||||
func init() {
|
||||
beego.Router("/", &controllers.PageController{}, "*:Index")
|
||||
beego.Router("/index.html", &controllers.PageController{}, "*:Index")
|
||||
beego.Router("/login.html", &controllers.PageController{}, "*:LoginPage")
|
||||
beego.Router("/account.html", &controllers.PageController{}, "*:AccountPage")
|
||||
beego.Router("/account_history.html", &controllers.PageController{}, "*:AccountHistoryPage")
|
||||
beego.Router("/bank_card.html", &controllers.PageController{}, "*:BankCardPage")
|
||||
beego.Router("/create_agent.html", &controllers.PageController{}, "*:CreateAgentPage")
|
||||
beego.Router("/edit_role.html", &controllers.PageController{}, "*:EditRolePage")
|
||||
beego.Router("/first_menu.html", &controllers.PageController{}, "*:FirstMenuPage")
|
||||
beego.Router("/main.html", &controllers.PageController{}, "*:MainPage")
|
||||
beego.Router("/menu.html", &controllers.PageController{}, "*:MenuPage")
|
||||
beego.Router("/merchant.html", &controllers.PageController{}, "*:MerchantPage")
|
||||
beego.Router("/operator.html", &controllers.PageController{}, "*:OperatorPage")
|
||||
beego.Router("/power.html", &controllers.PageController{}, "*:PowerPage")
|
||||
beego.Router("/road.html", &controllers.PageController{}, "*:RoadPage")
|
||||
beego.Router("/road_pool.html", &controllers.PageController{}, "*:RoadPoolPage")
|
||||
beego.Router("/road_profit.html", &controllers.PageController{}, "*:RoadProfitPage")
|
||||
beego.Router("/role.html", &controllers.PageController{}, "*:RolePage")
|
||||
beego.Router("/second_menu.html", &controllers.PageController{}, "*:SecondMenuPage")
|
||||
beego.Router("/order_info.html", &controllers.PageController{}, "*:OrderInfoPage")
|
||||
beego.Router("/order_profit.html", &controllers.PageController{}, "*:OrderProfitPage")
|
||||
beego.Router("/merchant_payfor.html", &controllers.PageController{}, "*:MerchantPayforPage")
|
||||
beego.Router("/self_payfor.html", &controllers.PageController{}, "*:SelfPayforPage")
|
||||
beego.Router("/payfor_record.html", &controllers.PageController{}, "*:PayforRecordPage")
|
||||
beego.Router("/confirm.html", &controllers.PageController{}, "*:ConfirmPage")
|
||||
beego.Router("/self_notify.html", &controllers.PageController{}, "*:SelfNotifyPage")
|
||||
beego.Router("/self_plus_sub.html", &controllers.PageController{}, "*:SelfPlusSubPage")
|
||||
beego.Router("/agent_to_merchant.html", &controllers.PageController{}, "*:AgentToMerchantPage")
|
||||
beego.Router("/platform_profit.html", &controllers.PageController{}, "*:PlatFormProfitPage")
|
||||
beego.Router("/agent_profit.html", &controllers.PageController{}, "*:AgentProfitPage")
|
||||
}
|
||||
962
service/addService.go
Normal file
962
service/addService.go
Normal file
@@ -0,0 +1,962 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"boss/common"
|
||||
"boss/datas"
|
||||
"boss/models/accounts"
|
||||
"boss/models/agent"
|
||||
"boss/models/merchant"
|
||||
"boss/models/payfor"
|
||||
"boss/models/road"
|
||||
"boss/models/system"
|
||||
"boss/models/user"
|
||||
"boss/utils"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
"github.com/beego/beego/v2/core/validation"
|
||||
"github.com/rs/xid"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type AddService struct {
|
||||
}
|
||||
|
||||
func (c *AddService) AddMenu(oneMenu, userID string) *datas.BaseDataJSON {
|
||||
dataJSON := new(datas.BaseDataJSON)
|
||||
menuInfo := system.MenuInfo{
|
||||
MenuUid: xid.New().String(),
|
||||
FirstMenu: oneMenu,
|
||||
Status: "active",
|
||||
Creater: userID,
|
||||
CreateTime: utils.GetBasicDateTime(),
|
||||
}
|
||||
|
||||
exist := system.FirstMenuIsExists(oneMenu)
|
||||
if !exist {
|
||||
menuInfo.MenuOrder = system.GetMenuLen() + 1
|
||||
flag := system.InsertMenu(menuInfo)
|
||||
if !flag {
|
||||
dataJSON.Code = -1
|
||||
dataJSON.Msg = "添加菜单失败"
|
||||
} else {
|
||||
dataJSON.Code = 200
|
||||
}
|
||||
} else {
|
||||
dataJSON.Code = -1
|
||||
dataJSON.Msg = "一级菜单名已经存在"
|
||||
}
|
||||
return dataJSON
|
||||
}
|
||||
|
||||
func (c *AddService) AddSecondMenu(firstMenuUid, secondRouter, secondMenu, userID string) *datas.KeyDataJSON {
|
||||
dataJSON := new(datas.KeyDataJSON)
|
||||
|
||||
firstMenuInfo := system.GetMenuInfoByMenuUid(firstMenuUid)
|
||||
routerExists := system.SecondRouterExists(secondRouter)
|
||||
secondMenuExists := system.SecondMenuIsExists(secondMenu)
|
||||
|
||||
if firstMenuInfo.MenuUid == "" {
|
||||
dataJSON.Code = -1
|
||||
dataJSON.Key = "pre-menu-error"
|
||||
dataJSON.Msg = "*一级菜单不存在"
|
||||
} else if routerExists {
|
||||
dataJSON.Code = -1
|
||||
dataJSON.Msg = "*该路由已存在"
|
||||
dataJSON.Key = "second-router-error"
|
||||
} else if secondMenuExists {
|
||||
dataJSON.Code = -1
|
||||
dataJSON.Key = "second-menu-error"
|
||||
dataJSON.Msg = "*该菜单名已经存在"
|
||||
} else {
|
||||
sl := system.GetSecondMenuLenByFirstMenuUid(firstMenuUid)
|
||||
secondMenuInfo := system.SecondMenuInfo{
|
||||
MenuOrder: sl + 1,
|
||||
FirstMenuUid: firstMenuInfo.MenuUid,
|
||||
FirstMenu: firstMenuInfo.FirstMenu,
|
||||
SecondMenuUid: xid.New().String(),
|
||||
Status: "active",
|
||||
SecondMenu: secondMenu,
|
||||
SecondRouter: secondRouter,
|
||||
Creater: userID,
|
||||
CreateTime: utils.GetBasicDateTime(),
|
||||
UpdateTime: utils.GetBasicDateTime(),
|
||||
FirstMenuOrder: firstMenuInfo.MenuOrder,
|
||||
}
|
||||
if !system.InsertSecondMenu(secondMenuInfo) {
|
||||
dataJSON.Code = -1
|
||||
dataJSON.Msg = "添加二级菜单失败"
|
||||
} else {
|
||||
dataJSON.Code = 200
|
||||
dataJSON.Msg = "添加二级菜单成功"
|
||||
}
|
||||
}
|
||||
return dataJSON
|
||||
}
|
||||
|
||||
func (c *AddService) AddPower(powerItem, powerID, firstMenuUid, secondMenuUid, userID string) *datas.KeyDataJSON {
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
keyDataJSON.Code = -1
|
||||
|
||||
if powerItem == "" || len(powerItem) == 0 {
|
||||
keyDataJSON.Key = ".power-name-error"
|
||||
keyDataJSON.Msg = "*权限项名称不能为空"
|
||||
return keyDataJSON
|
||||
}
|
||||
if powerID == "" || len(powerID) == 0 {
|
||||
keyDataJSON.Key = ".power-id-error"
|
||||
keyDataJSON.Msg = "*权限项ID不能为空"
|
||||
return keyDataJSON
|
||||
}
|
||||
if system.PowerUidExists(powerID) {
|
||||
keyDataJSON.Key = ".power-id-error"
|
||||
keyDataJSON.Msg = "*权限项ID已经存在"
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
secondMenuInfo := system.GetSecondMenuInfoBySecondMenuUid(secondMenuUid)
|
||||
|
||||
powerInfo := system.PowerInfo{
|
||||
SecondMenuUid: secondMenuUid,
|
||||
SecondMenu: secondMenuInfo.SecondMenu,
|
||||
PowerId: powerID, PowerItem: powerItem,
|
||||
Creater: userID,
|
||||
Status: "active",
|
||||
CreateTime: utils.GetBasicDateTime(),
|
||||
UpdateTime: utils.GetBasicDateTime(),
|
||||
FirstMenuUid: firstMenuUid,
|
||||
}
|
||||
|
||||
keyDataJSON.Code = 200
|
||||
if !system.InsertPowerInfo(powerInfo) {
|
||||
keyDataJSON.Key = ".power-save-success"
|
||||
keyDataJSON.Msg = "添加权限项失败"
|
||||
} else {
|
||||
keyDataJSON.Key = ".power-save-success"
|
||||
keyDataJSON.Msg = "添加权限项成功"
|
||||
}
|
||||
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
func (c *AddService) AddRole(roleName, roleRemark, userID string) *datas.KeyDataJSON {
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
if len(roleName) == 0 {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Key = ".role-name-error"
|
||||
keyDataJSON.Msg = "*角色名称不能为空"
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
if system.RoleNameExists(roleName) {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Key = ".role-name-error"
|
||||
keyDataJSON.Msg = "*角色名称已经存在"
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
roleInfo := system.RoleInfo{
|
||||
RoleName: roleName,
|
||||
RoleUid: xid.New().String(),
|
||||
Creater: userID,
|
||||
Status: "active",
|
||||
Remark: roleRemark,
|
||||
CreateTime: utils.GetBasicDateTime(),
|
||||
UpdateTime: utils.GetBasicDateTime(),
|
||||
}
|
||||
|
||||
if !system.InsertRole(roleInfo) {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Key = ".role-save-success"
|
||||
keyDataJSON.Msg = "添加角色失败"
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
keyDataJSON.Code = 200
|
||||
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
func (c *AddService) SavePower(roleUid string, firstMenuUids, secondMenuUids, powerIds []string) *datas.BaseDataJSON {
|
||||
dataJSON := new(datas.BaseDataJSON)
|
||||
roleInfo := system.GetRoleByRoleUid(roleUid)
|
||||
if len(roleUid) == 0 || len(roleInfo.RoleUid) == 0 {
|
||||
dataJSON.Code = -1
|
||||
return dataJSON
|
||||
}
|
||||
|
||||
roleInfo.UpdateTime = utils.GetBasicDateTime()
|
||||
roleInfo.ShowFirstUid = strings.Join(firstMenuUids, "||")
|
||||
roleInfo.ShowSecondUid = strings.Join(secondMenuUids, "||")
|
||||
roleInfo.ShowPowerUid = strings.Join(powerIds, "||")
|
||||
|
||||
menuInfoList := system.GetMenuInfosByMenuUids(firstMenuUids)
|
||||
showFirstMenu := make([]string, 0)
|
||||
for _, m := range menuInfoList {
|
||||
showFirstMenu = append(showFirstMenu, m.FirstMenu)
|
||||
}
|
||||
roleInfo.ShowFirstMenu = strings.Join(showFirstMenu, "||")
|
||||
|
||||
secondMenuInfoList := system.GetSecondMenuInfoBySecondMenuUids(secondMenuUids)
|
||||
showSecondMenu := make([]string, 0)
|
||||
for _, m := range secondMenuInfoList {
|
||||
showSecondMenu = append(showSecondMenu, m.SecondMenu)
|
||||
}
|
||||
roleInfo.ShowSecondMenu = strings.Join(showSecondMenu, "||")
|
||||
|
||||
powerList := system.GetPowerByIds(powerIds)
|
||||
showPower := make([]string, 0)
|
||||
for _, p := range powerList {
|
||||
showPower = append(showPower, p.PowerItem)
|
||||
}
|
||||
roleInfo.ShowPower = strings.Join(showPower, "||")
|
||||
|
||||
if !system.UpdateRoleInfo(roleInfo) {
|
||||
dataJSON.Code = -1
|
||||
dataJSON.Msg = "更新roleInfo失败"
|
||||
} else {
|
||||
dataJSON.Code = 200
|
||||
dataJSON.Msg = "更新roleInfo成功"
|
||||
}
|
||||
|
||||
return dataJSON
|
||||
}
|
||||
|
||||
func (c *AddService) AddOperator(loginAccount, loginPassword, role, status, remark string) *datas.KeyDataJSON {
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
keyDataJSON.Code = -1
|
||||
if len(loginAccount) == 0 {
|
||||
keyDataJSON.Key = ".operator-name-error"
|
||||
keyDataJSON.Msg = "*登录账号不能为空"
|
||||
} else if len(loginPassword) == 0 {
|
||||
keyDataJSON.Key = ".operator-password-error"
|
||||
keyDataJSON.Msg = "*初始密码不能为空"
|
||||
} else if len(role) == 0 || role == "none" {
|
||||
keyDataJSON.Key = ".operator-role-error"
|
||||
keyDataJSON.Msg = "请选择角色"
|
||||
} else if user.UserInfoExistByUserId(loginAccount) {
|
||||
keyDataJSON.Key = ".operator-name-error"
|
||||
keyDataJSON.Msg = "*账号已经存在"
|
||||
} else {
|
||||
if len(remark) == 0 {
|
||||
remark = loginAccount
|
||||
}
|
||||
roleInfo := system.GetRoleByRoleUid(role)
|
||||
userInfo := user.UserInfo{
|
||||
UserId: loginAccount,
|
||||
Passwd: utils.GetMD5Upper(loginPassword),
|
||||
Nick: "壮壮", Remark: remark,
|
||||
Status: status,
|
||||
Role: role,
|
||||
RoleName: roleInfo.RoleName,
|
||||
CreateTime: utils.GetBasicDateTime(),
|
||||
UpdateTime: utils.GetBasicDateTime(),
|
||||
}
|
||||
if !user.InsertUser(userInfo) {
|
||||
keyDataJSON.Code = 200
|
||||
keyDataJSON.Msg = "添加操作员失败"
|
||||
} else {
|
||||
keyDataJSON.Code = 200
|
||||
keyDataJSON.Msg = "添加操作员成功"
|
||||
}
|
||||
}
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
func (c *AddService) AddBankCard(userName, bankCode, accountName, certificateType,
|
||||
phoneNo, bankName, bankAccountType, bankNo, certificateNo, bankAddress, uid, identifyCard string) *datas.BaseDataJSON {
|
||||
dataJSON := new(datas.BaseDataJSON)
|
||||
|
||||
dataJSON.Code = -1
|
||||
if len(userName) == 0 {
|
||||
dataJSON.Msg = "用户名不能为空"
|
||||
} else if len(bankCode) == 0 {
|
||||
dataJSON.Msg = "银行编码不能为空"
|
||||
} else if len(accountName) == 0 {
|
||||
dataJSON.Msg = "银行开户名不能为空"
|
||||
} else if len(certificateType) == 0 {
|
||||
dataJSON.Msg = "证件种类不能为空"
|
||||
} else if len(phoneNo) == 0 {
|
||||
dataJSON.Msg = "手机号不能为空"
|
||||
} else if len(bankName) == 0 {
|
||||
dataJSON.Msg = "银行名称不能为空"
|
||||
} else if len(bankAccountType) == 0 {
|
||||
dataJSON.Msg = "银行账户类型不能为空"
|
||||
} else if len(bankNo) == 0 {
|
||||
dataJSON.Msg = "银行账号不能为空"
|
||||
} else if len(certificateNo) == 0 {
|
||||
dataJSON.Msg = "身份证号不能为空"
|
||||
} else if len(bankAddress) == 0 {
|
||||
dataJSON.Msg = "银行地址不能为空"
|
||||
} else {
|
||||
|
||||
}
|
||||
if dataJSON.Msg != "" {
|
||||
logs.Error("添加银行卡校验失败")
|
||||
} else {
|
||||
if len(uid) > 0 {
|
||||
bankCardInfo := system.GetBankCardByUid(uid)
|
||||
bankCardInfo = system.BankCardInfo{
|
||||
Id: bankCardInfo.Id,
|
||||
UserName: userName,
|
||||
BankName: bankName,
|
||||
BankCode: bankCode,
|
||||
BankAccountType: bankAccountType,
|
||||
AccountName: accountName,
|
||||
BankNo: bankNo,
|
||||
IdentifyCard: identifyCard,
|
||||
CertificateNo: certificateNo,
|
||||
PhoneNo: phoneNo,
|
||||
BankAddress: bankAddress,
|
||||
UpdateTime: utils.GetBasicDateTime(),
|
||||
CreateTime: bankCardInfo.CreateTime,
|
||||
Uid: bankCardInfo.Uid,
|
||||
}
|
||||
if system.UpdateBankCard(bankCardInfo) {
|
||||
dataJSON.Code = 200
|
||||
}
|
||||
} else {
|
||||
bankCardInfo := system.BankCardInfo{
|
||||
Uid: "3333" + xid.New().String(),
|
||||
UserName: userName,
|
||||
BankName: bankName,
|
||||
BankCode: bankCode,
|
||||
BankAccountType: bankAccountType,
|
||||
AccountName: accountName,
|
||||
BankNo: bankNo,
|
||||
IdentifyCard: identifyCard,
|
||||
CertificateNo: certificateNo,
|
||||
PhoneNo: phoneNo,
|
||||
BankAddress: bankAddress,
|
||||
UpdateTime: utils.GetBasicDateTime(),
|
||||
CreateTime: utils.GetBasicDateTime(),
|
||||
}
|
||||
|
||||
if system.InsertBankCardInfo(bankCardInfo) {
|
||||
dataJSON.Code = 200
|
||||
}
|
||||
}
|
||||
}
|
||||
return dataJSON
|
||||
}
|
||||
|
||||
func (c *AddService) AddRoad(startHour, endHour, roadName, productUid,
|
||||
payType, basicRate, settleFee, roadTotalLimit, roadEverydayLimit,
|
||||
singleMinLimit, singleMaxLimit, roadUid, roadRemark, params string) *datas.BaseDataJSON {
|
||||
|
||||
dataJSON := new(datas.BaseDataJSON)
|
||||
dataJSON.Code = -1
|
||||
|
||||
startHourTmp, err1 := strconv.Atoi(startHour)
|
||||
endHourTmp, err2 := strconv.Atoi(endHour)
|
||||
|
||||
if err1 != nil || err2 != nil {
|
||||
dataJSON.Msg = "开始时间或者结束时间设置有误"
|
||||
return dataJSON
|
||||
}
|
||||
|
||||
valid := validation.Validation{}
|
||||
if v := valid.Required(roadName, "roadName"); !v.Ok {
|
||||
dataJSON.Msg = "通道名称不能为空"
|
||||
} else if v := valid.Required(productUid, "productUid"); !v.Ok {
|
||||
dataJSON.Msg = "产品名称不能为空"
|
||||
} else if v := valid.Required(payType, "payType"); !v.Ok {
|
||||
dataJSON.Msg = "支付类型不能为空"
|
||||
} else if v := valid.Required(basicRate, ""); !v.Ok {
|
||||
dataJSON.Msg = "成本费率不能为空"
|
||||
} else if v := valid.Range(startHourTmp, 0, 23, ""); !v.Ok {
|
||||
dataJSON.Msg = "开始时间设置有误"
|
||||
} else if v := valid.Range(endHourTmp, 0, 23, ""); !v.Ok {
|
||||
dataJSON.Msg = "结束时间设置有误"
|
||||
} else {
|
||||
basicFee, err := strconv.ParseFloat(basicRate, 64)
|
||||
if err != nil {
|
||||
dataJSON.Msg = "成本汇率设置不符合规范"
|
||||
}
|
||||
settleFeeTmp, err := strconv.ParseFloat(settleFee, 64)
|
||||
if err != nil {
|
||||
dataJSON.Msg = "代付手续费设置不符合规范"
|
||||
}
|
||||
totalLimit, err := strconv.ParseFloat(roadTotalLimit, 64)
|
||||
if err != nil {
|
||||
dataJSON.Msg = "通道总额度设置不符合规范"
|
||||
}
|
||||
todayLimit, err := strconv.ParseFloat(roadEverydayLimit, 64)
|
||||
if err != nil {
|
||||
dataJSON.Msg = "每天额度设置不符合规范"
|
||||
}
|
||||
singleMinLimitTmp, err := strconv.ParseFloat(singleMinLimit, 64)
|
||||
if err != nil {
|
||||
dataJSON.Msg = "单笔最小金额设置不符合规范"
|
||||
}
|
||||
singleMaxLimitTmp, err := strconv.ParseFloat(singleMaxLimit, 64)
|
||||
if err != nil {
|
||||
dataJSON.Msg = "单笔最大金额设置不符合规范"
|
||||
}
|
||||
if len(dataJSON.Msg) > 0 {
|
||||
return dataJSON
|
||||
}
|
||||
productName := ""
|
||||
supplierMap := common.GetSupplierMap()
|
||||
for k, v := range supplierMap {
|
||||
if k == productUid {
|
||||
productName = v
|
||||
}
|
||||
}
|
||||
|
||||
if len(roadUid) > 0 {
|
||||
//更新通道
|
||||
roadInfo := road.GetRoadInfoByRoadUid(roadUid)
|
||||
roadInfo.RoadName = roadName
|
||||
roadInfo.Remark = roadRemark
|
||||
roadInfo.ProductUid = productUid
|
||||
roadInfo.ProductName = productName
|
||||
roadInfo.PayType = payType
|
||||
roadInfo.BasicFee = basicFee
|
||||
roadInfo.SettleFee = settleFeeTmp
|
||||
roadInfo.TotalLimit = totalLimit
|
||||
roadInfo.TodayLimit = todayLimit
|
||||
roadInfo.SingleMaxLimit = singleMaxLimitTmp
|
||||
roadInfo.SingleMinLimit = singleMinLimitTmp
|
||||
roadInfo.StarHour = startHourTmp
|
||||
roadInfo.EndHour = endHourTmp
|
||||
roadInfo.Params = params
|
||||
|
||||
if road.UpdateRoadInfo(roadInfo) {
|
||||
dataJSON.Code = 200
|
||||
} else {
|
||||
dataJSON.Msg = "通道更新失败"
|
||||
}
|
||||
} else {
|
||||
//添加新的通道
|
||||
roadUid = "4444" + xid.New().String()
|
||||
roadInfo := road.RoadInfo{
|
||||
RoadName: roadName,
|
||||
RoadUid: roadUid,
|
||||
Remark: roadRemark,
|
||||
ProductUid: productUid,
|
||||
ProductName: productName,
|
||||
PayType: payType,
|
||||
BasicFee: basicFee,
|
||||
SettleFee: settleFeeTmp,
|
||||
TotalLimit: totalLimit,
|
||||
TodayLimit: todayLimit,
|
||||
SingleMinLimit: singleMinLimitTmp,
|
||||
Balance: common.ZERO,
|
||||
SingleMaxLimit: singleMaxLimitTmp,
|
||||
StarHour: startHourTmp,
|
||||
EndHour: endHourTmp,
|
||||
Status: "active",
|
||||
Params: params,
|
||||
UpdateTime: utils.GetBasicDateTime(),
|
||||
CreateTime: utils.GetBasicDateTime(),
|
||||
}
|
||||
|
||||
if road.InsertRoadInfo(roadInfo) {
|
||||
dataJSON.Code = 200
|
||||
} else {
|
||||
dataJSON.Msg = "添加新通道失败"
|
||||
}
|
||||
}
|
||||
}
|
||||
return dataJSON
|
||||
}
|
||||
|
||||
func (c *AddService) AddRoadPool(roadPoolName, roadPoolCode string) *datas.KeyDataJSON {
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
keyDataJSON.Code = -1
|
||||
|
||||
if len(roadPoolName) == 0 {
|
||||
keyDataJSON.Msg = "*通道池名称不能为空"
|
||||
} else if len(roadPoolCode) == 0 {
|
||||
keyDataJSON.Msg = "*通道池编号不能为空"
|
||||
}
|
||||
|
||||
roadPoolInfo := road.RoadPoolInfo{
|
||||
Status: "active",
|
||||
RoadPoolName: roadPoolName,
|
||||
RoadPoolCode: roadPoolCode,
|
||||
UpdateTime: utils.GetBasicDateTime(),
|
||||
CreateTime: utils.GetBasicDateTime(),
|
||||
}
|
||||
|
||||
if road.InsertRoadPool(roadPoolInfo) {
|
||||
keyDataJSON.Code = 200
|
||||
keyDataJSON.Msg = "添加通道池成功"
|
||||
} else {
|
||||
keyDataJSON.Msg = "添加通道池失败"
|
||||
}
|
||||
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
func (c *AddService) SaveRoadUid(roadPoolCode string, roadUids []string) *datas.BaseDataJSON {
|
||||
dataJSON := new(datas.BaseDataJSON)
|
||||
dataJSON.Code = -1
|
||||
roadPoolInfo := road.GetRoadPoolByRoadPoolCode(roadPoolCode)
|
||||
if roadPoolInfo.RoadPoolCode == "" {
|
||||
return dataJSON
|
||||
}
|
||||
var uids []string
|
||||
for _, uid := range roadUids {
|
||||
//去掉空格
|
||||
if len(uid) > 0 && road.RoadInfoExistByRoadUid(uid) {
|
||||
uids = append(uids, uid)
|
||||
}
|
||||
}
|
||||
if len(uids) > 0 {
|
||||
roadUid := strings.Join(uids, "||")
|
||||
roadPoolInfo.RoadUidPool = roadUid
|
||||
}
|
||||
roadPoolInfo.UpdateTime = utils.GetBasicDateTime()
|
||||
if road.UpdateRoadPool(roadPoolInfo) {
|
||||
dataJSON.Code = 200
|
||||
}
|
||||
return dataJSON
|
||||
}
|
||||
|
||||
func (c *AddService) AddAgent(agentName, agentPhone, agentLoginPassword,
|
||||
agentVertifyPassword, status, agentUid, agentRemark string) *datas.KeyDataJSON {
|
||||
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
keyDataJSON.Code = 200
|
||||
|
||||
if agentName == "" {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Key = "#agent-name-error"
|
||||
keyDataJSON.Msg = "代理名不能为空"
|
||||
} else if agent.IsEixstByAgentName(agentName) {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Key = "#agent-name-error"
|
||||
keyDataJSON.Msg = "已存在该代理名称"
|
||||
} else if agentPhone == "" {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Key = "#agent-phone-error"
|
||||
keyDataJSON.Msg = "代理注册手机号不能为空"
|
||||
} else if agent.IsEixstByAgentPhone(agentPhone) {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Key = "#agent-phone-error"
|
||||
keyDataJSON.Msg = "代理商手机号已被注册"
|
||||
} else if agentLoginPassword == "" {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Key = "#agent-login-password-error"
|
||||
keyDataJSON.Msg = "密码不能为空"
|
||||
} else if agentLoginPassword != agentVertifyPassword {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Key = "#agent-vertify-password-error"
|
||||
keyDataJSON.Msg = "二次密码输入不一致"
|
||||
}
|
||||
|
||||
if keyDataJSON.Code == -1 {
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
if status == "" {
|
||||
status = "active"
|
||||
}
|
||||
|
||||
if agentUid == "" {
|
||||
|
||||
agentUid = "9999" + xid.New().String()
|
||||
|
||||
agentInfo := agent.AgentInfo{
|
||||
Status: status,
|
||||
AgentName: agentName,
|
||||
AgentPhone: agentPhone,
|
||||
AgentPassword: utils.GetMD5Upper(agentLoginPassword),
|
||||
AgentUid: agentUid,
|
||||
UpdateTime: utils.GetBasicDateTime(),
|
||||
CreateTime: utils.GetBasicDateTime(),
|
||||
AgentRemark: agentRemark,
|
||||
}
|
||||
|
||||
if !agent.InsertAgentInfo(agentInfo) {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "添加代理商失败"
|
||||
}
|
||||
}
|
||||
|
||||
//创建新的账户
|
||||
account := accounts.GetAccountByUid(agentUid)
|
||||
if account.AccountUid == "" {
|
||||
account.Status = "active"
|
||||
account.AccountUid = agentUid
|
||||
account.AccountName = agentName
|
||||
account.Balance = 0.0
|
||||
account.LoanAmount = 0.0
|
||||
account.FreezeAmount = 0.0
|
||||
account.PayforAmount = 0.0
|
||||
account.SettleAmount = 0.0
|
||||
account.WaitAmount = 0.0
|
||||
account.UpdateTime = utils.GetBasicDateTime()
|
||||
account.CreateTime = utils.GetBasicDateTime()
|
||||
if accounts.InsetAcount(account) {
|
||||
keyDataJSON.Code = 200
|
||||
keyDataJSON.Msg = "插入成功"
|
||||
} else {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "掺入失败"
|
||||
}
|
||||
}
|
||||
return keyDataJSON
|
||||
}
|
||||
func (c *AddService) AddMerchant(merchantName, phone, loginPassword,
|
||||
verifyPassword, merchantStatus, remark string) *datas.KeyDataJSON {
|
||||
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
keyDataJSON.Code = 200
|
||||
if merchantName == "" {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Key = "#merchant-name-error"
|
||||
keyDataJSON.Msg = "商户名称为空"
|
||||
} else if merchant.IsExistByMerchantName(merchantName) {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Key = "#merchant-name-error"
|
||||
keyDataJSON.Msg = "商户名已经存在"
|
||||
} else if phone == "" {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Key = "#merchant-phone-error"
|
||||
keyDataJSON.Msg = "手机号为空"
|
||||
} else if merchant.IsExistByMerchantPhone(phone) {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Key = "#merchant-phone-error"
|
||||
keyDataJSON.Msg = "该手机号已经注册"
|
||||
} else if loginPassword == "" {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Key = "#merchant-login-password-error"
|
||||
keyDataJSON.Msg = "登录密码为空"
|
||||
} else if verifyPassword == "" {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Key = "#merchant-verify-password-error"
|
||||
keyDataJSON.Msg = "密码确认为空"
|
||||
} else if loginPassword != verifyPassword {
|
||||
keyDataJSON.Key = "#merchant-verify-password-error"
|
||||
keyDataJSON.Msg = "两次密码输入不正确"
|
||||
} else if merchantStatus == "" {
|
||||
merchantStatus = "active"
|
||||
}
|
||||
if keyDataJSON.Code == -1 {
|
||||
return keyDataJSON
|
||||
}
|
||||
merchantUid := "8888" + xid.New().String()
|
||||
merchantKey := "kkkk" + xid.New().String() //商户key
|
||||
merchantSecret := "ssss" + xid.New().String() //商户密钥
|
||||
merchantInfo := merchant.MerchantInfo{
|
||||
MerchantName: merchantName,
|
||||
MerchantUid: merchantUid,
|
||||
LoginAccount: phone,
|
||||
MerchantKey: merchantKey,
|
||||
MerchantSecret: merchantSecret,
|
||||
LoginPassword: utils.GetMD5Upper(loginPassword),
|
||||
Status: merchantStatus,
|
||||
Remark: remark,
|
||||
UpdateTime: utils.GetBasicDateTime(),
|
||||
CreateTime: utils.GetBasicDateTime(),
|
||||
}
|
||||
|
||||
if merchant.InsertMerchantInfo(merchantInfo) {
|
||||
keyDataJSON.Code = 200
|
||||
} else {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "插入失败"
|
||||
}
|
||||
//创建新的账户
|
||||
account := accounts.GetAccountByUid(merchantUid)
|
||||
if account.AccountUid == "" {
|
||||
account.Status = "active"
|
||||
account.AccountUid = merchantUid
|
||||
account.AccountName = merchantName
|
||||
account.Balance = 0.0
|
||||
account.LoanAmount = 0.0
|
||||
account.FreezeAmount = 0.0
|
||||
account.PayforAmount = 0.0
|
||||
account.SettleAmount = 0.0
|
||||
account.WaitAmount = 0.0
|
||||
account.UpdateTime = utils.GetBasicDateTime()
|
||||
account.CreateTime = utils.GetBasicDateTime()
|
||||
if accounts.InsetAcount(account) {
|
||||
keyDataJSON.Code = 200
|
||||
keyDataJSON.Msg = "插入成功"
|
||||
} else {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "掺入失败"
|
||||
}
|
||||
}
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
func (c *AddService) AddMerchantDeploy(merchantUid, isAutoSettle, isAutoPayfor, ipWhite, belongAgentName,
|
||||
belongAgentUid, payforRoadChoose, rollPayforRoadChoose, payforFee string) *datas.KeyDataJSON {
|
||||
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
merchantInfo := merchant.GetMerchantByUid(merchantUid)
|
||||
merchantInfo.AutoSettle = isAutoSettle
|
||||
merchantInfo.AutoPayFor = isAutoPayfor
|
||||
merchantInfo.WhiteIps = ipWhite
|
||||
merchantInfo.BelongAgentName = belongAgentName
|
||||
merchantInfo.BelongAgentUid = belongAgentUid
|
||||
|
||||
if payforRoadChoose != "" {
|
||||
roadInfo := road.GetRoadInfoByName(payforRoadChoose)
|
||||
merchantInfo.SinglePayForRoadName = payforRoadChoose
|
||||
merchantInfo.SinglePayForRoadUid = roadInfo.RoadUid
|
||||
}
|
||||
if rollPayforRoadChoose != "" {
|
||||
rollPoolInfo := road.GetRoadPoolByName(rollPayforRoadChoose)
|
||||
merchantInfo.RollPayForRoadName = rollPayforRoadChoose
|
||||
merchantInfo.RollPayForRoadCode = rollPoolInfo.RoadPoolCode
|
||||
}
|
||||
tmp, err := strconv.ParseFloat(payforFee, 64)
|
||||
if err != nil {
|
||||
logs.Error("手续费由字符串转为float64失败")
|
||||
tmp = common.PAYFOR_FEE
|
||||
}
|
||||
merchantInfo.PayforFee = tmp
|
||||
if merchant.UpdateMerchant(merchantInfo) {
|
||||
keyDataJSON.Code = 200
|
||||
} else {
|
||||
keyDataJSON.Code = -1
|
||||
}
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
func (c *AddService) AddMerchantPayType(payType, singleRoad, rollPoolRoad,
|
||||
singleRoadPlatformFee, rollRoadPlatformFee, singleRoadAgentFee, rollRoadAgentFee,
|
||||
loanRate, loanDays, unfreezeTimeHour, merchantNo, isLoan string) *datas.KeyDataJSON {
|
||||
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
if payType == "" || payType == "none" {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "操作失败,请选择支付类型"
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
if singleRoad == "" && rollPoolRoad == "" {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "单通道、轮询通道至少要有一个不为空!"
|
||||
}
|
||||
|
||||
if singleRoad != "" && singleRoadPlatformFee == "" {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "单通道平台利润率不能为0"
|
||||
}
|
||||
|
||||
if rollPoolRoad != "" && rollRoadPlatformFee == "" {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "轮询通道平台利润率不能为0"
|
||||
}
|
||||
|
||||
if keyDataJSON.Code == -1 {
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
//将字符串转变为float64或者int类型
|
||||
a, err := strconv.ParseFloat(singleRoadPlatformFee, 64)
|
||||
if err != nil {
|
||||
a = 0.0
|
||||
}
|
||||
b, err := strconv.ParseFloat(singleRoadAgentFee, 64)
|
||||
if err != nil {
|
||||
b = 0.0
|
||||
}
|
||||
cs, err := strconv.ParseFloat(rollRoadPlatformFee, 64)
|
||||
if err != nil {
|
||||
cs = 0.0
|
||||
}
|
||||
d, err := strconv.ParseFloat(rollRoadAgentFee, 64)
|
||||
if err != nil {
|
||||
d = 0.0
|
||||
}
|
||||
e, err := strconv.ParseFloat(loanRate, 64)
|
||||
if err != nil {
|
||||
e = 0.0
|
||||
}
|
||||
i, err := strconv.Atoi(loanDays)
|
||||
if err != nil {
|
||||
i = 0
|
||||
}
|
||||
j, err := strconv.Atoi(unfreezeTimeHour)
|
||||
if err != nil {
|
||||
j = 0
|
||||
}
|
||||
|
||||
var merchantDeployInfo merchant.MerchantDeployInfo
|
||||
merchantDeployInfo.MerchantUid = merchantNo
|
||||
merchantDeployInfo.PayType = payType
|
||||
merchantDeployInfo.SingleRoadName = singleRoad
|
||||
merchantDeployInfo.SingleRoadPlatformRate = a
|
||||
merchantDeployInfo.SingleRoadAgentRate = b
|
||||
merchantDeployInfo.RollRoadPlatformRate = cs
|
||||
merchantDeployInfo.RollRoadAgentRate = d
|
||||
merchantDeployInfo.IsLoan = isLoan
|
||||
merchantDeployInfo.LoanRate = e
|
||||
merchantDeployInfo.LoanDays = i
|
||||
merchantDeployInfo.UnfreezeHour = j
|
||||
merchantDeployInfo.RollRoadName = rollPoolRoad
|
||||
roadInfo := road.GetRoadInfoByName(singleRoad)
|
||||
rollPoolInfo := road.GetRoadPoolByName(rollPoolRoad)
|
||||
merchantDeployInfo.SingleRoadUid = roadInfo.RoadUid
|
||||
merchantDeployInfo.RollRoadCode = rollPoolInfo.RoadPoolCode
|
||||
|
||||
//如果该用户的改支付类型已经存在,那么进行更新,否则进行添加
|
||||
if merchant.IsExistByUidAndPayType(merchantNo, payType) {
|
||||
if singleRoad == "" && rollPoolRoad == "" {
|
||||
//表示需要删除该支付类型的通道
|
||||
if merchant.DeleteMerchantDeployByUidAndPayType(merchantNo, payType) {
|
||||
keyDataJSON.Code = 200
|
||||
keyDataJSON.Msg = "删除该支付类型通道成功"
|
||||
} else {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "删除该支付类型通道失败"
|
||||
}
|
||||
} else {
|
||||
tmpInfo := merchant.GetMerchantDeployByUidAndPayType(merchantNo, payType)
|
||||
merchantDeployInfo.Id = tmpInfo.Id
|
||||
merchantDeployInfo.Status = tmpInfo.Status
|
||||
merchantDeployInfo.UpdateTime = utils.GetBasicDateTime()
|
||||
merchantDeployInfo.CreateTime = tmpInfo.CreateTime
|
||||
if merchant.UpdateMerchantDeploy(merchantDeployInfo) {
|
||||
keyDataJSON.Code = 200
|
||||
keyDataJSON.Msg = "更新成功"
|
||||
} else {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "更新失败"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if singleRoad == "" && rollPoolRoad == "" {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "参数不能为空"
|
||||
} else {
|
||||
merchantDeployInfo.CreateTime = utils.GetBasicDateTime()
|
||||
merchantDeployInfo.UpdateTime = utils.GetBasicDateTime()
|
||||
merchantDeployInfo.Status = common.ACTIVE
|
||||
if merchant.InsertMerchantDeployInfo(merchantDeployInfo) {
|
||||
keyDataJSON.Code = 200
|
||||
keyDataJSON.Msg = "添加支付类型成功"
|
||||
} else {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "添加支付类型失败"
|
||||
}
|
||||
}
|
||||
}
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
func (c *AddService) AddPayFor(merchantUid, bankUid, payForAmount, bankNo, accountName,
|
||||
phone, merchantName, bankName, bankAddress string) *datas.KeyDataJSON {
|
||||
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
keyDataJSON.Code = -1
|
||||
|
||||
if merchantUid == "" {
|
||||
keyDataJSON.Msg = "请选择需要下发的商户"
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
if bankUid == "" {
|
||||
keyDataJSON.Msg = "请选择发下银行卡"
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
money, err := strconv.ParseFloat(payForAmount, 64)
|
||||
if err != nil {
|
||||
logs.Error("add pay for fail: ", err)
|
||||
keyDataJSON.Msg = "下发金额输入不正确"
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
accountInfo := accounts.GetAccountByUid(merchantUid)
|
||||
if accountInfo.SettleAmount < money+common.PAYFOR_FEE {
|
||||
keyDataJSON.Msg = "用户可用金额不够"
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
bankInfo := system.GetBankCardByUid(bankUid)
|
||||
|
||||
if bankInfo.BankNo != bankNo || bankInfo.AccountName != accountName || bankInfo.PhoneNo != phone {
|
||||
keyDataJSON.Msg = "银行卡信息有误,请连接管理员"
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
payFor := payfor.PayforInfo{
|
||||
PayforUid: "pppp" + xid.New().String(),
|
||||
MerchantUid: merchantUid,
|
||||
MerchantName: merchantName, PhoneNo: phone,
|
||||
MerchantOrderId: xid.New().String(),
|
||||
BankOrderId: "4444" + xid.New().String(),
|
||||
PayforFee: common.PAYFOR_FEE, Type: common.SELF_MERCHANT,
|
||||
PayforAmount: money,
|
||||
PayforTotalAmount: money + common.PAYFOR_FEE,
|
||||
BankCode: bankInfo.BankCode,
|
||||
BankName: bankName, IsSend: common.NO,
|
||||
BankAccountName: bankInfo.AccountName,
|
||||
BankAccountNo: bankInfo.BankNo,
|
||||
BankAccountType: bankInfo.BankAccountType,
|
||||
BankAccountAddress: bankAddress,
|
||||
Status: common.PAYFOR_COMFRIM,
|
||||
RequestTime: utils.GetBasicDateTime(),
|
||||
CreateTime: utils.GetBasicDateTime(),
|
||||
UpdateTime: utils.GetBasicDateTime(),
|
||||
}
|
||||
|
||||
if payfor.InsertPayfor(payFor) {
|
||||
keyDataJSON.Code = 200
|
||||
} else {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "代付下发提交失败"
|
||||
}
|
||||
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
func (c *AddService) AddSelfPayFor(bankUid, payForAmount, accountName,
|
||||
bankNo, phone, bankName, bankAddress string) *datas.KeyDataJSON {
|
||||
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
keyDataJSON.Code = -1
|
||||
|
||||
if bankUid == "" {
|
||||
keyDataJSON.Msg = "银行卡uid不能为空,请联系技术人员"
|
||||
return keyDataJSON
|
||||
}
|
||||
money, err := strconv.ParseFloat(payForAmount, 64)
|
||||
if err != nil {
|
||||
logs.Error("self payfor money fail: ", err)
|
||||
keyDataJSON.Msg = "输入金额有误,请仔细检查"
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
bankInfo := system.GetBankCardByUid(bankUid)
|
||||
|
||||
//需要对前端传入的数据做校验,不能完全相信前端的数据
|
||||
if bankInfo.AccountName != accountName || bankInfo.BankNo != bankNo || bankInfo.PhoneNo != phone {
|
||||
keyDataJSON.Msg = "前端页面数据有篡改,请注意资金安全"
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
selfPayFor := payfor.PayforInfo{
|
||||
PayforUid: "pppp" + xid.New().String(),
|
||||
BankOrderId: "4444" + xid.New().String(),
|
||||
PayforFee: common.ZERO,
|
||||
Type: common.SELF_HELP,
|
||||
PayforAmount: money,
|
||||
PayforTotalAmount: money + common.ZERO,
|
||||
BankCode: bankInfo.BankCode,
|
||||
BankName: bankName,
|
||||
IsSend: common.NO,
|
||||
BankAccountName: bankInfo.AccountName,
|
||||
BankAccountNo: bankInfo.BankNo,
|
||||
BankAccountType: bankInfo.BankAccountType,
|
||||
BankAccountAddress: bankAddress,
|
||||
Status: common.PAYFOR_COMFRIM,
|
||||
CreateTime: utils.GetBasicDateTime(),
|
||||
UpdateTime: utils.GetBasicDateTime(),
|
||||
}
|
||||
|
||||
if payfor.InsertPayfor(selfPayFor) {
|
||||
keyDataJSON.Code = 200
|
||||
} else {
|
||||
keyDataJSON.Msg = "数据处理失败,请重新提交"
|
||||
}
|
||||
return keyDataJSON
|
||||
}
|
||||
293
service/deleteService.go
Normal file
293
service/deleteService.go
Normal file
@@ -0,0 +1,293 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"boss/datas"
|
||||
"boss/models/accounts"
|
||||
"boss/models/agent"
|
||||
"boss/models/merchant"
|
||||
"boss/models/road"
|
||||
"boss/models/system"
|
||||
"boss/models/user"
|
||||
"boss/utils"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
"sort"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type DeleteService struct {
|
||||
}
|
||||
|
||||
func (c *DeleteService) Finish() {
|
||||
remainderFirstMenuUid := make([]string, 0)
|
||||
remainderFirstMenu := make([]string, 0)
|
||||
remainderSecondMenuUid := make([]string, 0)
|
||||
remainderSecondMenu := make([]string, 0)
|
||||
remainderPowerId := make([]string, 0)
|
||||
remainderPower := make([]string, 0)
|
||||
allRoleInfo := system.GetRole()
|
||||
//如果有删除任何的东西,需要重新赋值权限
|
||||
for _, r := range allRoleInfo {
|
||||
for _, showFirstUid := range strings.Split(r.ShowFirstUid, "||") {
|
||||
if system.FirstMenuUidIsExists(showFirstUid) {
|
||||
remainderFirstMenuUid = append(remainderFirstMenuUid, showFirstUid)
|
||||
menuInfo := system.GetMenuInfoByMenuUid(showFirstUid)
|
||||
remainderFirstMenu = append(remainderFirstMenu, menuInfo.FirstMenu)
|
||||
}
|
||||
}
|
||||
for _, showSecondUid := range strings.Split(r.ShowSecondUid, "||") {
|
||||
if system.SecondMenuUidIsExists(showSecondUid) {
|
||||
remainderSecondMenuUid = append(remainderSecondMenuUid, showSecondUid)
|
||||
secondMenuInfo := system.GetSecondMenuInfoBySecondMenuUid(showSecondUid)
|
||||
remainderSecondMenu = append(remainderSecondMenu, secondMenuInfo.SecondMenu)
|
||||
}
|
||||
}
|
||||
for _, showPowerId := range strings.Split(r.ShowPowerUid, "||") {
|
||||
if system.PowerUidExists(showPowerId) {
|
||||
remainderPowerId = append(remainderPowerId, showPowerId)
|
||||
powerInfo := system.GetPowerById(showPowerId)
|
||||
remainderPower = append(remainderPower, powerInfo.PowerItem)
|
||||
}
|
||||
}
|
||||
r.ShowFirstUid = strings.Join(remainderFirstMenuUid, "||")
|
||||
r.ShowFirstMenu = strings.Join(remainderFirstMenu, "||")
|
||||
r.ShowSecondUid = strings.Join(remainderSecondMenuUid, "||")
|
||||
r.ShowSecondMenu = strings.Join(remainderSecondMenu, "||")
|
||||
r.ShowPowerUid = strings.Join(remainderPowerId, "||")
|
||||
r.ShowPower = strings.Join(remainderPower, "||")
|
||||
r.UpdateTime = utils.GetBasicDateTime()
|
||||
system.UpdateRoleInfo(r)
|
||||
}
|
||||
}
|
||||
|
||||
func (c *DeleteService) DeleteMenu(menuUid, userID string) *datas.BaseDataJSON {
|
||||
|
||||
dataJSON := new(datas.BaseDataJSON)
|
||||
menuInfo := system.GetMenuInfoByMenuUid(menuUid)
|
||||
if menuInfo.MenuUid == "" {
|
||||
dataJSON.Msg = "不存在该菜单"
|
||||
dataJSON.Code = -1
|
||||
} else {
|
||||
logs.Info(userID + ",执行了删除一级菜单操作")
|
||||
system.DeleteMenuInfo(menuUid)
|
||||
//删除该一级目下下的所有二级目录
|
||||
system.DeleteSecondMenuByFirstMenuUid(menuUid)
|
||||
SortFirstMenuOrder()
|
||||
dataJSON.Code = 200
|
||||
}
|
||||
|
||||
return dataJSON
|
||||
}
|
||||
func (c *DeleteService) DeleteSecondMenu(secondMenuUid string) *datas.BaseDataJSON {
|
||||
|
||||
secondMenuInfo := system.GetSecondMenuInfoBySecondMenuUid(secondMenuUid)
|
||||
dataJSON := new(datas.BaseDataJSON)
|
||||
if secondMenuUid == "" || secondMenuInfo.SecondMenuUid == "" {
|
||||
dataJSON.Code = -1
|
||||
dataJSON.Msg = "该二级菜单不存在"
|
||||
} else {
|
||||
if system.DeleteSecondMenuBySecondMenuUid(secondMenuUid) {
|
||||
dataJSON.Code = 200
|
||||
ml := system.GetSecondMenuLenByFirstMenuUid(secondMenuInfo.FirstMenuUid)
|
||||
//删除该二级页面下的所有权限项
|
||||
system.DeletePowerBySecondUid(secondMenuUid)
|
||||
if ml == 0 {
|
||||
//如果该二级类目已经被全部删除,那么对应的一级类目也应当删除
|
||||
system.DeleteMenuInfo(secondMenuInfo.FirstMenuUid)
|
||||
SortFirstMenuOrder()
|
||||
} else {
|
||||
secondMenuInfoList := system.GetSecondMenuListByFirstMenuUid(secondMenuInfo.FirstMenuUid)
|
||||
sort.Sort(system.SecondMenuSlice(secondMenuInfoList))
|
||||
for i := 0; i < len(secondMenuInfoList); i++ {
|
||||
m := secondMenuInfoList[i]
|
||||
system.UpdateSecondMenuOrderBySecondUid(m.SecondMenuUid, i+1)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
dataJSON.Code = -1
|
||||
dataJSON.Msg = "删除失败"
|
||||
}
|
||||
}
|
||||
return dataJSON
|
||||
}
|
||||
|
||||
func (c *DeleteService) DeletePowerItem(powerID string) *datas.BaseDataJSON {
|
||||
system.DeletePowerItemByPowerID(powerID)
|
||||
dataJSON := new(datas.BaseDataJSON)
|
||||
dataJSON.Code = 200
|
||||
return dataJSON
|
||||
}
|
||||
|
||||
func (c *DeleteService) DeleteRole(roleUid string) *datas.BaseDataJSON {
|
||||
dataJSON := new(datas.BaseDataJSON)
|
||||
|
||||
if system.DeleteRoleByRoleUid(roleUid) {
|
||||
dataJSON.Code = 200
|
||||
} else {
|
||||
dataJSON.Code = -1
|
||||
}
|
||||
return dataJSON
|
||||
}
|
||||
|
||||
func (c *DeleteService) DeleteOperator(userId string) *datas.BaseDataJSON {
|
||||
|
||||
dataJSON := new(datas.BaseDataJSON)
|
||||
|
||||
if user.DeleteUserByUserId(userId) {
|
||||
dataJSON.Code = 200
|
||||
} else {
|
||||
dataJSON.Code = -1
|
||||
}
|
||||
return dataJSON
|
||||
}
|
||||
|
||||
func (c *DeleteService) DeleteBankCardRecord(uid string) *datas.BankCardDataJSON {
|
||||
|
||||
dataJSON := new(datas.BankCardDataJSON)
|
||||
dataJSON.Code = -1
|
||||
|
||||
if system.DeleteBankCardByUid(uid) {
|
||||
dataJSON.Code = 200
|
||||
}
|
||||
return dataJSON
|
||||
}
|
||||
|
||||
func (c *DeleteService) DeleteRoad(roadUid string) *datas.BaseDataJSON {
|
||||
|
||||
dataJSON := new(datas.BaseDataJSON)
|
||||
dataJSON.Code = -1
|
||||
|
||||
if road.DeleteRoadByRoadUid(roadUid) {
|
||||
dataJSON.Code = 200
|
||||
}
|
||||
params := make(map[string]string)
|
||||
roadPoolInfoList := road.GetAllRollPool(params)
|
||||
//将轮询池中的对应的通道删除
|
||||
for _, roadPoolInfo := range roadPoolInfoList {
|
||||
var uids []string
|
||||
roadInfoList := strings.Split(roadPoolInfo.RoadUidPool, "||")
|
||||
for _, uid := range roadInfoList {
|
||||
if uid != roadUid {
|
||||
uids = append(uids, uid)
|
||||
}
|
||||
}
|
||||
roadPoolInfo.RoadUidPool = strings.Join(uids, "||")
|
||||
roadPoolInfo.UpdateTime = utils.GetBasicDateTime()
|
||||
road.UpdateRoadPool(roadPoolInfo)
|
||||
}
|
||||
return dataJSON
|
||||
}
|
||||
|
||||
func (c *DeleteService) DeleteRoadPool(roadPoolCode string) *datas.BaseDataJSON {
|
||||
dataJSON := new(datas.BaseDataJSON)
|
||||
dataJSON.Code = -1
|
||||
|
||||
if road.DeleteRoadPoolByCode(roadPoolCode) {
|
||||
dataJSON.Code = 200
|
||||
} else {
|
||||
dataJSON.Msg = "删除通道池失败"
|
||||
}
|
||||
return dataJSON
|
||||
}
|
||||
|
||||
func (c *DeleteService) DeleteMerchant(merchantUid string) *datas.KeyDataJSON {
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
if merchantUid == "" {
|
||||
keyDataJSON.Code = -1
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
if merchant.DeleteMerchantByUid(merchantUid) {
|
||||
keyDataJSON.Code = 200
|
||||
} else {
|
||||
keyDataJSON.Code = -1
|
||||
}
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
func (c *DeleteService) DeleteAccount(accountUid string) *datas.BaseDataJSON {
|
||||
dataJSON := new(datas.BaseDataJSON)
|
||||
merchant.IsExistByMerchantUid(accountUid)
|
||||
if merchant.IsExistByMerchantUid(accountUid) || agent.IsExistByAgentUid(accountUid) {
|
||||
dataJSON.Code = -1
|
||||
dataJSON.Msg = "用户还存在,不能删除"
|
||||
} else {
|
||||
if accounts.DeleteAccountByUid(accountUid) {
|
||||
dataJSON.Code = 200
|
||||
dataJSON.Msg = "删除账户成功"
|
||||
} else {
|
||||
dataJSON.Code = -1
|
||||
dataJSON.Msg = "删除账户失败"
|
||||
}
|
||||
}
|
||||
return dataJSON
|
||||
}
|
||||
|
||||
func (c *DeleteService) DeleteAgent(agentUid string) *datas.KeyDataJSON {
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
//判断是否有商户还绑定了该代理
|
||||
if merchant.IsExistMerchantByAgentUid(agentUid) {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "已有商户绑定改代理,不能删除"
|
||||
} else {
|
||||
if agent.DeleteAgentByAgentUid(agentUid) {
|
||||
keyDataJSON.Code = 200
|
||||
} else {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "删除失败"
|
||||
}
|
||||
}
|
||||
return keyDataJSON
|
||||
}
|
||||
func (c *DeleteService) DeleteAgentRelation(merchantUid string) *datas.KeyDataJSON {
|
||||
|
||||
merchantInfo := merchant.GetMerchantByUid(merchantUid)
|
||||
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
keyDataJSON.Code = 200
|
||||
|
||||
if merchantInfo.MerchantUid == "" {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "不存在这样的商户"
|
||||
} else {
|
||||
merchantInfo.UpdateTime = utils.GetBasicDateTime()
|
||||
merchantInfo.BelongAgentUid = ""
|
||||
merchantInfo.BelongAgentName = ""
|
||||
|
||||
if !merchant.UpdateMerchant(merchantInfo) {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "更新商户失败"
|
||||
}
|
||||
}
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
/*
|
||||
* 对一级菜单重新进行排序
|
||||
*/
|
||||
func SortFirstMenuOrder() {
|
||||
menuInfoList := system.GetMenuAll()
|
||||
sort.Sort(system.MenuInfoSlice(menuInfoList))
|
||||
|
||||
for i := 0; i < len(menuInfoList); i++ {
|
||||
m := menuInfoList[i]
|
||||
m.UpdateTime = utils.GetBasicDateTime()
|
||||
m.MenuOrder = i + 1
|
||||
system.UpdateMenuInfo(m)
|
||||
//对应的二级菜单也应该重新分配顺序号
|
||||
SortSecondMenuOrder(m)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 对二级菜单分配顺序号
|
||||
*/
|
||||
func SortSecondMenuOrder(firstMenuInfo system.MenuInfo) {
|
||||
secondMenuInfoList := system.GetSecondMenuListByFirstMenuUid(firstMenuInfo.MenuUid)
|
||||
for _, sm := range secondMenuInfoList {
|
||||
sm.FirstMenuOrder = firstMenuInfo.MenuOrder
|
||||
sm.UpdateTime = utils.GetBasicDateTime()
|
||||
system.UpdateSecondMenu(sm)
|
||||
//删除下下一级的所有权限项
|
||||
system.DeletePowerBySecondUid(sm.SecondMenuUid)
|
||||
}
|
||||
}
|
||||
97
service/queryService.go
Normal file
97
service/queryService.go
Normal file
@@ -0,0 +1,97 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"boss/datas"
|
||||
"boss/models/order"
|
||||
"boss/models/payfor"
|
||||
"fmt"
|
||||
"github.com/beego/beego/v2/client/httplib"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
"github.com/beego/beego/v2/server/web"
|
||||
)
|
||||
|
||||
type QueryService struct {
|
||||
}
|
||||
|
||||
func OrderQuery(bankOrderId string) string {
|
||||
|
||||
orderInfo := order.GetOrderByBankOrderId(bankOrderId)
|
||||
|
||||
if orderInfo.BankOrderId == "" || len(orderInfo.BankOrderId) == 0 {
|
||||
logs.Error("不存在这样的订单,订单查询结束")
|
||||
return "不存在这样的订单"
|
||||
}
|
||||
|
||||
if orderInfo.Status != "" && orderInfo.Status != "wait" {
|
||||
logs.Error(fmt.Sprintf("该订单=%s,已经处理完毕,", bankOrderId))
|
||||
return "该订单已经处理完毕"
|
||||
}
|
||||
|
||||
// 向gateway发送请求,请求上游的支付结果
|
||||
gUrl, _ := web.AppConfig.String("gateway::host")
|
||||
gUrl = gUrl + "gateway/supplier/order/query" + "?" + "bankOrderId=" + bankOrderId
|
||||
res, err := httplib.Get(gUrl).String()
|
||||
if err != nil {
|
||||
logs.Error("获取gateway上游订单查询结果失败:" + err.Error())
|
||||
}
|
||||
|
||||
if res == "success" {
|
||||
return res
|
||||
}
|
||||
|
||||
return "fail"
|
||||
|
||||
}
|
||||
|
||||
func (c *QueryService) SupplierOrderQuery(bankOrderId string) *datas.KeyDataJSON {
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
keyDataJSON.Code = 200
|
||||
exist := order.BankOrderIdIsEixst(bankOrderId)
|
||||
if !exist {
|
||||
keyDataJSON.Msg = "该订单不存在"
|
||||
keyDataJSON.Code = -1
|
||||
}
|
||||
|
||||
msg := OrderQuery(bankOrderId)
|
||||
|
||||
keyDataJSON.Msg = msg
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
func (c *QueryService) SupplierPayForQuery(bankOrderId string) *datas.KeyDataJSON {
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
keyDataJSON.Code = 200
|
||||
|
||||
if bankOrderId == "" {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "不存在这样的代付订单"
|
||||
} else {
|
||||
payFor := payfor.GetPayForByBankOrderId(bankOrderId)
|
||||
if payFor.RoadUid == "" {
|
||||
keyDataJSON.Msg = "该代付订单没有对应的通道uid"
|
||||
} else {
|
||||
result := querySupplierPayForResult(bankOrderId)
|
||||
if result {
|
||||
keyDataJSON.Msg = "处理成功!"
|
||||
} else {
|
||||
keyDataJSON.Msg = "处理失败!"
|
||||
}
|
||||
}
|
||||
}
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
func querySupplierPayForResult(bankOrderId string) bool {
|
||||
payforUrl, _ := web.AppConfig.String("gateway::host")
|
||||
u := payforUrl + "gateway/supplier/payfor/query" + "?bankOrderId=" + bankOrderId
|
||||
s, err := httplib.Get(u).String()
|
||||
if err != nil {
|
||||
logs.Error("处理代付查询请求gateway失败:", err)
|
||||
return false
|
||||
}
|
||||
if s == "fail" {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
}
|
||||
61
service/sendNotifyMerchantService.go
Normal file
61
service/sendNotifyMerchantService.go
Normal file
@@ -0,0 +1,61 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"boss/common"
|
||||
"boss/datas"
|
||||
"boss/models/notify"
|
||||
"boss/models/order"
|
||||
"fmt"
|
||||
"github.com/beego/beego/v2/client/httplib"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type SendNotifyMerchantService struct {
|
||||
}
|
||||
|
||||
func (c *SendNotifyMerchantService) SendNotifyToMerchant(bankOrderId string) *datas.KeyDataJSON {
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
keyDataJSON.Code = -1
|
||||
orderInfo := order.GetOrderByBankOrderId(bankOrderId)
|
||||
if orderInfo.Status == common.WAIT {
|
||||
keyDataJSON.Msg = "该订单不是成功状态,不能回调"
|
||||
} else {
|
||||
notifyInfo := notify.GetNotifyInfoByBankOrderId(bankOrderId)
|
||||
notifyUrl := notifyInfo.Url
|
||||
logs.Info(fmt.Sprintf("boss管理后台手动触发订单回调,url=%s", notifyUrl))
|
||||
req := httplib.Post(notifyUrl)
|
||||
response, err := req.String()
|
||||
if err != nil {
|
||||
logs.Error("回调发送失败,fail:", err)
|
||||
keyDataJSON.Msg = fmt.Sprintf("该订单回调发送失败,订单回调,fail:%s", err)
|
||||
} else {
|
||||
if !strings.Contains(strings.ToLower(response), "success") {
|
||||
keyDataJSON.Msg = fmt.Sprintf("该订单回调发送成功,但是未返回success字段, 商户返回内容=%s",
|
||||
response)
|
||||
} else {
|
||||
keyDataJSON.Code = 200
|
||||
keyDataJSON.Msg = fmt.Sprintf("该订单回调发送成功")
|
||||
}
|
||||
}
|
||||
}
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
func (c *SendNotifyMerchantService) SelfSendNotify(bankOrderId string) *datas.KeyDataJSON {
|
||||
notifyInfo := notify.GetNotifyInfoByBankOrderId(bankOrderId)
|
||||
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
keyDataJSON.Code = 200
|
||||
|
||||
req := httplib.Post(notifyInfo.Url)
|
||||
|
||||
response, err := req.String()
|
||||
if err != nil {
|
||||
keyDataJSON.Msg = fmt.Sprintf("订单 bankOrderId=%s,已经发送回调出错:%s", bankOrderId, err)
|
||||
} else {
|
||||
keyDataJSON.Msg = fmt.Sprintf("订单 bankOrderId=%s,已经发送回调,商户返回内容:%s",
|
||||
bankOrderId, response)
|
||||
}
|
||||
return keyDataJSON
|
||||
}
|
||||
436
service/updateService.go
Normal file
436
service/updateService.go
Normal file
@@ -0,0 +1,436 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"boss/common"
|
||||
"boss/datas"
|
||||
"boss/models"
|
||||
"boss/models/accounts"
|
||||
"boss/models/agent"
|
||||
"boss/models/merchant"
|
||||
"boss/models/payfor"
|
||||
"boss/models/road"
|
||||
"boss/models/system"
|
||||
"boss/models/user"
|
||||
"boss/utils"
|
||||
"fmt"
|
||||
"github.com/beego/beego/v2/client/httplib"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
"github.com/beego/beego/v2/server/web"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
type UpdateService struct {
|
||||
}
|
||||
|
||||
func (c *UpdateService) UpMenu(menuUid string) *datas.BaseDataJSON {
|
||||
menuInfo := system.GetMenuInfoByMenuUid(menuUid)
|
||||
dataJSON := new(datas.BaseDataJSON)
|
||||
if menuInfo.MenuUid == "" {
|
||||
dataJSON.Msg = "更改排列顺序失败"
|
||||
dataJSON.Code = -1
|
||||
} else {
|
||||
exist := system.MenuOrderIsExists(menuInfo.MenuOrder - 1)
|
||||
if !exist {
|
||||
dataJSON.Msg = "已经是最高的顺序"
|
||||
dataJSON.Code = -1
|
||||
} else {
|
||||
//如果他前面有菜单,那么交换他们的menuOrder
|
||||
preMenuInfo := system.GetMenuInfoByMenuOrder(menuInfo.MenuOrder - 1)
|
||||
menuInfo.MenuOrder = menuInfo.MenuOrder - 1
|
||||
preMenuInfo.MenuOrder = preMenuInfo.MenuOrder + 1
|
||||
preMenuInfo.UpdateTime = utils.GetBasicDateTime()
|
||||
menuInfo.UpdateTime = utils.GetBasicDateTime()
|
||||
//更新菜单表
|
||||
system.UpdateMenuInfo(preMenuInfo)
|
||||
system.UpdateMenuInfo(menuInfo)
|
||||
//更新二级菜单表
|
||||
SortSecondMenuOrder(preMenuInfo)
|
||||
SortSecondMenuOrder(menuInfo)
|
||||
dataJSON.Code = 200
|
||||
}
|
||||
}
|
||||
return dataJSON
|
||||
}
|
||||
|
||||
func (c *UpdateService) DownMenu(menuUid string) *datas.BaseDataJSON {
|
||||
menuInfo := system.GetMenuInfoByMenuUid(menuUid)
|
||||
dataJSON := new(datas.BaseDataJSON)
|
||||
if menuInfo.MenuUid == "" {
|
||||
dataJSON.Msg = "更改排列顺序失败"
|
||||
dataJSON.Code = -1
|
||||
} else {
|
||||
exist := system.MenuOrderIsExists(menuInfo.MenuOrder + 1)
|
||||
if !exist {
|
||||
dataJSON.Msg = "已经是最高的顺序"
|
||||
dataJSON.Code = -1
|
||||
} else {
|
||||
//如果他前面有菜单,那么交换他们的menuOrder
|
||||
lastMenuInfo := system.GetMenuInfoByMenuOrder(menuInfo.MenuOrder + 1)
|
||||
menuInfo.MenuOrder = menuInfo.MenuOrder + 1
|
||||
lastMenuInfo.MenuOrder = lastMenuInfo.MenuOrder - 1
|
||||
lastMenuInfo.UpdateTime = utils.GetBasicDateTime()
|
||||
menuInfo.UpdateTime = utils.GetBasicDateTime()
|
||||
//更新菜单表
|
||||
system.UpdateMenuInfo(lastMenuInfo)
|
||||
system.UpdateMenuInfo(menuInfo)
|
||||
//更新二级菜单表
|
||||
SortSecondMenuOrder(lastMenuInfo)
|
||||
SortSecondMenuOrder(menuInfo)
|
||||
dataJSON.Code = 200
|
||||
}
|
||||
}
|
||||
return dataJSON
|
||||
}
|
||||
|
||||
func (c *UpdateService) UpSecondMenu(secondMenuUid string) *datas.BaseDataJSON {
|
||||
secondMenuInfo := system.GetSecondMenuInfoBySecondMenuUid(secondMenuUid)
|
||||
dataJSON := new(datas.BaseDataJSON)
|
||||
if secondMenuInfo.MenuOrder == 1 {
|
||||
dataJSON.Code = -1
|
||||
} else {
|
||||
preSecondMenuInfo := system.GetSecondMenuInfoByMenuOrder(secondMenuInfo.MenuOrder-1, secondMenuInfo.FirstMenuUid)
|
||||
preSecondMenuInfo.MenuOrder = preSecondMenuInfo.MenuOrder + 1
|
||||
preSecondMenuInfo.UpdateTime = utils.GetBasicDateTime()
|
||||
secondMenuInfo.MenuOrder = secondMenuInfo.MenuOrder - 1
|
||||
secondMenuInfo.UpdateTime = utils.GetBasicDateTime()
|
||||
//更新二级菜单项
|
||||
system.UpdateSecondMenu(preSecondMenuInfo)
|
||||
system.UpdateSecondMenu(secondMenuInfo)
|
||||
|
||||
dataJSON.Code = 200
|
||||
}
|
||||
return dataJSON
|
||||
}
|
||||
|
||||
func (c *UpdateService) DownSecondMenu(secondMenuUid string) *datas.BaseDataJSON {
|
||||
secondMenuInfo := system.GetSecondMenuInfoBySecondMenuUid(secondMenuUid)
|
||||
|
||||
dataJSON := new(datas.BaseDataJSON)
|
||||
|
||||
l := system.GetSecondMenuLenByFirstMenuUid(secondMenuInfo.FirstMenuUid)
|
||||
if l == secondMenuInfo.MenuOrder {
|
||||
dataJSON.Code = -1
|
||||
} else {
|
||||
lastSecondMenu := system.GetSecondMenuInfoByMenuOrder(secondMenuInfo.MenuOrder+1, secondMenuInfo.FirstMenuUid)
|
||||
lastSecondMenu.MenuOrder = lastSecondMenu.MenuOrder - 1
|
||||
lastSecondMenu.UpdateTime = utils.GetBasicDateTime()
|
||||
|
||||
secondMenuInfo.MenuOrder = secondMenuInfo.MenuOrder + 1
|
||||
secondMenuInfo.UpdateTime = utils.GetBasicDateTime()
|
||||
|
||||
system.UpdateSecondMenu(lastSecondMenu)
|
||||
system.UpdateSecondMenu(secondMenuInfo)
|
||||
|
||||
dataJSON.Code = 200
|
||||
}
|
||||
return dataJSON
|
||||
}
|
||||
|
||||
func (c *UpdateService) FreezeOperator(userId string) *datas.BaseDataJSON {
|
||||
dataJSON := new(datas.BaseDataJSON)
|
||||
|
||||
if user.UpdateStauts(common.UNACTIVE, userId) {
|
||||
dataJSON.Code = 200
|
||||
dataJSON.Msg = "冻结成功"
|
||||
} else {
|
||||
dataJSON.Code = -1
|
||||
dataJSON.Msg = "冻结失败"
|
||||
}
|
||||
return dataJSON
|
||||
}
|
||||
|
||||
func (c *UpdateService) UnfreezeOperator(userId string) *datas.BaseDataJSON {
|
||||
dataJSON := new(datas.BaseDataJSON)
|
||||
|
||||
if user.UpdateStauts("active", userId) {
|
||||
dataJSON.Code = 200
|
||||
dataJSON.Msg = "解冻成功"
|
||||
} else {
|
||||
dataJSON.Code = -1
|
||||
dataJSON.Msg = "解冻失败"
|
||||
}
|
||||
|
||||
return dataJSON
|
||||
}
|
||||
|
||||
func (c *UpdateService) EditOperator(password, changePassword, role, userId, nick, remark string) *datas.KeyDataJSON {
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
|
||||
if (len(password) > 0 || len(changePassword) > 0) && password != changePassword {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Key = ".veritfy-operator-password-error"
|
||||
keyDataJSON.Msg = "*2次密码输入不一致"
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
if role == "" || role == "none" {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Key = ".change-operator-role-error"
|
||||
keyDataJSON.Msg = "*角色不能为空"
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
userInfo := user.GetUserInfoByUserID(userId)
|
||||
if userInfo.UserId == "" {
|
||||
keyDataJSON.Code = -2
|
||||
keyDataJSON.Msg = "该用户不存在"
|
||||
} else {
|
||||
userInfo.UpdateTime = utils.GetBasicDateTime()
|
||||
userInfo.Remark = remark
|
||||
roleInfo := system.GetRoleByRoleUid(role)
|
||||
userInfo.RoleName = roleInfo.RoleName
|
||||
userInfo.Role = role
|
||||
if len(password) > 0 && len(changePassword) > 0 && password == changePassword {
|
||||
userInfo.Passwd = utils.GetMD5Upper(password)
|
||||
}
|
||||
userInfo.Nick = nick
|
||||
user.UpdateUserInfo(userInfo)
|
||||
keyDataJSON.Code = 200
|
||||
}
|
||||
return keyDataJSON
|
||||
|
||||
}
|
||||
|
||||
func (c *UpdateService) UpdateRoadStatus(roadUid string) *datas.BaseDataJSON {
|
||||
dataJSON := new(datas.BaseDataJSON)
|
||||
dataJSON.Code = 200
|
||||
|
||||
roadInfo := road.GetRoadInfoByRoadUid(roadUid)
|
||||
if roadInfo.Status == "active" {
|
||||
roadInfo.Status = common.UNACTIVE
|
||||
} else {
|
||||
roadInfo.Status = "active"
|
||||
}
|
||||
if road.UpdateRoadInfo(roadInfo) {
|
||||
dataJSON.Code = 200
|
||||
} else {
|
||||
dataJSON.Code = -1
|
||||
}
|
||||
return dataJSON
|
||||
}
|
||||
|
||||
func (c *UpdateService) UpdateMerchantStatus(merchantUid string) *datas.KeyDataJSON {
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
if merchantUid == "" {
|
||||
keyDataJSON.Code = -1
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
merchantInfo := merchant.GetMerchantByUid(merchantUid)
|
||||
|
||||
if merchantInfo.MerchantUid == "" {
|
||||
keyDataJSON.Code = -1
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
if merchantInfo.Status == common.ACTIVE {
|
||||
merchantInfo.Status = common.UNACTIVE
|
||||
} else {
|
||||
merchantInfo.Status = common.ACTIVE
|
||||
}
|
||||
merchantInfo.UpdateTime = utils.GetBasicDateTime()
|
||||
|
||||
if merchant.UpdateMerchant(merchantInfo) {
|
||||
keyDataJSON.Code = 200
|
||||
} else {
|
||||
keyDataJSON.Code = -1
|
||||
}
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
func (c *UpdateService) UpdateAccountStatus(accountUid string) *datas.BaseDataJSON {
|
||||
accountInfo := accounts.GetAccountByUid(accountUid)
|
||||
if accountInfo.Status == common.ACTIVE {
|
||||
accountInfo.Status = common.UNACTIVE
|
||||
} else {
|
||||
accountInfo.Status = common.ACTIVE
|
||||
}
|
||||
accountInfo.UpdateTime = utils.GetBasicDateTime()
|
||||
|
||||
dataJSON := new(datas.BaseDataJSON)
|
||||
if accounts.UpdateAccount(accountInfo) {
|
||||
dataJSON.Code = 200
|
||||
dataJSON.Msg = "更新账户状态成功"
|
||||
} else {
|
||||
dataJSON.Code = -1
|
||||
dataJSON.Msg = "更新账户状态失败"
|
||||
}
|
||||
return dataJSON
|
||||
}
|
||||
|
||||
func (c *UpdateService) OperatorAccount(accountOperator, amount, accountUid string) *datas.AccountDataJSON {
|
||||
accountDataJSON := new(datas.AccountDataJSON)
|
||||
switch accountOperator {
|
||||
case common.PLUS_AMOUNT:
|
||||
case common.SUB_AMOUNT:
|
||||
case common.FREEZE_AMOUNT:
|
||||
case common.UNFREEZE_AMOUNT:
|
||||
default:
|
||||
accountDataJSON.Code = -1
|
||||
}
|
||||
a, err := strconv.ParseFloat(amount, 64)
|
||||
if err != nil {
|
||||
accountDataJSON.Msg = "处理金额输入有误"
|
||||
}
|
||||
if accountDataJSON.Code == -1 {
|
||||
return accountDataJSON
|
||||
}
|
||||
msg, flag := models.OperatorAccount(accountUid, accountOperator, a)
|
||||
if flag {
|
||||
accountDataJSON.Code = 200
|
||||
accountDataJSON.Msg = "处理成功,请检查对应账户信息"
|
||||
accountDataJSON.AccountList = append(accountDataJSON.AccountList, accounts.GetAccountByUid(accountUid))
|
||||
} else {
|
||||
accountDataJSON.Code = -1
|
||||
accountDataJSON.Msg = msg
|
||||
}
|
||||
return accountDataJSON
|
||||
}
|
||||
|
||||
func (c *UpdateService) UpdateAgentStatus(agentUid string) *datas.KeyDataJSON {
|
||||
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
agentInfo := agent.GetAgentInfoByAgentUid(agentUid)
|
||||
if agentInfo.AgentUid == "" {
|
||||
keyDataJSON.Code = -1
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
if agentInfo.Status == common.ACTIVE {
|
||||
agentInfo.Status = common.UNACTIVE
|
||||
} else {
|
||||
agentInfo.Status = "active"
|
||||
}
|
||||
agentInfo.UpdateTime = utils.GetBasicDateTime()
|
||||
if agent.UpdateAgentInfo(agentInfo) {
|
||||
keyDataJSON.Code = 200
|
||||
} else {
|
||||
keyDataJSON.Code = -1
|
||||
}
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
func (c *UpdateService) ResetAgentPassword(agentUid, newPassword, newVertifyPassword string) *datas.KeyDataJSON {
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
keyDataJSON.Code = 200
|
||||
if agentUid == "" {
|
||||
keyDataJSON.Code = -2
|
||||
} else if newPassword == "" {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Key = "#agent-login-password-error-reset"
|
||||
keyDataJSON.Msg = " *新密码不能为空"
|
||||
} else if newVertifyPassword != newPassword {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Key = "#agent-vertify-password-error-reset"
|
||||
keyDataJSON.Msg = " *两次密码输入不一致"
|
||||
}
|
||||
|
||||
if keyDataJSON.Code != 200 {
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
agentInfo := agent.GetAgentInfoByAgentUid(agentUid)
|
||||
agentInfo.UpdateTime = utils.GetBasicDateTime()
|
||||
agentInfo.AgentPassword = utils.GetMD5Upper(newPassword)
|
||||
if !agent.UpdateAgentInfo(agentInfo) {
|
||||
keyDataJSON.Code = -1
|
||||
}
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
func (c *UpdateService) ChoosePayForRoad(confirmType, roadName, bankOrderId, remark string) *datas.KeyDataJSON {
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
keyDataJSON.Code = 200
|
||||
|
||||
if confirmType == common.PAYFOR_ROAD && roadName == "" {
|
||||
keyDataJSON.Msg = "打款通道不能为空"
|
||||
keyDataJSON.Code = -1
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
payForInfo := payfor.GetPayForByBankOrderId(bankOrderId)
|
||||
roadInfo := road.GetRoadInfoByName(roadName)
|
||||
|
||||
if payForInfo.Status != common.PAYFOR_COMFRIM {
|
||||
keyDataJSON.Msg = "结算状态错误,请刷新后确认"
|
||||
} else {
|
||||
payForInfo.UpdateTime = utils.GetBasicDateTime()
|
||||
payForInfo.GiveType = confirmType
|
||||
if confirmType == common.PAYFOR_REFUSE {
|
||||
//拒绝打款
|
||||
payForInfo.Status = common.PAYFOR_FAIL
|
||||
} else {
|
||||
payForInfo.Status = common.PAYFOR_SOLVING
|
||||
}
|
||||
payForInfo.RoadUid = roadInfo.RoadUid
|
||||
payForInfo.RoadName = roadInfo.RoadName
|
||||
payForInfo.Remark = remark
|
||||
|
||||
if !payfor.ForUpdatePayFor(payForInfo) {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "更新代付记录失败"
|
||||
}
|
||||
}
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
func (c *UpdateService) UpdateOrderStatus(bankOrderId, solveType, operator string) *datas.KeyDataJSON {
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
updateOrderUrl, _ := web.AppConfig.String("gateway::host")
|
||||
res, err := httplib.Get(updateOrderUrl + "gateway/update/order" + "?bankOrderId=" + bankOrderId + "&solveType=" + solveType + "&operator=" + operator).String()
|
||||
if err != nil {
|
||||
logs.Error("update order status err = ", err)
|
||||
keyDataJSON.Code = -1
|
||||
} else {
|
||||
keyDataJSON.Code = 200
|
||||
keyDataJSON.Msg = res
|
||||
}
|
||||
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
func (c *UpdateService) ResultPayFor(resultType, bankOrderId string) *datas.KeyDataJSON {
|
||||
keyDataJSON := new(datas.KeyDataJSON)
|
||||
keyDataJSON.Code = 200
|
||||
|
||||
if resultType == "" || bankOrderId == "" {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "提交的数据有误"
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
payFor := payfor.GetPayForByBankOrderId(bankOrderId)
|
||||
|
||||
if payFor.Type == common.SELF_HELP {
|
||||
//如果是管理员在后台提现,不用做任何的商户减款,只需要更新代付订单状态
|
||||
payFor.UpdateTime = utils.GetBasicDateTime()
|
||||
payFor.Status = resultType
|
||||
|
||||
if !payfor.ForUpdatePayFor(payFor) {
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "系统处理失败"
|
||||
}
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
if payFor.Status == common.PAYFOR_FAIL || payFor.Status == common.PAYFOR_SUCCESS {
|
||||
logs.Error(fmt.Sprintf("该代付订单=%s,状态有误....", bankOrderId))
|
||||
keyDataJSON.Code = -1
|
||||
keyDataJSON.Msg = "订单状态有误,请刷新重新判断"
|
||||
return keyDataJSON
|
||||
}
|
||||
|
||||
u, _ := web.AppConfig.String("gateway::host")
|
||||
u = u + "/solve/payfor/result?" + "resultType=" + resultType + "&bankOrderId=" + bankOrderId
|
||||
s, err := httplib.Get(u).String()
|
||||
if err != nil || s == common.FAIL {
|
||||
logs.Error("手动处理代付结果请求gateway系统失败:", err)
|
||||
keyDataJSON.Msg = "处理失败"
|
||||
keyDataJSON.Code = -1
|
||||
} else {
|
||||
keyDataJSON.Code = 200
|
||||
keyDataJSON.Msg = "处理成功"
|
||||
}
|
||||
|
||||
return keyDataJSON
|
||||
}
|
||||
181
static/css/basic.css
Normal file
181
static/css/basic.css
Normal file
@@ -0,0 +1,181 @@
|
||||
/* 公共样式文件 */
|
||||
input {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.margin-top-20 {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.color-red {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
ul li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
li {
|
||||
list-style: none;
|
||||
}
|
||||
.row {
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
}
|
||||
.modal-body .input-group {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.basic-addon3 {
|
||||
font-size: 14px;
|
||||
color: green;
|
||||
}
|
||||
|
||||
.select-content {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.select-content select {
|
||||
width: 210px;
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
text-align-last: center;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.first-input-group .first-menu-error {
|
||||
display: inline-block;
|
||||
margin-left: 20px;
|
||||
padding-top: 6px;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.table-caption {
|
||||
color: red;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.add-menu {
|
||||
text-decoration: center;
|
||||
}
|
||||
.add-menu strong {
|
||||
/* padding-bottom: 4px; */
|
||||
color: skyblue;
|
||||
}
|
||||
|
||||
.add-button {
|
||||
margin-left: 10px;
|
||||
margin-bottom: 10px;
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
.main {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.menu-table table {
|
||||
width: 100%;
|
||||
}
|
||||
.menu-table table tbody tr:hover{
|
||||
background-color: #e7e7e7;
|
||||
}
|
||||
.menu-table table tr th {
|
||||
text-align: center;
|
||||
border: 1px solid #e7e7e7;
|
||||
}
|
||||
.menu-table table tbody tr th {
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
}
|
||||
.menu-table table button {
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.cut_page {
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
height: 30px;
|
||||
width:100%;
|
||||
background-color: skyblue;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.cut_page li {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.cut_page .pre_page:hover {
|
||||
color: blue;
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
.cut_page .next_page:hover {
|
||||
color: blue;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.cut_page li input {
|
||||
background-color: #e7e7e7;
|
||||
height: 25px;
|
||||
width: 40px;
|
||||
padding: 5px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.cut_page li button {
|
||||
height: 25px;
|
||||
width: 50px;
|
||||
margin: 0 auto;
|
||||
/* text-align: center; */
|
||||
line-height: 10px;
|
||||
outline: none;
|
||||
}
|
||||
.cut_page li select {
|
||||
background-color: #e7e7e7;
|
||||
}
|
||||
|
||||
.search {
|
||||
margin-bottom: 10px;
|
||||
padding: 10px;
|
||||
border-bottom: 1px solid #e7e7e7;
|
||||
}
|
||||
|
||||
.search div {
|
||||
display: inline;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.search div{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.star {
|
||||
color: red;
|
||||
font-size: 16px;
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
padding: 3px;
|
||||
margin: 0 0 10px 0;
|
||||
border: 1px dotted #b8d0d6;
|
||||
}
|
||||
|
||||
fieldset legend {
|
||||
border: 0;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
253
static/css/login.css
Normal file
253
static/css/login.css
Normal file
@@ -0,0 +1,253 @@
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, canvas, details, embed,
|
||||
figure, figcaption, footer, header, hgroup,
|
||||
menu, nav, output, ruby, section, summary,
|
||||
time, mark, audio, video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
article, aside, details, figcaption, figure,
|
||||
footer, header, hgroup, menu, nav, section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
body {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
ol, ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
blockquote, q {
|
||||
quotes: none;
|
||||
}
|
||||
|
||||
blockquote:before, blockquote:after,
|
||||
q:before, q:after {
|
||||
content: '';
|
||||
content: none;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
/*
|
||||
* Copyright (c) 2012-2013 Thibaut Courouble
|
||||
* http://www.cssflow.com
|
||||
*
|
||||
* Licensed under the MIT License:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*/
|
||||
body {
|
||||
font: 13px/20px 'Lucida Grande', Tahoma, Verdana, sans-serif;
|
||||
color: #404040;
|
||||
background: #f3f3f3;
|
||||
}
|
||||
|
||||
.container {
|
||||
margin: 100px auto;
|
||||
width: 640px;
|
||||
}
|
||||
|
||||
.login {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
padding: 20px 20px 20px;
|
||||
width: 310px;
|
||||
background: white;
|
||||
border-radius: 3px;
|
||||
-webkit-box-shadow: 0 0 200px rgba(255, 255, 255, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 20px 20px 200px rgba(255, 255, 255, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.login:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -8px;
|
||||
right: -8px;
|
||||
bottom: -8px;
|
||||
left: -8px;
|
||||
z-index: -1;
|
||||
background: rgba(0, 0, 0, 0.08);
|
||||
border-radius: 4px;
|
||||
}
|
||||
.login h1 {
|
||||
margin: -20px -20px 21px;
|
||||
line-height: 40px;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
color: #555;
|
||||
text-align: center;
|
||||
text-shadow: 0 1px white;
|
||||
background: #f3f3f3;
|
||||
border-bottom: 1px solid #cfcfcf;
|
||||
border-radius: 3px 3px 0 0;
|
||||
/*background-image: -webkit-linear-gradient(top, whiteffd, #eef2f5);*/
|
||||
/*background-image: -moz-linear-gradient(top, whiteffd, #eef2f5);*/
|
||||
/*background-image: -o-linear-gradient(top, whiteffd, #eef2f5);*/
|
||||
/*background-image: linear-gradient(to bottom, whiteffd, #eef2f5);*/
|
||||
-webkit-box-shadow: 0 1px whitesmoke;
|
||||
box-shadow: 0 1px whitesmoke;
|
||||
}
|
||||
.login p {
|
||||
margin: 20px 0 0;
|
||||
}
|
||||
.login p:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
.login input[type=text], .login input[type=password] {
|
||||
width: 278px;
|
||||
}
|
||||
|
||||
.login .verifyText {
|
||||
overflow: hidden;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.login .verify .verifyText {
|
||||
overflow: hidden;
|
||||
width: 160px;
|
||||
}
|
||||
|
||||
.login .verify .verifyImg {
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
width: 110px;
|
||||
height: 36px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.login .verify .verifyImg:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.left_f {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.right_f {
|
||||
float: right;
|
||||
}
|
||||
|
||||
|
||||
.login .remember_me {
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
line-height: 31px;
|
||||
}
|
||||
.login div.remember_me label {
|
||||
font-size: 12px;
|
||||
color: #777;
|
||||
cursor: pointer;
|
||||
}
|
||||
.login div.remember_me input {
|
||||
position: relative;
|
||||
bottom: 1px;
|
||||
margin-right: 4px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.login div.submit {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.login-help {
|
||||
margin: 20px 0;
|
||||
font-size: 11px;
|
||||
color: white;
|
||||
text-align: center;
|
||||
text-shadow: 0 1px #2a85a1;
|
||||
font-size:12px;
|
||||
}
|
||||
.login-help a {
|
||||
color: #cce7fa;
|
||||
text-decoration: none;
|
||||
}
|
||||
.login-help a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
:-moz-placeholder {
|
||||
color: #c9c9c9 !important;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
::-webkit-input-placeholder {
|
||||
color: #ccc;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
input {
|
||||
font-family: 'Lucida Grande', Tahoma, Verdana, sans-serif;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
input[type=text], input[type=password] {
|
||||
margin: 5px;
|
||||
padding: 0 10px;
|
||||
width: 200px;
|
||||
height: 34px;
|
||||
color: #404040;
|
||||
background: white;
|
||||
border: 1px solid;
|
||||
border-color: #c4c4c4 #d1d1d1 #d4d4d4;
|
||||
border-radius: 2px;
|
||||
outline: 5px solid #eff4f7;
|
||||
-moz-outline-radius: 3px;
|
||||
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
|
||||
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
input[type=text]:focus, input[type=password]:focus {
|
||||
border-color: #7dc9e2;
|
||||
outline-color: #dceefc;
|
||||
outline-offset: 0;
|
||||
}
|
||||
|
||||
input[type=submit] {
|
||||
margin-top: 20px;
|
||||
padding: 0 18px;
|
||||
height: 29px;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
color: #527881;
|
||||
text-shadow: 0 1px #e3f1f1;
|
||||
background: #cde5ef;
|
||||
border: 1px solid;
|
||||
border-color: #b4ccce #b3c0c8 #9eb9c2;
|
||||
border-radius: 16px;
|
||||
outline: 0;
|
||||
cursor: pointer;
|
||||
-webkit-box-sizing: content-box;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
background-image: -webkit-linear-gradient(top, #edf5f8, #cde5ef);
|
||||
background-image: -moz-linear-gradient(top, #edf5f8, #cde5ef);
|
||||
background-image: -o-linear-gradient(top, #edf5f8, #cde5ef);
|
||||
background-image: linear-gradient(to bottom, #edf5f8, #cde5ef);
|
||||
-webkit-box-shadow: inset 0 1px white, 0 1px 2px rgba(0, 0, 0, 0.15);
|
||||
box-shadow: inset 0 1px white, 0 1px 2px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
input[type=submit]:active {
|
||||
background: #cde5ef;
|
||||
border-color: #9eb9c2 #b3c0c8 #b4ccce;
|
||||
-webkit-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.lt-ie9 input[type=text], .lt-ie9 input[type=password] {
|
||||
line-height: 34px;
|
||||
}
|
||||
116
static/js/basic.js
Normal file
116
static/js/basic.js
Normal file
@@ -0,0 +1,116 @@
|
||||
|
||||
/**************************************时间格式化处理************************************/
|
||||
function dateFtt(fmt,date)
|
||||
{ //author: meizz
|
||||
var o = {
|
||||
"M+" : date.getMonth()+1, //月份
|
||||
"d+" : date.getDate(), //日
|
||||
"h+" : date.getHours(), //小时
|
||||
"m+" : date.getMinutes(), //分
|
||||
"s+" : date.getSeconds(), //秒
|
||||
"q+" : Math.floor((date.getMonth()+3)/3), //季度
|
||||
"S" : date.getMilliseconds() //毫秒
|
||||
};
|
||||
if(/(y+)/.test(fmt))
|
||||
fmt=fmt.replace(RegExp.$1, (date.getFullYear()+"").substr(4 - RegExp.$1.length));
|
||||
for(var k in o)
|
||||
if(new RegExp("("+ k +")").test(fmt))
|
||||
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
|
||||
return fmt;
|
||||
}
|
||||
|
||||
$(".start-time").on('changeDate', function() {
|
||||
let startTime = $(".start-time").val();
|
||||
if (startTime) {
|
||||
$(".end-time").datetimepicker("setStartDate", startTime);
|
||||
} else {
|
||||
$(".end-time").datetimepicker("setStartDate", new Date(-8639968443048000));
|
||||
}
|
||||
});
|
||||
$("#end-time").on('changeDate', function() {
|
||||
let endTime = $(".end-time").val();
|
||||
if (endTime) {
|
||||
$(".start-time").datetimepicker('setEndDate', endTime);
|
||||
} else {
|
||||
$(".start-time").datetimepicker();
|
||||
}
|
||||
});
|
||||
$(".start-time, .end-time").datetimepicker({
|
||||
language: 'zh-CN',
|
||||
format: "yyyy-mm-dd hh:ii:00",
|
||||
clearBtn: true,
|
||||
todayBtn: true,
|
||||
autoclose: true,
|
||||
startView:2,
|
||||
minView: 0,//最低视图 小时视图
|
||||
maxView: 4, //最高视图 十年视图
|
||||
showSecond : true,
|
||||
showHours : true,
|
||||
minuteStep:1
|
||||
});
|
||||
|
||||
//将上游通道供应商写入
|
||||
function setSupplier() {
|
||||
$.ajax({
|
||||
url: "/get/product",
|
||||
success: function (res) {
|
||||
if (res.Code == 404) {window.parent.location = "/login.html";}
|
||||
else if (res.Code == -1) {alert("没有获取到上游供应商数据");}
|
||||
else {
|
||||
let str = '<option value="' + "" + '">' + "请选择" + '</option>';
|
||||
for (let key in res.ProductMap) {
|
||||
let v = res.ProductMap[key];
|
||||
str = str + '<option value="' + key + '">' + v + '</option>'
|
||||
}
|
||||
$("#search-order-supplier-name").html(str);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
alert("系统异常,请稍后再试");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//动态获取商户名
|
||||
function setMerchant() {
|
||||
$.ajax({
|
||||
url:"/get/all/merchant",
|
||||
data:{},
|
||||
success: function (res) {
|
||||
let str = '<option value="' + "" + '">' + "请选择" + '</option>';
|
||||
for (let i = 0; i < res.MerchantList.length; i ++) {
|
||||
let merchant = res.MerchantList[i];
|
||||
str = str + '<option value="' + merchant.MerchantUid + '">' + merchant.MerchantName + '</option>';
|
||||
}
|
||||
|
||||
$("#select-merchant-name").html(str);
|
||||
},
|
||||
error: function () {
|
||||
alert("系统异常,请稍后再试");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//动态获取代理名称
|
||||
function setAgent() {
|
||||
$.ajax({
|
||||
url: "/get/all/agent",
|
||||
data:{},
|
||||
success:function (res) {
|
||||
if (res.Code == 404) {
|
||||
window.parent.location = "/login.html";
|
||||
} else {
|
||||
let str = '<option value="' + "" + '">' + "请选择" + '</option>';
|
||||
for (let i = 0; i < res.AgentList.length; i ++) {
|
||||
let agent = res.AgentList[i];
|
||||
str = str + '<option value="' + agent.AgentUid + '">' + agent.AgentName + '</option>';
|
||||
}
|
||||
$("#select-agent-name").html(str);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
alert("系统异常,请稍后再试")
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
27
static/js/filter.js
Normal file
27
static/js/filter.js
Normal file
@@ -0,0 +1,27 @@
|
||||
function filter() {
|
||||
$.ajax({
|
||||
url: "/filter.html",
|
||||
success: function(res) {
|
||||
let loc = window.location.toString();
|
||||
if (res.Code == 404) {
|
||||
if (loc.indexOf("login.html") !== -1) {
|
||||
return;
|
||||
}
|
||||
window.parent.location = "/login.html";
|
||||
} else if (res.Code == 200) {
|
||||
|
||||
if (loc.indexOf("login.html") !== -1) {
|
||||
window.parent.location = "/index.html";
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
error: function(e) {
|
||||
window.parent.location = "/login.html";
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$().ready(function() {
|
||||
filter();
|
||||
});
|
||||
4
static/js/jquery.min.js
vendored
Normal file
4
static/js/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
12
static/js/jquery.ui.min.js
vendored
Normal file
12
static/js/jquery.ui.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
static/js/reload.min.js
vendored
Normal file
1
static/js/reload.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
function b(a){var c=new WebSocket(a);c.onclose=function(){setTimeout(function(){b(a)},2E3)};c.onmessage=function(){location.reload()}}try{if(window.WebSocket)try{b("ws://localhost:12450/reload")}catch(a){console.error(a)}else console.log("Your browser does not support WebSockets.")}catch(a){console.error("Exception during connecting to Reload:",a)};
|
||||
30
static/lib/bootstrap-datetimepicker/.jshintrc
Normal file
30
static/lib/bootstrap-datetimepicker/.jshintrc
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"bitwise": false,
|
||||
"camelcase": false,
|
||||
"curly": false,
|
||||
"eqeqeq": true,
|
||||
"es3": false,
|
||||
"forin": false,
|
||||
"freeze": false,
|
||||
"immed": false,
|
||||
"sub": true,
|
||||
"latedef": false,
|
||||
"newcap": false,
|
||||
"noarg": false,
|
||||
"node": true,
|
||||
"laxbreak": true,
|
||||
"noempty": true,
|
||||
"varstmt": false,
|
||||
"nonbsp": true,
|
||||
"nonew": false,
|
||||
"plusplus": false,
|
||||
"quotmark": "single",
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
"esversion": 6,
|
||||
"strict": false,
|
||||
"trailing": true,
|
||||
"browser": false,
|
||||
"asi": true,
|
||||
"predef": ["window","document","jQuery","define"]
|
||||
}
|
||||
9
static/lib/bootstrap-datetimepicker/.npmignore
Normal file
9
static/lib/bootstrap-datetimepicker/.npmignore
Normal file
@@ -0,0 +1,9 @@
|
||||
# PHP Storm
|
||||
.idea
|
||||
*.iml
|
||||
atlassian-ide-plugin.xml
|
||||
yuicompressor-*
|
||||
build
|
||||
less
|
||||
sample*
|
||||
screenshot
|
||||
5
static/lib/bootstrap-datetimepicker/.travis.yml
Normal file
5
static/lib/bootstrap-datetimepicker/.travis.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
sudo: false
|
||||
before_script:
|
||||
- cd ./tests
|
||||
- echo "new Date().toString();" | phantomjs
|
||||
script: phantomjs run-qunit.js tests.html
|
||||
25
static/lib/bootstrap-datetimepicker/Gruntfile.js
Normal file
25
static/lib/bootstrap-datetimepicker/Gruntfile.js
Normal file
@@ -0,0 +1,25 @@
|
||||
module.exports = (grunt) => {
|
||||
|
||||
require('load-grunt-tasks')(grunt)
|
||||
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
jshint: {
|
||||
options: {
|
||||
jshintrc: '.jshintrc'
|
||||
},
|
||||
all: {
|
||||
src: ['./js/bootstrap-datetimepicker.js']
|
||||
}
|
||||
},
|
||||
versioncheck: {
|
||||
target: {
|
||||
options: {
|
||||
hideUpToDate: true
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
grunt.registerTask('default', ['jshint', 'versioncheck'])
|
||||
}
|
||||
201
static/lib/bootstrap-datetimepicker/LICENSE
Normal file
201
static/lib/bootstrap-datetimepicker/LICENSE
Normal file
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2012 Sebastien MALOT
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
2
static/lib/bootstrap-datetimepicker/README.md
Normal file
2
static/lib/bootstrap-datetimepicker/README.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# Deprecation warning!
|
||||
This repository has been deprecated in favour of [this](https://eonasdan.github.io/bootstrap-datetimepicker/).
|
||||
15
static/lib/bootstrap-datetimepicker/bower.json
Normal file
15
static/lib/bootstrap-datetimepicker/bower.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "smalot-bootstrap-datetimepicker",
|
||||
"main": ["js/bootstrap-datetimepicker.min.js", "css/bootstrap-datetimepicker.min.css"],
|
||||
"ignore": [
|
||||
"build",
|
||||
"sample in bootstrap v2",
|
||||
"sample in bootstrap v3",
|
||||
"screenshot",
|
||||
"tests",
|
||||
".gitattributes",
|
||||
".gitignore",
|
||||
".travis.yml",
|
||||
"minify.sh"
|
||||
]
|
||||
}
|
||||
66
static/lib/bootstrap-datetimepicker/build/build.less
Normal file
66
static/lib/bootstrap-datetimepicker/build/build.less
Normal file
@@ -0,0 +1,66 @@
|
||||
// Datepicker .less buildfile. Includes select mixins/variables from bootstrap
|
||||
// and imports the included datepicker.less to output a minimal datepicker.css
|
||||
//
|
||||
// Usage:
|
||||
// lessc build.less datepicker.css
|
||||
//
|
||||
// Variables and mixins copied from bootstrap 2.0.2
|
||||
|
||||
// Variables
|
||||
@grayLight: #999;
|
||||
@grayLighter: #eee;
|
||||
@white: #fff;
|
||||
@linkColor: #08c;
|
||||
@btnPrimaryBackground: @linkColor;
|
||||
@orange: #f89406;
|
||||
|
||||
// Mixins
|
||||
|
||||
// Border Radius
|
||||
.border-radius(@radius: 5px) {
|
||||
-webkit-border-radius: @radius;
|
||||
-moz-border-radius: @radius;
|
||||
border-radius: @radius;
|
||||
}
|
||||
|
||||
// Button backgrounds
|
||||
.buttonBackground(@startColor, @endColor) {
|
||||
.gradientBar(@startColor, @endColor);
|
||||
.reset-filter();
|
||||
&:hover, &:active, &.active, &.disabled, &[disabled] {
|
||||
background-color: @endColor;
|
||||
}
|
||||
&:active,
|
||||
&.active {
|
||||
background-color: darken(@endColor, 10%) e("\9");
|
||||
}
|
||||
}
|
||||
|
||||
// Reset filters for IE
|
||||
.reset-filter() {
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
}
|
||||
|
||||
// Gradient Bar Colors for buttons and alerts
|
||||
.gradientBar(@primaryColor, @secondaryColor) {
|
||||
#gradient > .vertical(@primaryColor, @secondaryColor);
|
||||
border-color: @secondaryColor @secondaryColor darken(@secondaryColor, 15%);
|
||||
border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%);
|
||||
}
|
||||
|
||||
// Gradients
|
||||
#gradient {
|
||||
.vertical(@startColor: #555, @endColor: #333) {
|
||||
background-color: mix(@startColor, @endColor, 60%);
|
||||
background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+
|
||||
background-image: -ms-linear-gradient(top, @startColor, @endColor); // IE10
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+
|
||||
background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+
|
||||
background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10
|
||||
background-image: linear-gradient(top, @startColor, @endColor); // The standard
|
||||
background-repeat: repeat-x;
|
||||
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down
|
||||
}
|
||||
}
|
||||
|
||||
@import "../less/datetimepicker.less";
|
||||
@@ -0,0 +1,69 @@
|
||||
// Datepicker standalone .less buildfile. Includes all necessary mixins/variables/rules from bootstrap
|
||||
// and imports the included datepicker.less to output a minimal standalone datepicker.css
|
||||
//
|
||||
// Usage:
|
||||
// lessc build_standalone.less datepicker.css
|
||||
//
|
||||
// Variables, mixins, and rules copied from bootstrap 2.0.2
|
||||
|
||||
@import "build.less";
|
||||
|
||||
// Dropdown css
|
||||
|
||||
@zindexDropdown: 1000;
|
||||
@grayDark: #333;
|
||||
@baseLineHeight: 18px;
|
||||
@tableBackground: transparent; // overall background-color
|
||||
@dropdownBackground: @white;
|
||||
@dropdownBorder: rgba(0,0,0,.2);
|
||||
@dropdownLinkColor: @grayDark;
|
||||
@dropdownLinkColorHover: @white;
|
||||
@dropdownLinkBackgroundHover: @linkColor;
|
||||
|
||||
// Drop shadows
|
||||
.box-shadow(@shadow) {
|
||||
-webkit-box-shadow: @shadow;
|
||||
-moz-box-shadow: @shadow;
|
||||
box-shadow: @shadow;
|
||||
}
|
||||
|
||||
// The dropdown menu (ul)
|
||||
// ----------------------
|
||||
.datetimepicker.dropdown-menu {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
z-index: @zindexDropdown;
|
||||
float: left;
|
||||
display: none; // none by default, but block on "open" of the menu
|
||||
min-width: 160px;
|
||||
list-style: none;
|
||||
background-color: @dropdownBackground;
|
||||
border: 1px solid #ccc;
|
||||
border: 1px solid rgba(0,0,0,.2);
|
||||
.border-radius(5px);
|
||||
.box-shadow(0 5px 10px rgba(0,0,0,.2));
|
||||
-webkit-background-clip: padding-box;
|
||||
-moz-background-clip: padding;
|
||||
background-clip: padding-box;
|
||||
*border-right-width: 2px;
|
||||
*border-bottom-width: 2px;
|
||||
|
||||
// Normally inherited from bootstrap's `body`
|
||||
color: #333333;
|
||||
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
|
||||
font-size:13px;
|
||||
line-height: @baseLineHeight;
|
||||
|
||||
th, td {
|
||||
padding: 4px 5px;
|
||||
}
|
||||
}
|
||||
|
||||
// Alternative arrows
|
||||
// May require `charset="UTF-8"` in your `<link>` tag
|
||||
.datetimepicker {
|
||||
.prev, .next {font-style:normal;}
|
||||
.prev:after {content:"«";}
|
||||
.next:after {content:"»";}
|
||||
}
|
||||
418
static/lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.css
vendored
Normal file
418
static/lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.css
vendored
Normal file
@@ -0,0 +1,418 @@
|
||||
/*!
|
||||
* Datetimepicker for Bootstrap
|
||||
*
|
||||
* Copyright 2012 Stefan Petre
|
||||
* Improvements by Andrew Rowls
|
||||
* Licensed under the Apache License v2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*/
|
||||
.datetimepicker {
|
||||
padding: 4px;
|
||||
margin-top: 1px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
.datetimepicker-inline {
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
.datetimepicker.datetimepicker-rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
.datetimepicker.datetimepicker-rtl table tr td span {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.datetimepicker-dropdown, .datetimepicker-dropdown-left {
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
[class*=" datetimepicker-dropdown"]:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
border-left: 7px solid transparent;
|
||||
border-right: 7px solid transparent;
|
||||
border-bottom: 7px solid #cccccc;
|
||||
border-bottom-color: rgba(0, 0, 0, 0.2);
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
[class*=" datetimepicker-dropdown"]:after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
border-left: 6px solid transparent;
|
||||
border-right: 6px solid transparent;
|
||||
border-bottom: 6px solid #ffffff;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
[class*=" datetimepicker-dropdown-top"]:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
border-left: 7px solid transparent;
|
||||
border-right: 7px solid transparent;
|
||||
border-top: 7px solid #cccccc;
|
||||
border-top-color: rgba(0, 0, 0, 0.2);
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
[class*=" datetimepicker-dropdown-top"]:after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
border-left: 6px solid transparent;
|
||||
border-right: 6px solid transparent;
|
||||
border-top: 6px solid #ffffff;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.datetimepicker-dropdown-bottom-left:before {
|
||||
top: -7px;
|
||||
right: 6px;
|
||||
}
|
||||
|
||||
.datetimepicker-dropdown-bottom-left:after {
|
||||
top: -6px;
|
||||
right: 7px;
|
||||
}
|
||||
|
||||
.datetimepicker-dropdown-bottom-right:before {
|
||||
top: -7px;
|
||||
left: 6px;
|
||||
}
|
||||
|
||||
.datetimepicker-dropdown-bottom-right:after {
|
||||
top: -6px;
|
||||
left: 7px;
|
||||
}
|
||||
|
||||
.datetimepicker-dropdown-top-left:before {
|
||||
bottom: -7px;
|
||||
right: 6px;
|
||||
}
|
||||
|
||||
.datetimepicker-dropdown-top-left:after {
|
||||
bottom: -6px;
|
||||
right: 7px;
|
||||
}
|
||||
|
||||
.datetimepicker-dropdown-top-right:before {
|
||||
bottom: -7px;
|
||||
left: 6px;
|
||||
}
|
||||
|
||||
.datetimepicker-dropdown-top-right:after {
|
||||
bottom: -6px;
|
||||
left: 7px;
|
||||
}
|
||||
|
||||
.datetimepicker > div {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.datetimepicker.minutes div.datetimepicker-minutes {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.datetimepicker.hours div.datetimepicker-hours {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.datetimepicker.days div.datetimepicker-days {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.datetimepicker.months div.datetimepicker-months {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.datetimepicker.years div.datetimepicker-years {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.datetimepicker table {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.datetimepicker td,
|
||||
.datetimepicker th {
|
||||
text-align: center;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.table-striped .datetimepicker table tr td,
|
||||
.table-striped .datetimepicker table tr th {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.datetimepicker table tr td.minute:hover {
|
||||
background: #eeeeee;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.datetimepicker table tr td.hour:hover {
|
||||
background: #eeeeee;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.datetimepicker table tr td.day:hover {
|
||||
background: #eeeeee;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.datetimepicker table tr td.old,
|
||||
.datetimepicker table tr td.new {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.datetimepicker table tr td.disabled,
|
||||
.datetimepicker table tr td.disabled:hover {
|
||||
background: none;
|
||||
color: #999999;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.datetimepicker table tr td.today,
|
||||
.datetimepicker table tr td.today:hover,
|
||||
.datetimepicker table tr td.today.disabled,
|
||||
.datetimepicker table tr td.today.disabled:hover {
|
||||
background-color: #fde19a;
|
||||
background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a);
|
||||
background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a));
|
||||
background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a);
|
||||
background-image: -o-linear-gradient(top, #fdd49a, #fdf59a);
|
||||
background-image: linear-gradient(to bottom, #fdd49a, #fdf59a);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0);
|
||||
border-color: #fdf59a #fdf59a #fbed50;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
}
|
||||
|
||||
.datetimepicker table tr td.today:hover,
|
||||
.datetimepicker table tr td.today:hover:hover,
|
||||
.datetimepicker table tr td.today.disabled:hover,
|
||||
.datetimepicker table tr td.today.disabled:hover:hover,
|
||||
.datetimepicker table tr td.today:active,
|
||||
.datetimepicker table tr td.today:hover:active,
|
||||
.datetimepicker table tr td.today.disabled:active,
|
||||
.datetimepicker table tr td.today.disabled:hover:active,
|
||||
.datetimepicker table tr td.today.active,
|
||||
.datetimepicker table tr td.today:hover.active,
|
||||
.datetimepicker table tr td.today.disabled.active,
|
||||
.datetimepicker table tr td.today.disabled:hover.active,
|
||||
.datetimepicker table tr td.today.disabled,
|
||||
.datetimepicker table tr td.today:hover.disabled,
|
||||
.datetimepicker table tr td.today.disabled.disabled,
|
||||
.datetimepicker table tr td.today.disabled:hover.disabled,
|
||||
.datetimepicker table tr td.today[disabled],
|
||||
.datetimepicker table tr td.today:hover[disabled],
|
||||
.datetimepicker table tr td.today.disabled[disabled],
|
||||
.datetimepicker table tr td.today.disabled:hover[disabled] {
|
||||
background-color: #fdf59a;
|
||||
}
|
||||
|
||||
.datetimepicker table tr td.today:active,
|
||||
.datetimepicker table tr td.today:hover:active,
|
||||
.datetimepicker table tr td.today.disabled:active,
|
||||
.datetimepicker table tr td.today.disabled:hover:active,
|
||||
.datetimepicker table tr td.today.active,
|
||||
.datetimepicker table tr td.today:hover.active,
|
||||
.datetimepicker table tr td.today.disabled.active,
|
||||
.datetimepicker table tr td.today.disabled:hover.active {
|
||||
background-color: #fbf069;
|
||||
}
|
||||
|
||||
.datetimepicker table tr td.active,
|
||||
.datetimepicker table tr td.active:hover,
|
||||
.datetimepicker table tr td.active.disabled,
|
||||
.datetimepicker table tr td.active.disabled:hover {
|
||||
background-color: #006dcc;
|
||||
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
|
||||
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: linear-gradient(to bottom, #0088cc, #0044cc);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
|
||||
border-color: #0044cc #0044cc #002a80;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
color: #ffffff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.datetimepicker table tr td.active:hover,
|
||||
.datetimepicker table tr td.active:hover:hover,
|
||||
.datetimepicker table tr td.active.disabled:hover,
|
||||
.datetimepicker table tr td.active.disabled:hover:hover,
|
||||
.datetimepicker table tr td.active:active,
|
||||
.datetimepicker table tr td.active:hover:active,
|
||||
.datetimepicker table tr td.active.disabled:active,
|
||||
.datetimepicker table tr td.active.disabled:hover:active,
|
||||
.datetimepicker table tr td.active.active,
|
||||
.datetimepicker table tr td.active:hover.active,
|
||||
.datetimepicker table tr td.active.disabled.active,
|
||||
.datetimepicker table tr td.active.disabled:hover.active,
|
||||
.datetimepicker table tr td.active.disabled,
|
||||
.datetimepicker table tr td.active:hover.disabled,
|
||||
.datetimepicker table tr td.active.disabled.disabled,
|
||||
.datetimepicker table tr td.active.disabled:hover.disabled,
|
||||
.datetimepicker table tr td.active[disabled],
|
||||
.datetimepicker table tr td.active:hover[disabled],
|
||||
.datetimepicker table tr td.active.disabled[disabled],
|
||||
.datetimepicker table tr td.active.disabled:hover[disabled] {
|
||||
background-color: #0044cc;
|
||||
}
|
||||
|
||||
.datetimepicker table tr td.active:active,
|
||||
.datetimepicker table tr td.active:hover:active,
|
||||
.datetimepicker table tr td.active.disabled:active,
|
||||
.datetimepicker table tr td.active.disabled:hover:active,
|
||||
.datetimepicker table tr td.active.active,
|
||||
.datetimepicker table tr td.active:hover.active,
|
||||
.datetimepicker table tr td.active.disabled.active,
|
||||
.datetimepicker table tr td.active.disabled:hover.active {
|
||||
background-color: #003399;
|
||||
}
|
||||
|
||||
.datetimepicker table tr td span {
|
||||
display: block;
|
||||
width: 23%;
|
||||
height: 54px;
|
||||
line-height: 54px;
|
||||
float: left;
|
||||
margin: 1%;
|
||||
cursor: pointer;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.datetimepicker .datetimepicker-hours span {
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
}
|
||||
|
||||
.datetimepicker .datetimepicker-hours table tr td span.hour_am,
|
||||
.datetimepicker .datetimepicker-hours table tr td span.hour_pm {
|
||||
width: 14.6%;
|
||||
}
|
||||
|
||||
.datetimepicker .datetimepicker-hours fieldset legend,
|
||||
.datetimepicker .datetimepicker-minutes fieldset legend {
|
||||
margin-bottom: inherit;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.datetimepicker .datetimepicker-minutes span {
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
}
|
||||
|
||||
.datetimepicker table tr td span:hover {
|
||||
background: #eeeeee;
|
||||
}
|
||||
|
||||
.datetimepicker table tr td span.disabled,
|
||||
.datetimepicker table tr td span.disabled:hover {
|
||||
background: none;
|
||||
color: #999999;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.datetimepicker table tr td span.active,
|
||||
.datetimepicker table tr td span.active:hover,
|
||||
.datetimepicker table tr td span.active.disabled,
|
||||
.datetimepicker table tr td span.active.disabled:hover {
|
||||
background-color: #006dcc;
|
||||
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
|
||||
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: linear-gradient(to bottom, #0088cc, #0044cc);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
|
||||
border-color: #0044cc #0044cc #002a80;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
color: #ffffff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.datetimepicker table tr td span.active:hover,
|
||||
.datetimepicker table tr td span.active:hover:hover,
|
||||
.datetimepicker table tr td span.active.disabled:hover,
|
||||
.datetimepicker table tr td span.active.disabled:hover:hover,
|
||||
.datetimepicker table tr td span.active:active,
|
||||
.datetimepicker table tr td span.active:hover:active,
|
||||
.datetimepicker table tr td span.active.disabled:active,
|
||||
.datetimepicker table tr td span.active.disabled:hover:active,
|
||||
.datetimepicker table tr td span.active.active,
|
||||
.datetimepicker table tr td span.active:hover.active,
|
||||
.datetimepicker table tr td span.active.disabled.active,
|
||||
.datetimepicker table tr td span.active.disabled:hover.active,
|
||||
.datetimepicker table tr td span.active.disabled,
|
||||
.datetimepicker table tr td span.active:hover.disabled,
|
||||
.datetimepicker table tr td span.active.disabled.disabled,
|
||||
.datetimepicker table tr td span.active.disabled:hover.disabled,
|
||||
.datetimepicker table tr td span.active[disabled],
|
||||
.datetimepicker table tr td span.active:hover[disabled],
|
||||
.datetimepicker table tr td span.active.disabled[disabled],
|
||||
.datetimepicker table tr td span.active.disabled:hover[disabled] {
|
||||
background-color: #0044cc;
|
||||
}
|
||||
|
||||
.datetimepicker table tr td span.active:active,
|
||||
.datetimepicker table tr td span.active:hover:active,
|
||||
.datetimepicker table tr td span.active.disabled:active,
|
||||
.datetimepicker table tr td span.active.disabled:hover:active,
|
||||
.datetimepicker table tr td span.active.active,
|
||||
.datetimepicker table tr td span.active:hover.active,
|
||||
.datetimepicker table tr td span.active.disabled.active,
|
||||
.datetimepicker table tr td span.active.disabled:hover.active {
|
||||
background-color: #003399;
|
||||
}
|
||||
|
||||
.datetimepicker table tr td span.old {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.datetimepicker th.switch {
|
||||
width: 145px;
|
||||
}
|
||||
|
||||
.datetimepicker th span.glyphicon {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.datetimepicker thead tr:first-child th,
|
||||
.datetimepicker tfoot th {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.datetimepicker thead tr:first-child th:hover,
|
||||
.datetimepicker tfoot th:hover {
|
||||
background: #eeeeee;
|
||||
}
|
||||
|
||||
.input-append.date .add-on i,
|
||||
.input-prepend.date .add-on i,
|
||||
.input-group.date .input-group-addon span {
|
||||
cursor: pointer;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
9
static/lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css
vendored
Normal file
9
static/lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1967
static/lib/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js
vendored
Normal file
1967
static/lib/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
static/lib/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js
vendored
Normal file
1
static/lib/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
17
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.ar.js
vendored
Normal file
17
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.ar.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Arabic translation for bootstrap-datetimepicker
|
||||
* Ala' Mohammad <amohammad@birzeit.ecu>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['ar'] = {
|
||||
days: ["الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت", "الأحد"],
|
||||
daysShort: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت", "أحد"],
|
||||
daysMin: ["أح", "إث", "ث", "أر", "خ", "ج", "س", "أح"],
|
||||
months: ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"],
|
||||
monthsShort: ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"],
|
||||
today: "هذا اليوم",
|
||||
suffix: [],
|
||||
meridiem: [],
|
||||
rtl: true
|
||||
};
|
||||
}(jQuery));
|
||||
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.az.js
vendored
Normal file
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.az.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Azerbaijani translation for bootstrap-datetimepicker
|
||||
* Konstantin Kaluzhnikov <k.kaluzhnikov@gmail.com>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['az'] = {
|
||||
days: ["Bazar", "Bazar ertəsi", "Çərşənbə axşamı", "Çərşənbə", "Cümə axşamı", "Cümə", "Şənbə", "Bazar"],
|
||||
daysShort: ["B", "Be", "Ça", "Ç", "Ca", "C", "Ş", "B"],
|
||||
daysMin: ["B", "Be", "Ça", "Ç", "Ca", "C", "Ş", "B"],
|
||||
months: ["Yanvar", "Fevral", "Mart", "Aprel", "May", "İyun", "İyul", "Avqust", "Sentyabr", "Oktyabr", "Noyabr", "Dekabr"],
|
||||
monthsShort: ["Yan", "Fev", "Mar", "Apr", "May", "İyun", "İyul", "Avq", "Sen", "Okt", "Noy", "Dek"],
|
||||
today: "Bugün",
|
||||
suffix: [],
|
||||
meridiem: []
|
||||
};
|
||||
}(jQuery));
|
||||
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.bg.js
vendored
Normal file
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.bg.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Bulgarian translation for bootstrap-datetimepicker
|
||||
* Apostol Apostolov <apostol.s.apostolov@gmail.com>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['bg'] = {
|
||||
days: ["Неделя", "Понеделник", "Вторник", "Сряда", "Четвъртък", "Петък", "Събота", "Неделя"],
|
||||
daysShort: ["Нед", "Пон", "Вто", "Сря", "Чет", "Пет", "Съб", "Нед"],
|
||||
daysMin: ["Н", "П", "В", "С", "Ч", "П", "С", "Н"],
|
||||
months: ["Януари", "Февруари", "Март", "Април", "Май", "Юни", "Юли", "Август", "Септември", "Октомври", "Ноември", "Декември"],
|
||||
monthsShort: ["Ян", "Фев", "Мар", "Апр", "Май", "Юни", "Юли", "Авг", "Сеп", "Окт", "Ное", "Дек"],
|
||||
today: "днес",
|
||||
suffix: [],
|
||||
meridiem: []
|
||||
};
|
||||
}(jQuery));
|
||||
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.bn.js
vendored
Normal file
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.bn.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Bangla(Bangladesh) translation for bootstrap-datetimepicker
|
||||
* Mahbub Rabbani <mahbub [dot] rucse [at] gmail.com>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['bn'] = {
|
||||
days: ["রবিবার", "সোমবার", "মঙ্গলবার", "বুধবার", "বৃহষ্পতিবার", "শুক্রবার", "শনিবার", "রবিবার"],
|
||||
daysShort: ["রবি", "সোম", "মঙ্গল", "বুধ", " বৃহঃ", "শুক্র", "শনি", "রবি"],
|
||||
daysMin: ["রবি", "সোম", "মঙ্গ", "বুধ", "বৃহ", "শুক্র", "শনি", "রবি"],
|
||||
months: ['জানুয়ারী', 'ফেব্রুয়ারী', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'অগাস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর' ],
|
||||
monthsShort: ['জানু', 'ফেব্রু', 'মার্চ', 'এপ্রি', 'মে', 'জুন', 'জুলা', 'অগা', 'সেপ্টে', 'অক্টো', 'নভে', 'ডিসে' ],
|
||||
today: "আজ",
|
||||
suffix: [],
|
||||
meridiem: ['পূর্বাহ্ণ', 'অপরাহ্ন']
|
||||
};
|
||||
}(jQuery));
|
||||
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.ca.js
vendored
Normal file
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.ca.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Catalan translation for bootstrap-datetimepicker
|
||||
* J. Garcia <jogaco.en@gmail.com>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['ca'] = {
|
||||
days: ["Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte", "Diumenge"],
|
||||
daysShort: ["Diu", "Dil", "Dmt", "Dmc", "Dij", "Div", "Dis", "Diu"],
|
||||
daysMin: ["dg", "dl", "dt", "dc", "dj", "dv", "ds", "dg"],
|
||||
months: ["Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre"],
|
||||
monthsShort: ["Gen", "Feb", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Oct", "Nov", "Des"],
|
||||
today: "Avui",
|
||||
suffix: [],
|
||||
meridiem: []
|
||||
};
|
||||
}(jQuery));
|
||||
19
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.cs.js
vendored
Normal file
19
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.cs.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Czech translation for bootstrap-datetimepicker
|
||||
* Matěj Koubík <matej@koubik.name>
|
||||
* Fixes by Michal Remiš <michal.remis@gmail.com>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['cs'] = {
|
||||
days: ["Neděle", "Pondělí", "Úterý", "Středa", "Čtvrtek", "Pátek", "Sobota", "Neděle"],
|
||||
daysShort: ["Ned", "Pon", "Úte", "Stř", "Čtv", "Pát", "Sob", "Ned"],
|
||||
daysMin: ["Ne", "Po", "Út", "St", "Čt", "Pá", "So", "Ne"],
|
||||
months: ["Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"],
|
||||
monthsShort: ["Led", "Úno", "Bře", "Dub", "Kvě", "Čer", "Čnc", "Srp", "Zář", "Říj", "Lis", "Pro"],
|
||||
today: "Dnes",
|
||||
suffix: [],
|
||||
meridiem: [],
|
||||
weekStart: 1,
|
||||
format: "dd.mm.yyyy"
|
||||
};
|
||||
}(jQuery));
|
||||
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.da.js
vendored
Normal file
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.da.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Danish translation for bootstrap-datetimepicker
|
||||
* Christian Pedersen <http://github.com/chripede>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['da'] = {
|
||||
days: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag", "Søndag"],
|
||||
daysShort: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør", "Søn"],
|
||||
daysMin: ["Sø", "Ma", "Ti", "On", "To", "Fr", "Lø", "Sø"],
|
||||
months: ["Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"],
|
||||
monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"],
|
||||
today: "I Dag",
|
||||
suffix: [],
|
||||
meridiem: []
|
||||
};
|
||||
}(jQuery));
|
||||
18
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.de.js
vendored
Normal file
18
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.de.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* German translation for bootstrap-datetimepicker
|
||||
* Sam Zurcher <sam@orelias.ch>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['de'] = {
|
||||
days: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Sonntag"],
|
||||
daysShort: ["Son", "Mon", "Die", "Mit", "Don", "Fre", "Sam", "Son"],
|
||||
daysMin: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa", "So"],
|
||||
months: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"],
|
||||
monthsShort: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"],
|
||||
today: "Heute",
|
||||
suffix: [],
|
||||
meridiem: [],
|
||||
weekStart: 1,
|
||||
format: "dd.mm.yyyy"
|
||||
};
|
||||
}(jQuery));
|
||||
18
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.ee.js
vendored
Normal file
18
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.ee.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Estonian translation for bootstrap-datetimepicker
|
||||
* Rene Korss <http://rene.korss.ee>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['ee'] = {
|
||||
days: ["Pühapäev", "Esmaspäev", "Teisipäev", "Kolmapäev", "Neljapäev", "Reede", "Laupäev", "Pühapäev"],
|
||||
daysShort: ["P", "E", "T", "K", "N", "R", "L", "P"],
|
||||
daysMin: ["P", "E", "T", "K", "N", "R", "L", "P"],
|
||||
months: ["Jaanuar", "Veebruar", "Märts", "Aprill", "Mai", "Juuni", "Juuli", "August", "September", "Oktoober", "November", "Detsember"],
|
||||
monthsShort: ["Jaan", "Veebr", "Märts", "Apr", "Mai", "Juuni", "Juuli", "Aug", "Sept", "Okt", "Nov", "Dets"],
|
||||
today: "Täna",
|
||||
suffix: [],
|
||||
meridiem: [],
|
||||
weekStart: 1,
|
||||
format: "dd.mm.yyyy hh:ii"
|
||||
};
|
||||
}(jQuery));
|
||||
15
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.el.js
vendored
Normal file
15
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.el.js
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Greek translation for bootstrap-datetimepicker
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['el'] = {
|
||||
days: ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο", "Κυριακή"],
|
||||
daysShort: ["Κυρ", "Δευ", "Τρι", "Τετ", "Πεμ", "Παρ", "Σαβ", "Κυρ"],
|
||||
daysMin: ["Κυ", "Δε", "Τρ", "Τε", "Πε", "Πα", "Σα", "Κυ"],
|
||||
months: ["Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάιος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"],
|
||||
monthsShort: ["Ιαν", "Φεβ", "Μαρ", "Απρ", "Μάι", "Ιουν", "Ιουλ", "Αυγ", "Σεπ", "Οκτ", "Νοε", "Δεκ"],
|
||||
today: "Σήμερα",
|
||||
suffix: [],
|
||||
meridiem: []
|
||||
};
|
||||
}(jQuery));
|
||||
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.es.js
vendored
Normal file
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.es.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Spanish translation for bootstrap-datetimepicker
|
||||
* Bruno Bonamin <bruno.bonamin@gmail.com>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['es'] = {
|
||||
days: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado", "Domingo"],
|
||||
daysShort: ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb", "Dom"],
|
||||
daysMin: ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa", "Do"],
|
||||
months: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"],
|
||||
monthsShort: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"],
|
||||
today: "Hoy",
|
||||
suffix: [],
|
||||
meridiem: []
|
||||
};
|
||||
}(jQuery));
|
||||
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.fi.js
vendored
Normal file
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.fi.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Finnish translation for bootstrap-datetimepicker
|
||||
* Jaakko Salonen <https://github.com/jsalonen>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['fi'] = {
|
||||
days: ["sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai", "sunnuntai"],
|
||||
daysShort: ["sun", "maa", "tii", "kes", "tor", "per", "lau", "sun"],
|
||||
daysMin: ["su", "ma", "ti", "ke", "to", "pe", "la", "su"],
|
||||
months: ["tammikuu", "helmikuu", "maaliskuu", "huhtikuu", "toukokuu", "kesäkuu", "heinäkuu", "elokuu", "syyskuu", "lokakuu", "marraskuu", "joulukuu"],
|
||||
monthsShort: ["tam", "hel", "maa", "huh", "tou", "kes", "hei", "elo", "syy", "lok", "mar", "jou"],
|
||||
today: "tänään",
|
||||
suffix: [],
|
||||
meridiem: []
|
||||
};
|
||||
}(jQuery));
|
||||
18
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.fr.js
vendored
Normal file
18
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.fr.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* French translation for bootstrap-datetimepicker
|
||||
* Nico Mollet <nico.mollet@gmail.com>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['fr'] = {
|
||||
days: ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi", "Dimanche"],
|
||||
daysShort: ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam", "Dim"],
|
||||
daysMin: ["D", "L", "Ma", "Me", "J", "V", "S", "D"],
|
||||
months: ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"],
|
||||
monthsShort: ["Jan", "Fev", "Mar", "Avr", "Mai", "Jui", "Jul", "Aou", "Sep", "Oct", "Nov", "Dec"],
|
||||
today: "Aujourd'hui",
|
||||
suffix: [],
|
||||
meridiem: ["am", "pm"],
|
||||
weekStart: 1,
|
||||
format: "dd/mm/yyyy hh:ii"
|
||||
};
|
||||
}(jQuery));
|
||||
17
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.he.js
vendored
Normal file
17
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.he.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Hebrew translation for bootstrap-datetimepicker
|
||||
* Sagie Maoz <sagie@maoz.info>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['he'] = {
|
||||
days: ["ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת", "ראשון"],
|
||||
daysShort: ["א", "ב", "ג", "ד", "ה", "ו", "ש", "א"],
|
||||
daysMin: ["א", "ב", "ג", "ד", "ה", "ו", "ש", "א"],
|
||||
months: ["ינואר", "פברואר", "מרץ", "אפריל", "מאי", "יוני", "יולי", "אוגוסט", "ספטמבר", "אוקטובר", "נובמבר", "דצמבר"],
|
||||
monthsShort: ["ינו", "פבר", "מרץ", "אפר", "מאי", "יונ", "יול", "אוג", "ספט", "אוק", "נוב", "דצמ"],
|
||||
today: "היום",
|
||||
suffix: [],
|
||||
meridiem: [],
|
||||
rtl: true
|
||||
};
|
||||
}(jQuery));
|
||||
15
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.hr.js
vendored
Normal file
15
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.hr.js
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Croatian localisation
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['hr'] = {
|
||||
days: ["Nedjelja", "Ponedjelja", "Utorak", "Srijeda", "Četrtak", "Petak", "Subota", "Nedjelja"],
|
||||
daysShort: ["Ned", "Pon", "Uto", "Srr", "Čet", "Pet", "Sub", "Ned"],
|
||||
daysMin: ["Ne", "Po", "Ut", "Sr", "Če", "Pe", "Su", "Ne"],
|
||||
months: ["Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac"],
|
||||
monthsShort: ["Sije", "Velj", "Ožu", "Tra", "Svi", "Lip", "Jul", "Kol", "Ruj", "Lis", "Stu", "Pro"],
|
||||
today: "Danas",
|
||||
suffix: [],
|
||||
meridiem: []
|
||||
};
|
||||
}(jQuery));
|
||||
17
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.hu.js
vendored
Normal file
17
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.hu.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Hungarian translation for bootstrap-datetimepicker
|
||||
* darevish <http://github.com/darevish>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['hu'] = {
|
||||
days: ["Vasárnap", "Hétfő", "Kedd", "Szerda", "Csütörtök", "Péntek", "Szombat", "Vasárnap"],
|
||||
daysShort: ["Vas", "Hét", "Ked", "Sze", "Csü", "Pén", "Szo", "Vas"],
|
||||
daysMin: ["V", "H", "K", "Sze", "Cs", "P", "Szo", "V"],
|
||||
months: ["Január", "Február", "Március", "Április", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December"],
|
||||
monthsShort: ["Jan", "Feb", "Már", "Ápr", "Máj", "Jún", "Júl", "Aug", "Sze", "Okt", "Nov", "Dec"],
|
||||
today: "Ma",
|
||||
suffix: [],
|
||||
meridiem: [],
|
||||
weekStart: 1
|
||||
};
|
||||
}(jQuery));
|
||||
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.hy.js
vendored
Normal file
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.hy.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Armenian translation for bootstrap-datepicker
|
||||
* Hayk Chamyan <hamshen@gmail.com>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['hy'] = {
|
||||
days: ["Կիրակի", "Երկուշաբթի", "Երեքշաբթի", "Չորեքշաբթի", "Հինգշաբթի", "Ուրբաթ", "Շաբաթ", "Կիրակի"],
|
||||
daysShort: ["Կիր", "Երկ", "Երք", "Չոր", "Հնգ", "Ուր", "Շաբ", "Կիր"],
|
||||
daysMin: ["Կի", "Եկ", "Եք", "Չո", "Հի", "Ու", "Շա", "Կի"],
|
||||
months: ["Հունվար", "Փետրվար", "Մարտ", "Ապրիլ", "Մայիս", "Հունիս", "Հուլիս", "Օգոստոս", "Սեպտեմբեր", "Հոկտեմբեր", "Նոյեմբեր", "Դեկտեմբեր"],
|
||||
monthsShort: ["Հնվ", "Փետ", "Մար", "Ապր", "Մայ", "Հուն", "Հուլ", "Օգս", "Սեպ", "Հոկ", "Նոյ", "Դեկ"],
|
||||
today: "Այսօր",
|
||||
suffix: [],
|
||||
meridiem: []
|
||||
};
|
||||
}(jQuery));
|
||||
19
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.id.js
vendored
Normal file
19
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.id.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Bahasa translation for bootstrap-datetimepicker
|
||||
* Azwar Akbar <azwar.akbar@gmail.com>
|
||||
* Addtional by Yulian Sutopo <yuliansutopo@gmail.com>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['id'] = {
|
||||
days: ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu", "Minggu"],
|
||||
daysShort: ["Mng", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab", "Mng"],
|
||||
daysMin: ["Mg", "Sn", "Sl", "Ra", "Ka", "Ju", "Sa", "Mg"],
|
||||
months: ["Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"],
|
||||
monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Ags", "Sep", "Okt", "Nov", "Des"],
|
||||
today: "Hari Ini",
|
||||
suffix: [],
|
||||
meridiem: [],
|
||||
weekStart: 1,
|
||||
format: "dd/mm/yyyy hh:ii:ss"
|
||||
};
|
||||
}(jQuery));
|
||||
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.is.js
vendored
Normal file
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.is.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Icelandic translation for bootstrap-datetimepicker
|
||||
* Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['is'] = {
|
||||
days: ["Sunnudagur", "Mánudagur", "Þriðjudagur", "Miðvikudagur", "Fimmtudagur", "Föstudagur", "Laugardagur", "Sunnudagur"],
|
||||
daysShort: ["Sun", "Mán", "Þri", "Mið", "Fim", "Fös", "Lau", "Sun"],
|
||||
daysMin: ["Su", "Má", "Þr", "Mi", "Fi", "Fö", "La", "Su"],
|
||||
months: ["Janúar", "Febrúar", "Mars", "Apríl", "Maí", "Júní", "Júlí", "Ágúst", "September", "Október", "Nóvember", "Desember"],
|
||||
monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maí", "Jún", "Júl", "Ágú", "Sep", "Okt", "Nóv", "Des"],
|
||||
today: "Í Dag",
|
||||
suffix: [],
|
||||
meridiem: []
|
||||
};
|
||||
}(jQuery));
|
||||
18
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.it.js
vendored
Normal file
18
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.it.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Italian translation for bootstrap-datetimepicker
|
||||
* Enrico Rubboli <rubboli@gmail.com>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['it'] = {
|
||||
days: ["Domenica", "Lunedi", "Martedi", "Mercoledi", "Giovedi", "Venerdi", "Sabato", "Domenica"],
|
||||
daysShort: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab", "Dom"],
|
||||
daysMin: ["Do", "Lu", "Ma", "Me", "Gi", "Ve", "Sa", "Do"],
|
||||
months: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"],
|
||||
monthsShort: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"],
|
||||
today: "Oggi",
|
||||
suffix: [],
|
||||
meridiem: [],
|
||||
weekStart: 1,
|
||||
format: "dd/mm/yyyy hh:ii:ss"
|
||||
};
|
||||
}(jQuery));
|
||||
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.ja.js
vendored
Normal file
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.ja.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Japanese translation for bootstrap-datetimepicker
|
||||
* Norio Suzuki <https://github.com/suzuki/>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['ja'] = {
|
||||
days: ["日曜", "月曜", "火曜", "水曜", "木曜", "金曜", "土曜", "日曜"],
|
||||
daysShort: ["日", "月", "火", "水", "木", "金", "土", "日"],
|
||||
daysMin: ["日", "月", "火", "水", "木", "金", "土", "日"],
|
||||
months: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
|
||||
monthsShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
|
||||
today: "今日",
|
||||
suffix: [],
|
||||
meridiem: []
|
||||
};
|
||||
}(jQuery));
|
||||
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.ka.js
vendored
Normal file
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.ka.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Georgian translation for bootstrap-datetimepicker
|
||||
* Zura Jijavadze <mailzura@gmail.com>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['ka'] = {
|
||||
days: ["კვირა", "ორშაბათი", "სამშაბათი", "ოთხშაბათი", "ხუთშაბათი", "პარასკევი", "შაბათი", "კვირა"],
|
||||
daysShort: ["კვი", "ორშ", "სამ", "ოთხ", "ხუთ", "პარ", "შაბ", "კვი"],
|
||||
daysMin: ["კვ", "ორ", "სა", "ოთ", "ხუ", "პა", "შა", "კვ"],
|
||||
months: ["იანვარი", "თებერვალი", "მარტი", "აპრილი", "მაისი", "ივნისი", "ივლისი", "აგვისტო", "სექტემბერი", "ოქტომბერი", "ნოემბერი", "დეკემბერი"],
|
||||
monthsShort: ["იან", "თებ", "მარ", "აპრ", "მაი", "ივნ", "ივლ", "აგვ", "სექ", "ოქტ", "ნოე", "დეკ"],
|
||||
today: "დღეს",
|
||||
suffix: [],
|
||||
meridiem: []
|
||||
};
|
||||
}(jQuery));
|
||||
17
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.ko.js
vendored
Normal file
17
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.ko.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Korean translation for bootstrap-datetimepicker
|
||||
* Gu Youn <http://github.com/guyoun>
|
||||
* Baekjoon Choi <http://github.com/Baekjoon>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['ko'] = {
|
||||
days: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일", "일요일"],
|
||||
daysShort: ["일", "월", "화", "수", "목", "금", "토", "일"],
|
||||
daysMin: ["일", "월", "화", "수", "목", "금", "토", "일"],
|
||||
months: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"],
|
||||
monthsShort: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"],
|
||||
suffix: [],
|
||||
meridiem: ["오전", "오후"],
|
||||
today: "오늘",
|
||||
};
|
||||
}(jQuery));
|
||||
18
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.lt.js
vendored
Normal file
18
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.lt.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Lithuanian translation for bootstrap-datetimepicker
|
||||
* Šarūnas Gliebus <ssharunas@yahoo.co.uk>
|
||||
*/
|
||||
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['lt'] = {
|
||||
days: ["Sekmadienis", "Pirmadienis", "Antradienis", "Trečiadienis", "Ketvirtadienis", "Penktadienis", "Šeštadienis", "Sekmadienis"],
|
||||
daysShort: ["S", "Pr", "A", "T", "K", "Pn", "Š", "S"],
|
||||
daysMin: ["Sk", "Pr", "An", "Tr", "Ke", "Pn", "Št", "Sk"],
|
||||
months: ["Sausis", "Vasaris", "Kovas", "Balandis", "Gegužė", "Birželis", "Liepa", "Rugpjūtis", "Rugsėjis", "Spalis", "Lapkritis", "Gruodis"],
|
||||
monthsShort: ["Sau", "Vas", "Kov", "Bal", "Geg", "Bir", "Lie", "Rugp", "Rugs", "Spa", "Lap", "Gru"],
|
||||
today: "Šiandien",
|
||||
suffix: [],
|
||||
meridiem: [],
|
||||
weekStart: 1
|
||||
};
|
||||
}(jQuery));
|
||||
18
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.lv.js
vendored
Normal file
18
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.lv.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Latvian translation for bootstrap-datetimepicker
|
||||
* Artis Avotins <artis@apit.lv>
|
||||
*/
|
||||
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['lv'] = {
|
||||
days: ["Svētdiena", "Pirmdiena", "Otrdiena", "Trešdiena", "Ceturtdiena", "Piektdiena", "Sestdiena", "Svētdiena"],
|
||||
daysShort: ["Sv", "P", "O", "T", "C", "Pk", "S", "Sv"],
|
||||
daysMin: ["Sv", "Pr", "Ot", "Tr", "Ce", "Pk", "St", "Sv"],
|
||||
months: ["Janvāris", "Februāris", "Marts", "Aprīlis", "Maijs", "Jūnijs", "Jūlijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris"],
|
||||
monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jūn", "Jūl", "Aug", "Sep", "Okt", "Nov", "Dec."],
|
||||
today: "Šodien",
|
||||
suffix: [],
|
||||
meridiem: [],
|
||||
weekStart: 1
|
||||
};
|
||||
}(jQuery));
|
||||
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.ms.js
vendored
Normal file
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.ms.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Malay translation for bootstrap-datetimepicker
|
||||
* Ateman Faiz <noorulfaiz@gmail.com>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['ms'] = {
|
||||
days: ["Ahad", "Isnin", "Selasa", "Rabu", "Khamis", "Jumaat", "Sabtu", "Ahad"],
|
||||
daysShort: ["Aha", "Isn", "Sel", "Rab", "Kha", "Jum", "Sab", "Aha"],
|
||||
daysMin: ["Ah", "Is", "Se", "Ra", "Kh", "Ju", "Sa", "Ah"],
|
||||
months: ["Januari", "Februari", "Mac", "April", "Mei", "Jun", "Julai", "Ogos", "September", "Oktober", "November", "Disember"],
|
||||
monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Ogo", "Sep", "Okt", "Nov", "Dis"],
|
||||
today: "Hari Ini",
|
||||
suffix: [],
|
||||
meridiem: []
|
||||
};
|
||||
}(jQuery));
|
||||
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.nb.js
vendored
Normal file
16
static/lib/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.nb.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Norwegian (bokmål) translation for bootstrap-datetimepicker
|
||||
* Fredrik Sundmyhr <http://github.com/fsundmyhr>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datetimepicker.dates['nb'] = {
|
||||
days: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag", "Søndag"],
|
||||
daysShort: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør", "Søn"],
|
||||
daysMin: ["Sø", "Ma", "Ti", "On", "To", "Fr", "Lø", "Sø"],
|
||||
months: ["Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"],
|
||||
monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"],
|
||||
today: "I Dag",
|
||||
suffix: [],
|
||||
meridiem: []
|
||||
};
|
||||
}(jQuery));
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user