refactor(account): 重构账户管理页面布局和样式

-精简HTML结构,优化`account.html`,`apple-card/account.html`,和`t-mall-game/account.html`中iframe的布局。
- 调整CSS样式,以增强用户界面的一致性和可读性。
- 优化`account_history.html`中的表格和搜索栏的样式与对齐。

fix(controller): 修正新增控制器参数顺序

- 修正`addController.go`中的参数顺序,确保交易类型正确传递给服务层。
- 更新数据库插入操作,确保UUID正确分配给新记录,防止SQL错误。
This commit is contained in:
danial
2024-09-04 09:54:18 +08:00
parent d51d72c49f
commit c3906e940e
61 changed files with 5849 additions and 5528 deletions

View File

@@ -1,35 +1,35 @@
appname = jhboss
httpport = 12306
runmode = dev
HTTPAddr = localhost
HTTPAddr = 0.0.0.0
sessionon = true
# sessionprovider = redis
# sessiongcmaxlifetime = 86400
# sessioncookielifetime = 86400
# sessionProviderConfig = 127.0.0.1:6379,100,astaxie
sessionprovider = redis
sessiongcmaxlifetime = 86400
sessioncookielifetime = 86400
sessionProviderConfig = redis:6379,100,astaxie
[mysql]
dbhost = localhost
dbhost = mysql
dbport = 3306
dbuser = root
dbpasswd = 123456
dbbase = juhe_pay
dbbase = kami
[redis]
host = localhost
host = redis
port = 6379
password = ''
db = 10
[gateway]
host = http://localhost:12309/
host = http://kami_gateway:12309/
[portal]
host = http://localhost:5173
host = http://127.0.0.1:12400
[testExtraLink]
; 测试连接
host = http://localhost:12305
host = http://127.0.0.1:12305
[secret]
key = thisis32bitlongpassphraseimusing

View File

@@ -4,7 +4,7 @@ FROM golang:1.22 AS builder
ARG USE_PROXY
WORKDIR /build
COPY ./ /build/
COPY .. /build/
# 根据USE_PROXY参数设置环境变量
RUN if [ "$USE_PROXY" = "1" ]; then \
@@ -40,8 +40,9 @@ COPY --from=builder /build/main /app/
COPY --from=builder /build/conf/ /app/conf/
COPY --from=builder /build/views/ /app/views/
COPY --from=builder /build/static/ /app/static/
COPY --from=builder /build/deploy/wait-for-it.sh /app/
# 启动服务
CMD ["./main"]
CMD ["sh", "wait-for-it.sh", "mysql:3306" , "./main"]
EXPOSE 12306

View File

@@ -0,0 +1,19 @@
services:
boss_kami:
build:
context: ..
dockerfile: ./deploy/Dockerfile
args:
- USE_PROXY=1
container_name: kami_boss
image: kami_boss:latest
ports:
- "12306:12306"
networks:
- 1panel-network
labels:
createdBy: Developer
networks:
1panel-network:
external: true

View File

@@ -1,6 +1,8 @@
services:
kami_boss:
build:
context: ..
dockerfile: ./deploy/Dockerfile
args:
- USE_PROXY=1
container_name: kami_boss

19
deploy/wait-for-it.sh Normal file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
# $1 = host to connect to (e.g. localhost)
# $2 = port to connect to (e.g. 3306)
# $3 = timeout in seconds, after which the script will exit with status 1 (optional)
# Example usage:
# wait-for-it.sh localhost:3306 -- /usr/bin/python app.py
#
set -x
host="${1%:*}"
port="${1#*:}"
shift
# shellcheck disable=SC2124
cmd="$@"
until nc -z "$host" "$port"; do
>&2 echo "Waiting for $host:$port to be available..."
sleep 1
done
>&2 echo "$host:$port is available!"
exec "$cmd"

View File

@@ -1,20 +0,0 @@
services:
web:
build:
context: .
container_name: kami_boss_test
image: kami_boss_test:0.11
restart: always
ports:
- "22306:12306"
volumes:
- /data/kami/boss/conf/:/app/conf/
- /data/kami/boss/logs/:/app/logs/
networks:
- 1panel-network
labels:
createdBy: Developer
networks:
1panel-network:
external: true

View File

@@ -2,12 +2,13 @@ package common
// 添加新的上游通道时,需要添加这里
var supplierCode2Name = map[string]string{
"KF": "快付支付",
"WEIXIN": "官方微信",
"ALIPAY": "官方支付宝",
"DAILI": "代丽支付",
//"KF": "快付支付",
//"WEIXIN": "官方微信",
//"ALIPAY": "官方支付宝",
//"DAILI": "代丽支付",
"APPLE": "苹果充值卡",
"MF178": "蜜蜂178卡密",
"TMALLGAME": "天猫游戏充值",
}
func GetSupplierMap() map[string]string {

View File

@@ -5,7 +5,7 @@ import (
"boss/internal/datas"
"boss/internal/models/merchant"
"boss/internal/models/payfor"
road2 "boss/internal/models/road"
"boss/internal/models/road"
"boss/internal/models/system"
"boss/internal/service"
"strconv"
@@ -130,6 +130,7 @@ func (c *AddController) AddRoad() {
params := strings.TrimSpace(c.GetString("params"))
productCode := strings.TrimSpace(c.GetString("productCode"))
paymentHtml := strings.TrimSpace(c.GetString("paymentHtml"))
transactionType := strings.TrimSpace(c.GetString("transactionType"))
se := new(service.AddService)
dataJSON := se.AddRoad(
@@ -148,8 +149,8 @@ func (c *AddController) AddRoad() {
params,
productCode,
paymentHtml,
transactionType,
)
c.GenerateJSON(dataJSON)
}
@@ -307,8 +308,8 @@ func (c *AddController) AddMerchantPayType() {
merchantDeployInfo.LoanDays = i
merchantDeployInfo.UnfreezeHour = j
merchantDeployInfo.RollRoadName = rollPoolRoad
roadInfo := road2.GetRoadInfoByName(singleRoad)
rollPoolInfo := road2.GetRoadPoolByName(rollPoolRoad)
roadInfo := road.GetRoadInfoByName(singleRoad)
rollPoolInfo := road.GetRoadPoolByName(rollPoolRoad)
merchantDeployInfo.SingleRoadUid = roadInfo.RoadUid
merchantDeployInfo.RollRoadCode = rollPoolInfo.RoadPoolCode
merchantDeployInfo.CreateTime = time.Now()

View File

@@ -1,16 +1,16 @@
package controllers
import (
common2 "boss/internal/common"
"boss/internal/common"
"boss/internal/datas"
accounts2 "boss/internal/models/accounts"
"boss/internal/models/accounts"
"boss/internal/models/agent"
merchant2 "boss/internal/models/merchant"
"boss/internal/models/merchant"
"boss/internal/models/notify"
order2 "boss/internal/models/order"
"boss/internal/models/order"
"boss/internal/models/payfor"
road2 "boss/internal/models/road"
system2 "boss/internal/models/system"
"boss/internal/models/road"
"boss/internal/models/system"
"boss/internal/models/user"
"boss/internal/service"
"fmt"
@@ -67,7 +67,7 @@ func (c *GetController) GetMenu() {
params := make(map[string]string)
params["first_menu__icontains"] = firstMenuSearch
c.GetCutPage(system2.GetMenuLenByMap(params))
c.GetCutPage(system.GetMenuLenByMap(params))
menuDataJSON := new(datas.MenuDataJSON)
menuDataJSON.DisplayCount = c.DisplayCount
@@ -76,15 +76,15 @@ func (c *GetController) GetMenu() {
if c.Offset < 0 {
menuDataJSON.Code = -1
menuDataJSON.MenuList = make([]system2.MenuInfo, 0)
menuDataJSON.MenuList = make([]system.MenuInfo, 0)
c.GenerateJSON(menuDataJSON)
return
}
menuInfoList := system2.GetMenuOffsetByMap(params, c.DisplayCount, c.Offset)
sort.Sort(system2.MenuInfoSlice(menuInfoList))
menuInfoList := system.GetMenuOffsetByMap(params, c.DisplayCount, c.Offset)
sort.Sort(system.MenuInfoSlice(menuInfoList))
for i, m := range menuInfoList {
secondMenuInfoList := system2.GetSecondMenuListByFirstMenuUid(m.MenuUid)
secondMenuInfoList := system.GetSecondMenuListByFirstMenuUid(m.MenuUid)
smenus := ""
for j := 0; j < len(secondMenuInfoList); j++ {
smenus += secondMenuInfoList[j].SecondMenu
@@ -108,14 +108,14 @@ func (c *GetController) GetMenu() {
func (c *GetController) GetFirstMenu() {
menuDataJSON := new(datas.MenuDataJSON)
menuList := system2.GetMenuAll()
menuList := system.GetMenuAll()
if len(menuList) == 0 {
menuDataJSON.Code = -1
} else {
menuDataJSON.Code = 200
}
sort.Sort(system2.MenuInfoSlice(menuList))
sort.Sort(system.MenuInfoSlice(menuList))
menuDataJSON.MenuList = menuList
c.GenerateJSON(menuDataJSON)
}
@@ -129,7 +129,7 @@ func (c *GetController) GetSecondMenu() {
params := make(map[string]string)
params["first_menu__icontains"] = firstMenuSearch
params["second_menu__icontains"] = secondMenuSearch
l := system2.GetSecondMenuLenByMap(params)
l := system.GetSecondMenuLenByMap(params)
c.GetCutPage(l)
@@ -141,13 +141,13 @@ func (c *GetController) GetSecondMenu() {
secondMenuDataJSON.TotalPage = c.TotalPage
if c.Offset < 0 {
secondMenuDataJSON.SecondMenuList = make([]system2.SecondMenuInfo, 0)
secondMenuDataJSON.SecondMenuList = make([]system.SecondMenuInfo, 0)
c.GenerateJSON(secondMenuDataJSON)
return
}
secondMenuList := system2.GetSecondMenuByMap(params, c.DisplayCount, c.Offset)
sort.Sort(system2.SecondMenuSlice(secondMenuList))
secondMenuList := system.GetSecondMenuByMap(params, c.DisplayCount, c.Offset)
sort.Sort(system.SecondMenuSlice(secondMenuList))
secondMenuDataJSON.SecondMenuList = secondMenuList
secondMenuDataJSON.StartIndex = c.Offset
@@ -163,7 +163,7 @@ func (c *GetController) GetSecondMenus() {
secondMenuDataJSON := new(datas.SecondMenuDataJSON)
secondMenuList := system2.GetSecondMenuListByFirstMenuUid(firstMenuUid)
secondMenuList := system.GetSecondMenuListByFirstMenuUid(firstMenuUid)
secondMenuDataJSON.Code = 200
secondMenuDataJSON.SecondMenuList = secondMenuList
@@ -174,12 +174,12 @@ func (c *GetController) GetOneMenu() {
menuUid := c.GetString("menuUid")
dataJSON := new(datas.MenuDataJSON)
menuInfo := system2.GetMenuInfoByMenuUid(menuUid)
menuInfo := system.GetMenuInfoByMenuUid(menuUid)
if menuInfo.MenuUid == "" {
dataJSON.Code = -1
dataJSON.Msg = "该菜单项不存在"
} else {
dataJSON.MenuList = make([]system2.MenuInfo, 0)
dataJSON.MenuList = make([]system.MenuInfo, 0)
dataJSON.MenuList = append(dataJSON.MenuList, menuInfo)
dataJSON.Code = 200
}
@@ -195,7 +195,7 @@ func (c *GetController) GetPowerItem() {
params["power_uid__icontains"] = powerID
params["power_item_icontains"] = powerItem
l := system2.GetPowerItemLenByMap(params)
l := system.GetPowerItemLenByMap(params)
c.GetCutPage(l)
@@ -206,14 +206,14 @@ func (c *GetController) GetPowerItem() {
powerItemDataJSON.TotalPage = c.TotalPage
if c.Offset < 0 {
powerItemDataJSON.PowerItemList = make([]system2.PowerInfo, 0)
powerItemDataJSON.PowerItemList = make([]system.PowerInfo, 0)
c.GenerateJSON(powerItemDataJSON)
return
}
powerItemDataJSON.StartIndex = c.Offset
powerItemList := system2.GetPowerItemByMap(params, c.DisplayCount, c.Offset)
sort.Sort(system2.PowerInfoSlice(powerItemList))
powerItemList := system.GetPowerItemByMap(params, c.DisplayCount, c.Offset)
sort.Sort(system.PowerInfoSlice(powerItemList))
powerItemDataJSON.PowerItemList = powerItemList
c.GenerateJSON(powerItemDataJSON)
@@ -225,7 +225,7 @@ func (c *GetController) GetRole() {
params := make(map[string]string)
params["role_name__icontains"] = roleName
l := system2.GetRoleLenByMap(params)
l := system.GetRoleLenByMap(params)
c.GetCutPage(l)
@@ -236,18 +236,18 @@ func (c *GetController) GetRole() {
roleInfoDataJSON.TotalPage = c.TotalPage
if c.Offset < 0 {
roleInfoDataJSON.RoleInfoList = make([]system2.RoleInfo, 0)
roleInfoDataJSON.RoleInfoList = make([]system.RoleInfo, 0)
c.GenerateJSON(roleInfoDataJSON)
return
}
roleInfoDataJSON.StartIndex = c.Offset
roleInfoDataJSON.RoleInfoList = system2.GetRoleByMap(params, c.DisplayCount, c.Offset)
roleInfoDataJSON.RoleInfoList = system.GetRoleByMap(params, c.DisplayCount, c.Offset)
c.GenerateJSON(roleInfoDataJSON)
}
func (c *GetController) GetAllRole() {
roleInfoDataJSON := new(datas.RoleInfoDataJSON)
roleInfoList := system2.GetRole()
roleInfoList := system.GetRole()
fmt.Println(roleInfoList)
if len(roleInfoList) == 0 {
roleInfoDataJSON.Code = -1
@@ -260,13 +260,13 @@ func (c *GetController) GetAllRole() {
func (c *GetController) GetDeployTree() {
roleUid := strings.TrimSpace(c.GetString("roleUid"))
roleInfo := system2.GetRoleByRoleUid(roleUid)
roleInfo := system.GetRoleByRoleUid(roleUid)
allFirstMenu := system2.GetMenuAll()
sort.Sort(system2.MenuInfoSlice(allFirstMenu))
allSecondMenu := system2.GetSecondMenuList()
sort.Sort(system2.SecondMenuSlice(allSecondMenu))
allPower := system2.GetPower()
allFirstMenu := system.GetMenuAll()
sort.Sort(system.MenuInfoSlice(allFirstMenu))
allSecondMenu := system.GetSecondMenuList()
sort.Sort(system.SecondMenuSlice(allSecondMenu))
allPower := system.GetPower()
deployTreeJSON := new(datas.DeployTreeJSON)
deployTreeJSON.Code = 200
@@ -336,7 +336,7 @@ func (c *GetController) GetEditOperator() {
userInfo := user.GetUserInfoByUserID(userId)
fmt.Println(userInfo)
editOperatorDataJSON.OperatorList = append(editOperatorDataJSON.OperatorList, userInfo)
editOperatorDataJSON.RoleList = system2.GetRole()
editOperatorDataJSON.RoleList = system.GetRole()
editOperatorDataJSON.Code = 200
c.GenerateJSON(editOperatorDataJSON)
@@ -347,7 +347,7 @@ func (c *GetController) GetBankCard() {
params := make(map[string]string)
params["account_name__icontains"] = accountNameSearch
l := system2.GetBankCardLenByMap(params)
l := system.GetBankCardLenByMap(params)
c.GetCutPage(l)
bankCardDataJSON := new(datas.BankCardDataJSON)
@@ -357,19 +357,19 @@ func (c *GetController) GetBankCard() {
bankCardDataJSON.TotalPage = c.TotalPage
if c.Offset < 0 {
bankCardDataJSON.BankCardInfoList = make([]system2.BankCardInfo, 0)
bankCardDataJSON.BankCardInfoList = make([]system.BankCardInfo, 0)
c.GenerateJSON(bankCardDataJSON)
return
}
bankCardDataJSON.StartIndex = c.Offset
bankCardDataJSON.BankCardInfoList = system2.GetBankCardByMap(params, c.DisplayCount, c.Offset)
bankCardDataJSON.BankCardInfoList = system.GetBankCardByMap(params, c.DisplayCount, c.Offset)
c.GenerateJSON(bankCardDataJSON)
}
func (c *GetController) GetOneBankCard() {
uid := strings.TrimSpace(c.GetString("uid"))
bankCardInfo := system2.GetBankCardByUid(uid)
bankCardInfo := system.GetBankCardByUid(uid)
bankCardDataJSON := new(datas.BankCardDataJSON)
bankCardDataJSON.Code = -1
@@ -396,7 +396,7 @@ func (c *GetController) GetRoad() {
params["road_uid"] = roadUid
params["pay_type"] = payType
l := road2.GetRoadLenByMap(params)
l := road.GetRoadLenByMap(params)
c.GetCutPage(l)
roadDataJSON := new(datas.RoadDataJSON)
@@ -406,14 +406,14 @@ func (c *GetController) GetRoad() {
roadDataJSON.TotalPage = c.TotalPage
if c.Offset < 0 {
roadDataJSON.RoadInfoList = make([]road2.RoadInfo, 0)
roadDataJSON.RoadInfoList = make([]road.RoadInfo, 0)
c.GenerateJSON(roadDataJSON)
return
}
roadDataJSON.StartIndex = c.Offset
roadDataJSON.RoadInfoList = road2.GetRoadInfoByMap(params, c.DisplayCount, c.Offset)
roadDataJSON.RoadPool = road2.GetRoadPoolByRoadPoolCode(roadPoolCode)
roadDataJSON.RoadInfoList = road.GetRoadInfoByMap(params, c.DisplayCount, c.Offset)
roadDataJSON.RoadPool = road.GetRoadPoolByRoadPoolCode(roadPoolCode)
c.GenerateJSON(roadDataJSON)
}
@@ -423,7 +423,7 @@ func (c *GetController) GetAllRoad() {
params["road_name__icontains"] = roadName
roadDataJSON := new(datas.RoadDataJSON)
roadInfoList := road2.GetAllRoad(params)
roadInfoList := road.GetAllRoad(params)
roadDataJSON.Code = 200
roadDataJSON.RoadInfoList = roadInfoList
@@ -434,7 +434,7 @@ func (c *GetController) GetAllRoad() {
func (c *GetController) GetOneRoad() {
roadUid := strings.TrimSpace(c.GetString("roadUid"))
roadInfo := road2.GetRoadInfoByRoadUid(roadUid)
roadInfo := road.GetRoadInfoByRoadUid(roadUid)
roadDataJSON := new(datas.RoadDataJSON)
roadDataJSON.Code = -1
@@ -442,7 +442,7 @@ func (c *GetController) GetOneRoad() {
roadDataJSON.RoadInfoList = append(roadDataJSON.RoadInfoList, roadInfo)
roadDataJSON.Code = 200
} else {
roadDataJSON.RoadInfoList = make([]road2.RoadInfo, 0)
roadDataJSON.RoadInfoList = make([]road.RoadInfo, 0)
}
c.GenerateJSON(roadDataJSON)
@@ -456,7 +456,7 @@ func (c *GetController) GetRoadPool() {
params["road_pool_name__icontains"] = roadPoolName
params["road_pool_code__icontains"] = roadPoolCode
l := road2.GetRoadPoolLenByMap(params)
l := road.GetRoadPoolLenByMap(params)
c.GetCutPage(l)
roadPoolDataJSON := new(datas.RoadPoolDataJSON)
@@ -466,13 +466,13 @@ func (c *GetController) GetRoadPool() {
roadPoolDataJSON.TotalPage = c.TotalPage
if c.Offset < 0 {
roadPoolDataJSON.RoadPoolInfoList = make([]road2.RoadPoolInfo, 0)
roadPoolDataJSON.RoadPoolInfoList = make([]road.RoadPoolInfo, 0)
c.GenerateJSON(roadPoolDataJSON)
return
}
roadPoolDataJSON.StartIndex = c.Offset
roadPoolDataJSON.RoadPoolInfoList = road2.GetRoadPoolByMap(params, c.DisplayCount, c.Offset)
roadPoolDataJSON.RoadPoolInfoList = road.GetRoadPoolByMap(params, c.DisplayCount, c.Offset)
c.GenerateJSON(roadPoolDataJSON)
}
@@ -483,7 +483,7 @@ func (c *GetController) GetAllRollPool() {
roadPoolDataJSON := new(datas.RoadPoolDataJSON)
roadPoolDataJSON.Code = 200
roadPoolDataJSON.RoadPoolInfoList = road2.GetAllRollPool(params)
roadPoolDataJSON.RoadPoolInfoList = road.GetAllRollPool(params)
c.GenerateJSON(roadPoolDataJSON)
}
@@ -495,7 +495,7 @@ func (c *GetController) GetMerchant() {
params["merchant_name__icontains"] = merchantName
params["merchant_uid__icontains"] = merchantNo
l := merchant2.GetMerchantLenByMap(params)
l := merchant.GetMerchantLenByMap(params)
c.GetCutPage(l)
merchantDataJSON := new(datas.MerchantDataJSON)
@@ -505,20 +505,20 @@ func (c *GetController) GetMerchant() {
merchantDataJSON.TotalPage = c.TotalPage
if c.Offset < 0 {
merchantDataJSON.MerchantList = make([]merchant2.MerchantInfo, 0)
merchantDataJSON.MerchantList = make([]merchant.MerchantInfo, 0)
c.GenerateJSON(merchantDataJSON)
return
}
merchantDataJSON.StartIndex = c.Offset
merchantDataJSON.MerchantList = merchant2.GetMerchantListByMap(params, c.DisplayCount, c.Offset)
merchantDataJSON.MerchantList = merchant.GetMerchantListByMap(params, c.DisplayCount, c.Offset)
c.GenerateJSON(merchantDataJSON)
}
func (c *GetController) GetAllMerchant() {
merchantDataJSON := new(datas.MerchantDataJSON)
merchantDataJSON.Code = 200
merchantDataJSON.MerchantList = merchant2.GetAllMerchant()
merchantDataJSON.MerchantList = merchant.GetAllMerchant()
c.GenerateJSON(merchantDataJSON)
}
@@ -532,7 +532,7 @@ func (c *GetController) GetOneMerchant() {
return
}
merchantInfo := merchant2.GetMerchantByUid(merchantUid)
merchantInfo := merchant.GetMerchantByUid(merchantUid)
merchantDataJSON.Code = 200
merchantDataJSON.MerchantList = append(merchantDataJSON.MerchantList, merchantInfo)
@@ -545,7 +545,7 @@ func (c *GetController) GetOneMerchantDeploy() {
merchantDeployDataJSON := new(datas.MerchantDeployDataJSON)
merchantDeployInfo := merchant2.GetMerchantDeployByUidAndPayType(merchantNo, payType)
merchantDeployInfo := merchant.GetMerchantDeployByUidAndPayType(merchantNo, payType)
if merchantDeployInfo.Status == "active" {
merchantDeployDataJSON.Code = 200
@@ -562,7 +562,7 @@ func (c *GetController) GetAllAccount() {
accountDataJSON := new(datas.AccountDataJSON)
accountDataJSON.Code = 200
accountDataJSON.AccountList = accounts2.GetAllAccount()
accountDataJSON.AccountList = accounts.GetAllAccount()
c.GenerateJSON(accountDataJSON)
}
@@ -575,7 +575,7 @@ func (c *GetController) GetAccount() {
params["account_name__icontains"] = accountName
params["account_uid_icontains"] = accountUid
l := accounts2.GetAccountLenByMap(params)
l := accounts.GetAccountLenByMap(params)
c.GetCutPage(l)
accountDataJSON := new(datas.AccountDataJSON)
@@ -585,13 +585,13 @@ func (c *GetController) GetAccount() {
accountDataJSON.TotalPage = c.TotalPage
if c.Offset < 0 {
accountDataJSON.AccountList = make([]accounts2.AccountInfo, 0)
accountDataJSON.AccountList = make([]accounts.AccountInfo, 0)
c.GenerateJSON(accountDataJSON)
return
}
accountDataJSON.StartIndex = c.Offset
accountDataJSON.AccountList = accounts2.GetAccountByMap(params, c.DisplayCount, c.Offset)
accountDataJSON.AccountList = accounts.GetAccountByMap(params, c.DisplayCount, c.Offset)
c.GenerateJSON(accountDataJSON)
}
@@ -601,7 +601,7 @@ func (c *GetController) GetOneAccount() {
//new一个accountDataJSON结构体对象用来做jsonp返回
accountDataJSON := new(datas.AccountDataJSON)
//用accountuid作为过滤字段从数据库中读取一条信息
accountInfo := accounts2.GetAccountByUid(accountUid)
accountInfo := accounts.GetAccountByUid(accountUid)
//code初始值为200
accountDataJSON.Code = 200
//将从数据库读出来的数据插入到accountList数组中
@@ -619,13 +619,13 @@ func (c *GetController) GetAccountHistory() {
switch operatorType {
case "plus-amount":
operatorType = common2.PLUS_AMOUNT
operatorType = common.PLUS_AMOUNT
case "sub-amount":
operatorType = common2.SUB_AMOUNT
operatorType = common.SUB_AMOUNT
case "freeze-amount":
operatorType = common2.FREEZE_AMOUNT
operatorType = common.FREEZE_AMOUNT
case "unfreeze-amount":
operatorType = common2.UNFREEZE_AMOUNT
operatorType = common.UNFREEZE_AMOUNT
}
params := make(map[string]string)
params["account_name__icontains"] = accountName
@@ -634,7 +634,7 @@ func (c *GetController) GetAccountHistory() {
params["create_time__gte"] = startTime
params["create_time__lte"] = endTime
l := accounts2.GetAccountHistoryLenByMap(params)
l := accounts.GetAccountHistoryLenByMap(params)
c.GetCutPage(l)
accountHistoryDataJSON := new(datas.AccountHistoryDataJSON)
@@ -644,13 +644,13 @@ func (c *GetController) GetAccountHistory() {
accountHistoryDataJSON.TotalPage = c.TotalPage
if c.Offset < 0 {
accountHistoryDataJSON.AccountHistoryList = make([]accounts2.AccountHistoryInfo, 0)
accountHistoryDataJSON.AccountHistoryList = make([]accounts.AccountHistoryInfo, 0)
c.GenerateJSON(accountHistoryDataJSON)
return
}
accountHistoryDataJSON.StartIndex = c.Offset
accountHistoryDataJSON.AccountHistoryList = accounts2.GetAccountHistoryByMap(params, c.DisplayCount, c.Offset)
accountHistoryDataJSON.AccountHistoryList = accounts.GetAccountHistoryByMap(params, c.DisplayCount, c.Offset)
c.GenerateJSON(accountHistoryDataJSON)
}
@@ -692,7 +692,7 @@ func (c *GetController) GetAllAgent() {
}
func (c *GetController) GetProduct() {
supplierCode2Name := common2.GetSupplierMap()
supplierCode2Name := common.GetSupplierMap()
productDataJSON := new(datas.ProductDataJSON)
productDataJSON.Code = 200
productDataJSON.ProductMap = supplierCode2Name
@@ -707,7 +707,7 @@ func (c *GetController) GetAgentToMerchant() {
params["belong_agent_uid"] = agentUid
params["merchant_uid"] = merchantUid
l := merchant2.GetMerchantLenByParams(params)
l := merchant.GetMerchantLenByParams(params)
c.GetCutPage(l)
merchantDataJSON := new(datas.MerchantDataJSON)
@@ -717,9 +717,9 @@ func (c *GetController) GetAgentToMerchant() {
merchantDataJSON.TotalPage = c.TotalPage
if c.Offset < 0 {
merchantDataJSON.MerchantList = make([]merchant2.MerchantInfo, 0)
merchantDataJSON.MerchantList = make([]merchant.MerchantInfo, 0)
} else {
merchantDataJSON.MerchantList = merchant2.GetMerchantByParams(params, c.DisplayCount, c.Offset)
merchantDataJSON.MerchantList = merchant.GetMerchantByParams(params, c.DisplayCount, c.Offset)
}
c.GenerateJSON(merchantDataJSON)
@@ -758,7 +758,7 @@ func (c *GetController) GetOrder() {
case "refund":
params["refund"] = "yes"
}
l := order2.GetOrderLenByMap(params)
l := order.GetOrderLenByMap(params)
c.GetCutPage(l)
orderDataJSON := new(datas.OrderDataJSON)
orderDataJSON.DisplayCount = c.DisplayCount
@@ -766,17 +766,17 @@ func (c *GetController) GetOrder() {
orderDataJSON.CurrentPage = c.CurrentPage
orderDataJSON.TotalPage = c.TotalPage
if c.Offset < 0 {
orderDataJSON.OrderList = make([]order2.OrderInfo, 0)
orderDataJSON.OrderList = make([]order.OrderInfo, 0)
c.GenerateJSON(orderDataJSON)
return
}
orderDataJSON.StartIndex = c.Offset
orderDataJSON.OrderList = order2.GetOrderByMap(params, c.DisplayCount, c.Offset)
orderDataJSON.OrderList = order.GetOrderByMap(params, c.DisplayCount, c.Offset)
// orderDataJSON.OrderProfitSummary = order.ProfitSummary{
// TotalProfit: service.QueryTotalSummary(params),
// TodayProfit: service.QueryTodaySummary(params),
// }
params["status"] = common2.OrderStatusSuccess
params["status"] = common.OrderStatusSuccess
c.GenerateJSON(orderDataJSON)
}
@@ -813,15 +813,15 @@ func (c *GetController) GetOrderSummary() {
case "refund":
params["refund"] = "yes"
}
l := order2.GetOrderLenByMap(params)
l := order.GetOrderLenByMap(params)
c.GetCutPage(l)
orderDataJSON := new(datas.OrderDataSummaryJSON)
// orderDataJSON.OrderList = order.GetOrderByMap(params, c.DisplayCount, c.Offset)
orderDataJSON.OrderProfitSummary = order2.ProfitSummary{
orderDataJSON.OrderProfitSummary = order.ProfitSummary{
TotalProfit: service.QueryTotalSummary(params),
TodayProfit: service.QueryTodaySummary(params),
}
params["status"] = common2.OrderStatusSuccess
params["status"] = common.OrderStatusSuccess
c.GenerateJSON(orderDataJSON)
}
@@ -829,7 +829,7 @@ func (c *GetController) GetOrderSummary() {
func (c *GetController) GetOneOrder() {
bankOrderId := strings.TrimSpace(c.GetString("bankOrderId"))
orderDataJSON := new(datas.OrderDataJSON)
orderInfo := order2.GetOneOrder(bankOrderId)
orderInfo := order.GetOneOrder(bankOrderId)
orderDataJSON.Code = 200
orderDataJSON.OrderList = append(orderDataJSON.OrderList, orderInfo)
@@ -862,7 +862,7 @@ func (c *GetController) GetOrderProfit() {
params["status"] = status
params["pay_product_code"] = supplierUid
params["pay_type_code"] = payWayCode
orderList := order2.GetAllOrderByMap(map[string]string{"road_uid": roadUid})
orderList := order.GetAllOrderByMap(map[string]string{"road_uid": roadUid})
if len(orderList) > 0 {
orderIDList := make([]string, len(orderList))
for _, info := range orderList {
@@ -870,7 +870,7 @@ func (c *GetController) GetOrderProfit() {
}
params["bank_order_id__in"] = orderIDList
}
l := order2.GetOrderProfitLenByMap(params)
l := order.GetOrderProfitLenByMap(params)
c.GetCutPage(l)
listDataJSON := new(datas.ListDataJSON)
@@ -880,13 +880,13 @@ func (c *GetController) GetOrderProfit() {
listDataJSON.TotalPage = c.TotalPage
if c.Offset < 0 {
listDataJSON.List = make([]order2.OrderProfitInfo, 0)
listDataJSON.List = make([]order.OrderProfitInfo, 0)
c.GenerateJSON(listDataJSON)
return
}
listDataJSON.StartIndex = c.Offset
listDataJSON.List = order2.GetOrderProfitByMap(params, c.DisplayCount, c.Offset)
listDataJSON.List = order.GetOrderProfitByMap(params, c.DisplayCount, c.Offset)
c.GenerateJSON(listDataJSON)
}
@@ -1013,7 +1013,7 @@ func (c *GetController) GetProfit() {
profitListJSON := new(datas.ProfitListJSON)
profitListJSON.Code = 200
profitListJSON.ProfitList = order2.GetPlatformProfitByMap(params)
profitListJSON.ProfitList = order.GetPlatformProfitByMap(params)
profitListJSON.TotalAmount = 0.00
profitListJSON.PlatformTotalProfit = 0.00

View File

@@ -4,7 +4,7 @@ import (
"boss/internal/common"
"boss/internal/datas"
"boss/internal/models/user"
utils2 "boss/internal/utils"
"boss/internal/utils"
"boss/internal/utils/mfa"
"github.com/beego/beego/v2/core/logs"
"github.com/beego/beego/v2/core/validation"
@@ -58,7 +58,7 @@ func (c *LoginController) Login() {
return
}
codeInterface := c.GetSession("verifyCode")
if userInfo.Passwd != utils2.GetMD5Upper(passWD) {
if userInfo.Passwd != utils.GetMD5Upper(passWD) {
dataJSON.Key = "passWD"
dataJSON.Msg = "密码不正确!"
dataJSON.Code = -1
@@ -108,7 +108,7 @@ func (c *LoginController) Logout() {
// GetVerifyImg 验证码获取如果获取成功并将验证码存到session中
func (c *LoginController) GetVerifyImg() {
Image, verifyCode := utils2.GenerateVerifyCodeImg()
Image, verifyCode := utils.GenerateVerifyCodeImg()
if Image == nil || len(verifyCode) != common.VERIFY_CODE_LEN {
logs.Error("获取验证码图片失败!")
} else {

View File

@@ -105,6 +105,42 @@ func (c *PageAuthController) RechargeAppleAccountPage() {
c.TplName = "apple-card/account.html"
}
func (c *PageAuthController) RechargeTMallGameAccountPage() {
token := ""
// 获取当前时间的时间戳
currentTime := time.Now()
targetMinute := (currentTime.Minute() / 10) * 10
targetTime := time.Date(currentTime.Year(), currentTime.Month(), currentTime.Day(), currentTime.Hour(), targetMinute, 0, 0, currentTime.Location())
now := strconv.Itoa(int(targetTime.Unix()))
secretCfg := config.GetSecret()
tokenB, err := utils.AesCBCEncrypt([]byte(now), []byte(secretCfg.Key), []byte(secretCfg.IV))
if err == nil {
//base64编码
token = base64.URLEncoding.EncodeToString(tokenB)
}
c.Data["token"] = token
c.Data["portalHost"] = config.GetPortalHost()
c.TplName = "t-mall-game/account.html"
}
func (c *PageAuthController) RechargeTMallGameOrderPage() {
token := ""
// 获取当前时间的时间戳
currentTime := time.Now()
targetMinute := (currentTime.Minute() / 10) * 10
targetTime := time.Date(currentTime.Year(), currentTime.Month(), currentTime.Day(), currentTime.Hour(), targetMinute, 0, 0, currentTime.Location())
now := strconv.Itoa(int(targetTime.Unix()))
secretCfg := config.GetSecret()
tokenB, err := utils.AesCBCEncrypt([]byte(now), []byte(secretCfg.Key), []byte(secretCfg.IV))
if err == nil {
//base64编码
token = base64.URLEncoding.EncodeToString(tokenB)
}
c.Data["token"] = token
c.Data["portalHost"] = config.GetPortalHost()
c.TplName = "t-mall-game/recharge-order.html"
}
func (c *PageAuthController) OrderSummary() {
token := ""
// 获取当前时间的时间戳

View File

@@ -1,14 +1,5 @@
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/internal/service"
"github.com/beego/beego/v2/server/web"

View File

@@ -2,7 +2,7 @@ package controllers
import (
"boss/internal/datas"
service2 "boss/internal/service"
"boss/internal/service"
"boss/internal/utils/valid"
)
@@ -20,7 +20,7 @@ func (c *UpdateController) UpdateMerchantPassword() {
return
}
// 判断totp是不是正确
if service2.ValidTotp(userID, totpCode) {
if service.ValidTotp(userID, totpCode) {
dataJSON.Code = -1
dataJSON.Msg = "二次验证错误"
c.GenerateJSON(dataJSON)
@@ -38,7 +38,7 @@ func (c *UpdateController) UpdateMerchantPassword() {
} else {
dataJSON.Code = 200
dataJSON.Msg = "密码修改成功!"
service2.UpdateMerchantPassword(merchantUid, totpCode)
service.UpdateMerchantPassword(merchantUid, totpCode)
}
c.GenerateJSON(dataJSON)
}

View File

@@ -1,3 +0,0 @@
{
"100": 200
}

View File

@@ -1,13 +1,13 @@
package datas
import (
accounts2 "boss/internal/models/accounts"
"boss/internal/models/accounts"
"boss/internal/models/agent"
merchant2 "boss/internal/models/merchant"
order2 "boss/internal/models/order"
"boss/internal/models/merchant"
"boss/internal/models/order"
"boss/internal/models/payfor"
road2 "boss/internal/models/road"
system2 "boss/internal/models/system"
"boss/internal/models/road"
"boss/internal/models/system"
"boss/internal/models/user"
)
@@ -34,7 +34,7 @@ type MenuDataJSON struct {
TotalPage int
Code int
Msg string
MenuList []system2.MenuInfo
MenuList []system.MenuInfo
}
type SecondMenuDataJSON struct {
@@ -44,7 +44,7 @@ type SecondMenuDataJSON struct {
TotalPage int
Code int
Msg string
SecondMenuList []system2.SecondMenuInfo
SecondMenuList []system.SecondMenuInfo
}
type PowerItemDataJSON struct {
@@ -54,7 +54,7 @@ type PowerItemDataJSON struct {
TotalPage int
Code int
Msg string
PowerItemList []system2.PowerInfo
PowerItemList []system.PowerInfo
}
type RoleInfoDataJSON struct {
@@ -64,18 +64,18 @@ type RoleInfoDataJSON struct {
TotalPage int
Code int
Msg string
RoleInfoList []system2.RoleInfo
RoleInfoList []system.RoleInfo
}
type DeployTreeJSON struct {
Msg string
Code int
Key string
AllFirstMenu []system2.MenuInfo
AllFirstMenu []system.MenuInfo
ShowFirstMenuUid map[string]bool
AllSecondMenu []system2.SecondMenuInfo
AllSecondMenu []system.SecondMenuInfo
ShowSecondMenuUid map[string]bool
AllPower []system2.PowerInfo
AllPower []system.PowerInfo
ShowPowerUid map[string]bool
}
@@ -93,7 +93,7 @@ type EditOperatorDataJSON struct {
Code int
Msg string
OperatorList []user.UserInfo
RoleList []system2.RoleInfo
RoleList []system.RoleInfo
}
type BankCardDataJSON struct {
@@ -103,7 +103,7 @@ type BankCardDataJSON struct {
DisplayCount int
CurrentPage int
TotalPage int
BankCardInfoList []system2.BankCardInfo
BankCardInfoList []system.BankCardInfo
}
type RoadDataJSON struct {
@@ -113,8 +113,8 @@ type RoadDataJSON struct {
DisplayCount int
CurrentPage int
TotalPage int
RoadInfoList []road2.RoadInfo
RoadPool road2.RoadPoolInfo
RoadInfoList []road.RoadInfo
RoadPool road.RoadPoolInfo
}
type RoadPoolDataJSON struct {
@@ -124,7 +124,7 @@ type RoadPoolDataJSON struct {
DisplayCount int
CurrentPage int
TotalPage int
RoadPoolInfoList []road2.RoadPoolInfo
RoadPoolInfoList []road.RoadPoolInfo
}
type MerchantDataJSON struct {
@@ -134,13 +134,13 @@ type MerchantDataJSON struct {
DisplayCount int
CurrentPage int
TotalPage int
MerchantList []merchant2.MerchantInfo
MerchantList []merchant.MerchantInfo
}
type MerchantDeployDataJSON struct {
Code int
Msg string
MerchantDeploy merchant2.MerchantDeployInfo
MerchantDeploy merchant.MerchantDeployInfo
}
type AccountDataJSON struct {
@@ -150,7 +150,7 @@ type AccountDataJSON struct {
DisplayCount int
CurrentPage int
TotalPage int
AccountList []accounts2.AccountInfo
AccountList []accounts.AccountInfo
}
type AccountHistoryDataJSON struct {
@@ -160,7 +160,7 @@ type AccountHistoryDataJSON struct {
DisplayCount int
CurrentPage int
TotalPage int
AccountHistoryList []accounts2.AccountHistoryInfo
AccountHistoryList []accounts.AccountHistoryInfo
}
type AgentDataJSON struct {
@@ -186,7 +186,7 @@ type OrderDataJSON struct {
DisplayCount int
CurrentPage int
TotalPage int
OrderList []order2.OrderInfo
OrderList []order.OrderInfo
//AllAmount float64
//SuccessRate string
NotifyUrl string
@@ -195,7 +195,7 @@ type OrderDataJSON struct {
type OrderDataSummaryJSON struct {
//AllAmount float64
//SuccessRate string
OrderProfitSummary order2.ProfitSummary `json:"OrderProfitSummary"`
OrderProfitSummary order.ProfitSummary `json:"OrderProfitSummary"`
}
type ListDataJSON struct {
@@ -205,7 +205,7 @@ type ListDataJSON struct {
DisplayCount int
CurrentPage int
TotalPage int
List []order2.OrderProfitInfo
List []order.OrderProfitInfo
AllAmount float64
SupplierProfit float64
AgentProfit float64
@@ -251,5 +251,5 @@ type ProfitListJSON struct {
AgentTotalProfit float64
Msg string
Code int
ProfitList []order2.PlatformProfit
ProfitList []order.PlatformProfit
}

View File

@@ -1,14 +1,4 @@
package agent
/***************************************************
** @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
****************************************************/
type AgentProfit struct {
}

View File

@@ -1,24 +1,14 @@
package models
/***************************************************
** @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
****************************************************/
import (
accounts2 "boss/internal/models/accounts"
"boss/internal/models/accounts"
"boss/internal/models/agent"
merchant2 "boss/internal/models/merchant"
"boss/internal/models/merchant"
"boss/internal/models/notify"
order2 "boss/internal/models/order"
"boss/internal/models/order"
"boss/internal/models/payfor"
road2 "boss/internal/models/road"
system2 "boss/internal/models/system"
"boss/internal/models/road"
"boss/internal/models/system"
"boss/internal/models/user"
"fmt"
"github.com/beego/beego/v2/client/orm"
@@ -42,23 +32,23 @@ func init() {
_ = orm.RegisterDataBase("default", "mysql", link)
orm.RegisterModel(
new(user.UserInfo),
new(system2.MenuInfo),
new(system2.SecondMenuInfo),
new(system2.PowerInfo),
new(system2.RoleInfo),
new(system2.BankCardInfo),
new(road2.RoadInfo),
new(road2.RoadPoolInfo),
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(merchant2.MerchantInfo),
new(merchant2.MerchantDeployInfo),
new(accounts2.AccountInfo),
new(accounts2.AccountHistoryInfo),
new(order2.OrderInfo),
new(order2.OrderProfitInfo),
new(order2.OrderSettleInfo),
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(merchant2.MerchantLoadInfo),
new(merchant.MerchantLoadInfo),
new(payfor.PayforInfo),
)
}

View File

@@ -1,15 +1,5 @@
package merchant
/***************************************************
** @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
****************************************************/
import (
"encoding/json"
"fmt"

View File

@@ -1,15 +1,5 @@
package merchant
/***************************************************
** @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
****************************************************/
import (
"github.com/beego/beego/v2/client/orm"
"github.com/beego/beego/v2/core/logs"

View File

@@ -1,15 +1,5 @@
package order
/***************************************************
** @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
****************************************************/
import (
"fmt"
"strconv"
@@ -143,7 +133,7 @@ func GetAllOrderByMap(params map[string]string) []OrderInfo {
// GetToDayInfo 获得今日数据
func GetToDayInfo() string {
var params map[string]string = map[string]string{}
var params = map[string]string{}
//params["create_time__gte"] = startTime
//params["create_time__lte"] = endTime
o := orm.NewOrm()

View File

@@ -2,7 +2,7 @@ package models
import (
"boss/internal/common"
accounts2 "boss/internal/models/accounts"
"boss/internal/models/accounts"
"context"
"errors"
"github.com/beego/beego/v2/client/orm"
@@ -17,7 +17,7 @@ func OperatorAccount(accountUid, operatorType string, amount float64) (string, b
if err := o.DoTx(func(ctx context.Context, txOrm orm.TxOrmer) error {
//处理事务
accountInfo := new(accounts2.AccountInfo)
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)
@@ -58,7 +58,7 @@ func OperatorAccount(accountUid, operatorType string, amount float64) (string, b
return err
}
//往account_history表中插入一条动账记录
accountHistory := accounts2.AccountHistoryInfo{AccountUid: accountUid, AccountName: accountInfo.AccountName, Type: operatorType,
accountHistory := accounts.AccountHistoryInfo{AccountUid: accountUid, AccountName: accountInfo.AccountName, Type: operatorType,
Amount: amount, Balance: accountInfo.Balance, CreateTime: time.Now(), UpdateTime: time.Now()}
if _, err := txOrm.Insert(&accountHistory); err != nil {

View File

@@ -1,7 +1,7 @@
package routers
import (
controllers2 "boss/internal/controllers"
"boss/internal/controllers"
"github.com/beego/beego/v2/server/web"
)
@@ -14,106 +14,106 @@ func init() {
test()
//beego.Router("/", &controllers.PageController{}, "*:Index")
//添加过滤函数
web.Router("/filter.html", &controllers2.FilterController{}, "*:Filter")
web.Router("/filter.html", &controllers.FilterController{}, "*:Filter")
//登录验证接口
web.Router("/login", &controllers2.LoginController{}, "*:Login")
web.Router("/logout", &controllers2.LoginController{}, "*:Logout")
web.Router("/getVerifyImg", &controllers2.LoginController{}, "*:GetVerifyImg")
web.Router("/update/password", &controllers2.UpdateController{}, "*:UpdatePassword")
web.Router("/freeze/operator", &controllers2.UpdateController{}, "*:FreezeOperator")
web.Router("/freeze/merchant", &controllers2.UpdateController{}, "*:UpdateMerchantStatus")
web.Router("/unfreeze/operator", &controllers2.UpdateController{}, "*:UnfreezeOperator")
web.Router("/unfreeze/merchant", &controllers2.UpdateController{}, "*:UpdateMerchantStatus")
web.Router("/edit/operator", &controllers2.UpdateController{}, "*:EditOperator")
web.Router("/add/menu", &controllers2.AddController{}, "*:AddMenu")
web.Router("/add/secondMenu", &controllers2.AddController{}, "*:AddSecondMenu")
web.Router("/add/power", &controllers2.AddController{}, "*:AddPower")
web.Router("/add/role", &controllers2.AddController{}, "*:AddRole")
web.Router("/add/operator", &controllers2.AddController{}, "*:AddOperator")
web.Router("/add/bankCard", &controllers2.AddController{}, "*:AddBankCard")
web.Router("/add/road", &controllers2.AddController{}, "*:AddRoad")
web.Router("/add/roadPool", &controllers2.AddController{}, "*:AddRoadPool")
web.Router("/add/merchant", &controllers2.AddController{}, "*:AddMerchant")
web.Router("/add/agent", &controllers2.AddController{}, "*:AddAgent")
web.Router("/add/merchant/deploy", &controllers2.AddController{}, "*:AddMerchantDeploy")
web.Router("/add/merchant/payType", &controllers2.AddController{}, "*:AddMerchantPayType")
web.Router("/add/payfor", &controllers2.AddController{}, "*:AddPayFor")
web.Router("/add/self/payfor", &controllers2.AddController{}, "*:AddSelfPayFor")
web.Router("/get/menu", &controllers2.GetController{}, "*:GetMenu")
web.Router("/get/secondMenu", &controllers2.GetController{}, "*:GetSecondMenu")
web.Router("/get/secondMenus", &controllers2.GetController{}, "*:GetSecondMenus")
web.Router("/get/oneMenu", &controllers2.GetController{}, "*:GetOneMenu")
web.Router("/get/firstMenu", &controllers2.GetController{}, "*:GetFirstMenu")
web.Router("/get/powerItem", &controllers2.GetController{}, "*:GetPowerItem")
web.Router("/get/role", &controllers2.GetController{}, "*:GetRole")
web.Router("/get/allRole", &controllers2.GetController{}, "*:GetAllRole")
web.Router("/get/deployTree", &controllers2.GetController{}, "*:GetDeployTree")
web.Router("/get/operator", &controllers2.GetController{}, "*:GetOperator")
web.Router("/get/oneOperator", &controllers2.GetController{}, "*:GetOneOperator")
web.Router("/get/editOperator", &controllers2.GetController{}, "*:GetEditOperator")
web.Router("/get/bankCard", &controllers2.GetController{}, "*:GetBankCard")
web.Router("/get/oneBankCard", &controllers2.GetController{}, "*:GetOneBankCard")
web.Router("/get/road", &controllers2.GetController{}, "*:GetRoad")
web.Router("/get/oneRoad", &controllers2.GetController{}, "*:GetOneRoad")
web.Router("/get/all/road", &controllers2.GetController{}, "*:GetAllRoad")
web.Router("/get/roadPool", &controllers2.GetController{}, "*:GetRoadPool")
web.Router("/get/all/roll/pool", &controllers2.GetController{}, "*:GetAllRollPool")
web.Router("/get/merchant", &controllers2.GetController{}, "*:GetMerchant")
web.Router("/get/all/merchant", &controllers2.GetController{}, "*:GetAllMerchant")
web.Router("/get/one/merchant", &controllers2.GetController{}, "*:GetOneMerchant")
web.Router("/get/one/merchant/deploy", &controllers2.GetController{}, "*:GetOneMerchantDeploy")
web.Router("/get/all/account", &controllers2.GetController{}, "*:GetAllAccount")
web.Router("/get/account", &controllers2.GetController{}, "*:GetAccount")
web.Router("/get/one/account", &controllers2.GetController{}, "*:GetOneAccount")
web.Router("/get/account/history", &controllers2.GetController{}, "*:GetAccountHistory")
web.Router("/get/agent", &controllers2.GetController{}, "*:GetAgent")
web.Router("/get/all/agent", &controllers2.GetController{}, "*:GetAllAgent")
web.Router("/get/product", &controllers2.GetController{}, "*:GetProduct")
web.Router("/get/order", &controllers2.GetController{}, "*:GetOrder")
web.Router("/get/orderSummary", &controllers2.GetController{}, "*:GetOrderSummary")
web.Router("/get/one/order", &controllers2.GetController{}, "*:GetOneOrder")
web.Router("/get/orderProfit", &controllers2.GetController{}, "*:GetOrderProfit")
web.Router("/get/payfor", &controllers2.GetController{}, "*:GetPayFor")
web.Router("/get/one/payfor", &controllers2.GetController{}, "*:GetOnePayFor")
web.Router("/get/balance", &controllers2.GetController{}, "*:GetBalance")
web.Router("/get/notify/bankOrderId/list", &controllers2.GetController{}, "*:GetNotifyBankOrderIdList")
web.Router("/get/agent/to/merchant", &controllers2.GetController{}, "*:GetAgentToMerchant")
web.Router("/get/profit", &controllers2.GetController{}, "*:GetProfit")
web.Router("/save/power", &controllers2.AddController{}, "*:SavePower")
web.Router("/save/roadUid", &controllers2.AddController{}, "*:SaveRoadUid")
web.Router("/up/menu", &controllers2.UpdateController{}, "*:UpMenu")
web.Router("/down/menu", &controllers2.UpdateController{}, "*:DownMenu")
web.Router("/up/secondMenu", &controllers2.UpdateController{}, "*:UpSecondMenu")
web.Router("/down/secondMenu", &controllers2.UpdateController{}, "*:DownSecondMenu")
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/orderSummary", &controllers.GetController{}, "*:GetOrderSummary")
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", &controllers2.UpdateController{}, "*:UpdateRoadStatus")
web.Router("/update/account/status", &controllers2.UpdateController{}, "*:UpdateAccountStatus")
web.Router("/update/agent/status", &controllers2.UpdateController{}, "*:UpdateAgentStatus")
web.Router("/update/order/status", &controllers2.UpdateController{}, "*:UpdateOrderStatus")
web.Router("/update/merchant/newPassword", &controllers2.UpdateController{}, "*:UpdateMerchantPassword")
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("/update/merchant/newPassword", &controllers.UpdateController{}, "*:UpdateMerchantPassword")
web.Router("/account/operator", &controllers2.UpdateController{}, "*:OperatorAccount")
web.Router("/account/operator", &controllers.UpdateController{}, "*:OperatorAccount")
web.Router("/delete/menu", &controllers2.DeleteController{}, "*:DeleteMenu")
web.Router("/delete/secondMenu", &controllers2.DeleteController{}, "*:DeleteSecondMenu")
web.Router("/delete/powerItem", &controllers2.DeleteController{}, "*:DeletePowerItem")
web.Router("/delete/role", &controllers2.DeleteController{}, "*:DeleteRole")
web.Router("/delete/operator", &controllers2.DeleteController{}, "*:DeleteOperator")
web.Router("/delete/bankCardRecord", &controllers2.DeleteController{}, "*:DeleteBankCardRecord")
web.Router("/delete/road", &controllers2.DeleteController{}, "*:DeleteRoad")
web.Router("/delete/roadPool", &controllers2.DeleteController{}, "*:DeleteRoadPool")
web.Router("/delete/merchant", &controllers2.DeleteController{}, "*:DeleteMerchant")
web.Router("/delete/account", &controllers2.DeleteController{}, "*:DeleteAccount")
web.Router("/delete/agent", &controllers2.DeleteController{}, "*:DeleteAgent")
web.Router("/delete/agent/merchant/relation", &controllers2.DeleteController{}, "*:DeleteAgentRelation")
web.Router("/reset/agent/password", &controllers2.UpdateController{}, "*:ResetAgentPassword")
web.Router("/supplier/order/query", &controllers2.SupplierQuery{}, "*:SupplierOrderQuery")
web.Router("/supplier/payfor/query", &controllers2.SupplierQuery{}, "*:SupplierPayForQuery")
web.Router("/choose/payfor/road", &controllers2.UpdateController{}, "*:ChoosePayForRoad")
web.Router("/result/payfor", &controllers2.UpdateController{}, "*:ResultPayFor")
web.Router("/send/notify", &controllers2.SendNotify{}, "*:SendNotifyToMerchant")
web.Router("/self/send/notify", &controllers2.SendNotify{}, "*:SelfSendNotify")
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")
web.Router("/user/genTotp", &controllers2.TotpQuery{}, "*:GenTotp")
web.Router("/user/saveTotp", &controllers2.TotpQuery{}, "*:SaveTotp")
web.Router("/user/genTotp", &controllers.TotpQuery{}, "*:GenTotp")
web.Router("/user/saveTotp", &controllers.TotpQuery{}, "*:SaveTotp")
}

View File

@@ -1,48 +1,51 @@
package routers
import (
controllers2 "boss/internal/controllers"
"boss/internal/controllers"
beego "github.com/beego/beego/v2/server/web"
)
func init() {
beego.Router("/", &controllers2.PageController{}, "*:Index")
beego.Router("/index.html", &controllers2.PageController{}, "*:Index")
beego.Router("/login.html", &controllers2.PageController{}, "*:LoginPage")
beego.Router("/account.html", &controllers2.PageAuthController{}, "*:AccountPage")
beego.Router("/account_history.html", &controllers2.PageAuthController{}, "*:AccountHistoryPage")
beego.Router("/bank_card.html", &controllers2.PageAuthController{}, "*:BankCardPage")
beego.Router("/create_agent.html", &controllers2.PageAuthController{}, "*:CreateAgentPage")
beego.Router("/edit_role.html", &controllers2.PageAuthController{}, "*:EditRolePage")
beego.Router("/first_menu.html", &controllers2.PageAuthController{}, "*:FirstMenuPage")
beego.Router("/main.html", &controllers2.PageAuthController{}, "*:MainPage")
beego.Router("/menu.html", &controllers2.PageAuthController{}, "*:MenuPage")
beego.Router("/merchant.html", &controllers2.PageAuthController{}, "*:MerchantPage")
beego.Router("/merchant_v2.html", &controllers2.PageAuthController{}, "*:MerchantV2Page")
beego.Router("/", &controllers.PageController{}, "*:Index")
beego.Router("/index.html", &controllers.PageController{}, "*:Index")
beego.Router("/login.html", &controllers.PageController{}, "*:LoginPage")
beego.Router("/account.html", &controllers.PageAuthController{}, "*:AccountPage")
beego.Router("/account_history.html", &controllers.PageAuthController{}, "*:AccountHistoryPage")
beego.Router("/bank_card.html", &controllers.PageAuthController{}, "*:BankCardPage")
beego.Router("/create_agent.html", &controllers.PageAuthController{}, "*:CreateAgentPage")
beego.Router("/edit_role.html", &controllers.PageAuthController{}, "*:EditRolePage")
beego.Router("/first_menu.html", &controllers.PageAuthController{}, "*:FirstMenuPage")
beego.Router("/main.html", &controllers.PageAuthController{}, "*:MainPage")
beego.Router("/menu.html", &controllers.PageAuthController{}, "*:MenuPage")
beego.Router("/merchant.html", &controllers.PageAuthController{}, "*:MerchantPage")
beego.Router("/merchant_v2.html", &controllers.PageAuthController{}, "*:MerchantV2Page")
beego.Router("/customerUserManagement.html", &controllers2.PageAuthController{}, "*:UserManagement")
beego.Router("/customerUserManagement.html", &controllers.PageAuthController{}, "*:UserManagement")
beego.Router("/order-summary-info.html", &controllers2.PageAuthController{}, "*:OrderSummary")
beego.Router("/recharge-apple-card-account.html", &controllers2.PageAuthController{}, "*:RechargeAppleAccountPage")
beego.Router("/recharge-apple-card-order.html", &controllers2.PageAuthController{}, "*:RechargeAppleOrderPage")
beego.Router("/order-summary-info.html", &controllers.PageAuthController{}, "*:OrderSummary")
beego.Router("/recharge-apple-card-account.html", &controllers.PageAuthController{}, "*:RechargeAppleAccountPage")
beego.Router("/recharge-apple-card-order.html", &controllers.PageAuthController{}, "*:RechargeAppleOrderPage")
beego.Router("/operator.html", &controllers2.PageAuthController{}, "*:OperatorPage")
beego.Router("/power.html", &controllers2.PageAuthController{}, "*:PowerPage")
beego.Router("/road.html", &controllers2.PageAuthController{}, "*:RoadPage")
beego.Router("/road_pool.html", &controllers2.PageAuthController{}, "*:RoadPoolPage")
beego.Router("/road_profit.html", &controllers2.PageAuthController{}, "*:RoadProfitPage")
beego.Router("/role.html", &controllers2.PageAuthController{}, "*:RolePage")
beego.Router("/second_menu.html", &controllers2.PageAuthController{}, "*:SecondMenuPage")
beego.Router("/order_info.html", &controllers2.PageAuthController{}, "*:OrderInfoPage")
beego.Router("/order_profit.html", &controllers2.PageAuthController{}, "*:OrderProfitPage")
beego.Router("/merchant_payfor.html", &controllers2.PageAuthController{}, "*:MerchantPayforPage")
beego.Router("/self_payfor.html", &controllers2.PageAuthController{}, "*:SelfPayforPage")
beego.Router("/payfor_record.html", &controllers2.PageAuthController{}, "*:PayforRecordPage")
beego.Router("/confirm.html", &controllers2.PageAuthController{}, "*:ConfirmPage")
beego.Router("/self_notify.html", &controllers2.PageAuthController{}, "*:SelfNotifyPage")
beego.Router("/recharge-t-mall-game-account.html", &controllers.PageAuthController{}, "*:RechargeTMallGameAccountPage")
beego.Router("/recharge-t-mall-game-order.html", &controllers.PageAuthController{}, "*:RechargeTMallGameOrderPage")
beego.Router("/operator.html", &controllers.PageAuthController{}, "*:OperatorPage")
beego.Router("/power.html", &controllers.PageAuthController{}, "*:PowerPage")
beego.Router("/road.html", &controllers.PageAuthController{}, "*:RoadPage")
beego.Router("/road_pool.html", &controllers.PageAuthController{}, "*:RoadPoolPage")
beego.Router("/road_profit.html", &controllers.PageAuthController{}, "*:RoadProfitPage")
beego.Router("/role.html", &controllers.PageAuthController{}, "*:RolePage")
beego.Router("/second_menu.html", &controllers.PageAuthController{}, "*:SecondMenuPage")
beego.Router("/order_info.html", &controllers.PageAuthController{}, "*:OrderInfoPage")
beego.Router("/order_profit.html", &controllers.PageAuthController{}, "*:OrderProfitPage")
beego.Router("/merchant_payfor.html", &controllers.PageAuthController{}, "*:MerchantPayforPage")
beego.Router("/self_payfor.html", &controllers.PageAuthController{}, "*:SelfPayforPage")
beego.Router("/payfor_record.html", &controllers.PageAuthController{}, "*:PayforRecordPage")
beego.Router("/confirm.html", &controllers.PageAuthController{}, "*:ConfirmPage")
beego.Router("/self_notify.html", &controllers.PageAuthController{}, "*:SelfNotifyPage")
//beego.Router("/self_plus_sub.html", &controllers.PageController{}, "*:SelfPlusSubPage")
beego.Router("/agent_to_merchant.html", &controllers2.PageAuthController{}, "*:AgentToMerchantPage")
beego.Router("/platform_profit.html", &controllers2.PageAuthController{}, "*:PlatFormProfitPage")
beego.Router("/agent_profit.html", &controllers2.PageAuthController{}, "*:AgentProfitPage")
beego.Router("/agent_to_merchant.html", &controllers.PageAuthController{}, "*:AgentToMerchantPage")
beego.Router("/platform_profit.html", &controllers.PageAuthController{}, "*:PlatFormProfitPage")
beego.Router("/agent_profit.html", &controllers.PageAuthController{}, "*:AgentProfitPage")
}

View File

@@ -1,14 +1,14 @@
package service
import (
common2 "boss/internal/common"
"boss/internal/common"
"boss/internal/datas"
"boss/internal/models/accounts"
"boss/internal/models/agent"
merchant2 "boss/internal/models/merchant"
"boss/internal/models/merchant"
"boss/internal/models/payfor"
road2 "boss/internal/models/road"
system2 "boss/internal/models/system"
"boss/internal/models/road"
"boss/internal/models/system"
"boss/internal/models/user"
"boss/internal/utils"
"github.com/beego/beego/v2/core/logs"
@@ -24,7 +24,7 @@ type AddService struct {
func (c *AddService) AddMenu(oneMenu, userID string) *datas.BaseDataJSON {
dataJSON := new(datas.BaseDataJSON)
menuInfo := system2.MenuInfo{
menuInfo := system.MenuInfo{
MenuUid: xid.New().String(),
FirstMenu: oneMenu,
Status: "active",
@@ -32,10 +32,10 @@ func (c *AddService) AddMenu(oneMenu, userID string) *datas.BaseDataJSON {
CreateTime: time.Now(),
}
exist := system2.FirstMenuIsExists(oneMenu)
exist := system.FirstMenuIsExists(oneMenu)
if !exist {
menuInfo.MenuOrder = system2.GetMenuLen() + 1
flag := system2.InsertMenu(menuInfo)
menuInfo.MenuOrder = system.GetMenuLen() + 1
flag := system.InsertMenu(menuInfo)
if !flag {
dataJSON.Code = -1
dataJSON.Msg = "添加菜单失败"
@@ -52,9 +52,9 @@ func (c *AddService) AddMenu(oneMenu, userID string) *datas.BaseDataJSON {
func (c *AddService) AddSecondMenu(firstMenuUid, secondRouter, secondMenu, userID string) *datas.KeyDataJSON {
dataJSON := new(datas.KeyDataJSON)
firstMenuInfo := system2.GetMenuInfoByMenuUid(firstMenuUid)
routerExists := system2.SecondRouterExists(secondRouter)
secondMenuExists := system2.SecondMenuIsExists(secondMenu)
firstMenuInfo := system.GetMenuInfoByMenuUid(firstMenuUid)
routerExists := system.SecondRouterExists(secondRouter)
secondMenuExists := system.SecondMenuIsExists(secondMenu)
if firstMenuInfo.MenuUid == "" {
dataJSON.Code = -1
@@ -69,8 +69,8 @@ func (c *AddService) AddSecondMenu(firstMenuUid, secondRouter, secondMenu, userI
dataJSON.Key = "second-menu-error"
dataJSON.Msg = "*该菜单名已经存在"
} else {
sl := system2.GetSecondMenuLenByFirstMenuUid(firstMenuUid)
secondMenuInfo := system2.SecondMenuInfo{
sl := system.GetSecondMenuLenByFirstMenuUid(firstMenuUid)
secondMenuInfo := system.SecondMenuInfo{
MenuOrder: sl + 1,
FirstMenuUid: firstMenuInfo.MenuUid,
FirstMenu: firstMenuInfo.FirstMenu,
@@ -83,7 +83,7 @@ func (c *AddService) AddSecondMenu(firstMenuUid, secondRouter, secondMenu, userI
UpdateTime: time.Now(),
FirstMenuOrder: firstMenuInfo.MenuOrder,
}
if !system2.InsertSecondMenu(secondMenuInfo) {
if !system.InsertSecondMenu(secondMenuInfo) {
dataJSON.Code = -1
dataJSON.Msg = "添加二级菜单失败"
} else {
@@ -108,15 +108,15 @@ func (c *AddService) AddPower(powerItem, powerID, firstMenuUid, secondMenuUid, u
keyDataJSON.Msg = "*权限项ID不能为空"
return keyDataJSON
}
if system2.PowerUidExists(powerID) {
if system.PowerUidExists(powerID) {
keyDataJSON.Key = ".power-id-error"
keyDataJSON.Msg = "*权限项ID已经存在"
return keyDataJSON
}
secondMenuInfo := system2.GetSecondMenuInfoBySecondMenuUid(secondMenuUid)
secondMenuInfo := system.GetSecondMenuInfoBySecondMenuUid(secondMenuUid)
powerInfo := system2.PowerInfo{
powerInfo := system.PowerInfo{
SecondMenuUid: secondMenuUid,
SecondMenu: secondMenuInfo.SecondMenu,
PowerId: powerID, PowerItem: powerItem,
@@ -128,7 +128,7 @@ func (c *AddService) AddPower(powerItem, powerID, firstMenuUid, secondMenuUid, u
}
keyDataJSON.Code = 200
if !system2.InsertPowerInfo(powerInfo) {
if !system.InsertPowerInfo(powerInfo) {
keyDataJSON.Key = ".power-save-success"
keyDataJSON.Msg = "添加权限项失败"
} else {
@@ -148,14 +148,14 @@ func (c *AddService) AddRole(roleName, roleRemark, userID string) *datas.KeyData
return keyDataJSON
}
if system2.RoleNameExists(roleName) {
if system.RoleNameExists(roleName) {
keyDataJSON.Code = -1
keyDataJSON.Key = ".role-name-error"
keyDataJSON.Msg = "*角色名称已经存在"
return keyDataJSON
}
roleInfo := system2.RoleInfo{
roleInfo := system.RoleInfo{
RoleName: roleName,
RoleUid: xid.New().String(),
Creater: userID,
@@ -165,7 +165,7 @@ func (c *AddService) AddRole(roleName, roleRemark, userID string) *datas.KeyData
UpdateTime: time.Now(),
}
if !system2.InsertRole(roleInfo) {
if !system.InsertRole(roleInfo) {
keyDataJSON.Code = -1
keyDataJSON.Key = ".role-save-success"
keyDataJSON.Msg = "添加角色失败"
@@ -179,7 +179,7 @@ func (c *AddService) AddRole(roleName, roleRemark, userID string) *datas.KeyData
func (c *AddService) SavePower(roleUid string, firstMenuUids, secondMenuUids, powerIds []string) *datas.BaseDataJSON {
dataJSON := new(datas.BaseDataJSON)
roleInfo := system2.GetRoleByRoleUid(roleUid)
roleInfo := system.GetRoleByRoleUid(roleUid)
if len(roleUid) == 0 || len(roleInfo.RoleUid) == 0 {
dataJSON.Code = -1
return dataJSON
@@ -190,28 +190,28 @@ func (c *AddService) SavePower(roleUid string, firstMenuUids, secondMenuUids, po
roleInfo.ShowSecondUid = strings.Join(secondMenuUids, "||")
roleInfo.ShowPowerUid = strings.Join(powerIds, "||")
menuInfoList := system2.GetMenuInfosByMenuUids(firstMenuUids)
menuInfoList := system.GetMenuInfosByMenuUids(firstMenuUids)
showFirstMenu := make([]string, 0)
for _, m := range menuInfoList {
showFirstMenu = append(showFirstMenu, m.FirstMenu)
}
roleInfo.ShowFirstMenu = strings.Join(showFirstMenu, "||")
secondMenuInfoList := system2.GetSecondMenuInfoBySecondMenuUids(secondMenuUids)
secondMenuInfoList := system.GetSecondMenuInfoBySecondMenuUids(secondMenuUids)
showSecondMenu := make([]string, 0)
for _, m := range secondMenuInfoList {
showSecondMenu = append(showSecondMenu, m.SecondMenu)
}
roleInfo.ShowSecondMenu = strings.Join(showSecondMenu, "||")
powerList := system2.GetPowerByIds(powerIds)
powerList := system.GetPowerByIds(powerIds)
showPower := make([]string, 0)
for _, p := range powerList {
showPower = append(showPower, p.PowerItem)
}
roleInfo.ShowPower = strings.Join(showPower, "||")
if !system2.UpdateRoleInfo(roleInfo) {
if !system.UpdateRoleInfo(roleInfo) {
dataJSON.Code = -1
dataJSON.Msg = "更新roleInfo失败"
} else {
@@ -241,7 +241,7 @@ func (c *AddService) AddOperator(loginAccount, loginPassword, role, status, rema
if len(remark) == 0 {
remark = loginAccount
}
roleInfo := system2.GetRoleByRoleUid(role)
roleInfo := system.GetRoleByRoleUid(role)
userInfo := user.UserInfo{
UserId: loginAccount,
Passwd: utils.GetMD5Upper(loginPassword),
@@ -295,8 +295,8 @@ func (c *AddService) AddBankCard(userName, bankCode, accountName, certificateTyp
logs.Error("添加银行卡校验失败")
} else {
if len(uid) > 0 {
bankCardInfo := system2.GetBankCardByUid(uid)
bankCardInfo = system2.BankCardInfo{
bankCardInfo := system.GetBankCardByUid(uid)
bankCardInfo = system.BankCardInfo{
Id: bankCardInfo.Id,
UserName: userName,
BankName: bankName,
@@ -312,11 +312,11 @@ func (c *AddService) AddBankCard(userName, bankCode, accountName, certificateTyp
CreateTime: bankCardInfo.CreateTime,
Uid: bankCardInfo.Uid,
}
if system2.UpdateBankCard(bankCardInfo) {
if system.UpdateBankCard(bankCardInfo) {
dataJSON.Code = 200
}
} else {
bankCardInfo := system2.BankCardInfo{
bankCardInfo := system.BankCardInfo{
Uid: "3333" + xid.New().String(),
UserName: userName,
BankName: bankName,
@@ -332,7 +332,7 @@ func (c *AddService) AddBankCard(userName, bankCode, accountName, certificateTyp
CreateTime: time.Now(),
}
if system2.InsertBankCardInfo(bankCardInfo) {
if system.InsertBankCardInfo(bankCardInfo) {
dataJSON.Code = 200
}
}
@@ -340,9 +340,11 @@ func (c *AddService) AddBankCard(userName, bankCode, accountName, certificateTyp
return dataJSON
}
func (c *AddService) AddRoad(startHour, endHour, roadName, productUid,
func (c *AddService) AddRoad(
startHour, endHour, roadName, productUid,
basicRate, settleFee, roadTotalLimit, roadEverydayLimit,
singleMinLimit, singleMaxLimit, roadUid, roadRemark, params, productCode, paymentHtml string) *datas.BaseDataJSON {
singleMinLimit, singleMaxLimit, roadUid, roadRemark, params, productCode, paymentHtml, transactionType string,
) *datas.BaseDataJSON {
dataJSON := new(datas.BaseDataJSON)
dataJSON.Code = -1
@@ -395,16 +397,15 @@ func (c *AddService) AddRoad(startHour, endHour, roadName, productUid,
return dataJSON
}
productName := ""
supplierMap := common2.GetSupplierMap()
supplierMap := common.GetSupplierMap()
for k, v := range supplierMap {
if k == productUid {
productName = v
}
}
if len(roadUid) > 0 {
//更新通道
roadInfo := road2.GetRoadInfoByRoadUid(roadUid)
roadInfo := road.GetRoadInfoByRoadUid(roadUid)
roadInfo.RoadName = roadName
roadInfo.Remark = roadRemark
roadInfo.ProductUid = productUid
@@ -420,8 +421,9 @@ func (c *AddService) AddRoad(startHour, endHour, roadName, productUid,
roadInfo.Params = params
roadInfo.ProductCode = productCode
roadInfo.PaymentHtml = paymentHtml
roadInfo.TransactionType = transactionType
if road2.UpdateRoadInfo(roadInfo) {
if road.UpdateRoadInfo(roadInfo) {
dataJSON.Code = 200
} else {
dataJSON.Msg = "通道更新失败"
@@ -429,7 +431,8 @@ func (c *AddService) AddRoad(startHour, endHour, roadName, productUid,
} else {
//添加新的通道
roadUid = "4444" + xid.New().String()
roadInfo := road2.RoadInfo{
roadInfo := road.RoadInfo{
ProductCode: productCode,
RoadName: roadName,
RoadUid: roadUid,
Remark: roadRemark,
@@ -440,17 +443,19 @@ func (c *AddService) AddRoad(startHour, endHour, roadName, productUid,
TotalLimit: totalLimit,
TodayLimit: todayLimit,
SingleMinLimit: singleMinLimitTmp,
Balance: common2.ZERO,
Balance: common.ZERO,
SingleMaxLimit: singleMaxLimitTmp,
StarHour: startHourTmp,
EndHour: endHourTmp,
Status: "active",
Params: params,
TransactionType: transactionType,
PaymentHtml: paymentHtml,
UpdateTime: time.Now(),
CreateTime: time.Now(),
}
if road2.InsertRoadInfo(roadInfo) {
if road.InsertRoadInfo(roadInfo) {
dataJSON.Code = 200
} else {
dataJSON.Msg = "添加新通道失败"
@@ -470,7 +475,7 @@ func (c *AddService) AddRoadPool(roadPoolName, roadPoolCode string) *datas.KeyDa
keyDataJSON.Msg = "*通道池编号不能为空"
}
roadPoolInfo := road2.RoadPoolInfo{
roadPoolInfo := road.RoadPoolInfo{
Status: "active",
RoadPoolName: roadPoolName,
RoadPoolCode: roadPoolCode,
@@ -478,7 +483,7 @@ func (c *AddService) AddRoadPool(roadPoolName, roadPoolCode string) *datas.KeyDa
CreateTime: time.Now(),
}
if road2.InsertRoadPool(roadPoolInfo) {
if road.InsertRoadPool(roadPoolInfo) {
keyDataJSON.Code = 200
keyDataJSON.Msg = "添加通道池成功"
} else {
@@ -491,14 +496,14 @@ func (c *AddService) AddRoadPool(roadPoolName, roadPoolCode string) *datas.KeyDa
func (c *AddService) SaveRoadUid(roadPoolCode string, roadUids []string) *datas.BaseDataJSON {
dataJSON := new(datas.BaseDataJSON)
dataJSON.Code = -1
roadPoolInfo := road2.GetRoadPoolByRoadPoolCode(roadPoolCode)
roadPoolInfo := road.GetRoadPoolByRoadPoolCode(roadPoolCode)
if roadPoolInfo.RoadPoolCode == "" {
return dataJSON
}
var uids []string
for _, uid := range roadUids {
//去掉空格
if len(uid) > 0 && road2.RoadInfoExistByRoadUid(uid) {
if len(uid) > 0 && road.RoadInfoExistByRoadUid(uid) {
uids = append(uids, uid)
}
}
@@ -507,7 +512,7 @@ func (c *AddService) SaveRoadUid(roadPoolCode string, roadUids []string) *datas.
roadPoolInfo.RoadUidPool = roadUid
}
roadPoolInfo.UpdateTime = time.Now()
if road2.UpdateRoadPool(roadPoolInfo) {
if road.UpdateRoadPool(roadPoolInfo) {
dataJSON.Code = 200
}
return dataJSON
@@ -607,7 +612,7 @@ func (c *AddService) AddMerchant(merchantName, phone, loginPassword,
keyDataJSON.Code = -1
keyDataJSON.Key = "#merchant-name-error"
keyDataJSON.Msg = "商户名称为空"
} else if merchant2.IsExistByMerchantName(merchantName) {
} else if merchant.IsExistByMerchantName(merchantName) {
keyDataJSON.Code = -1
keyDataJSON.Key = "#merchant-name-error"
keyDataJSON.Msg = "商户名已经存在"
@@ -615,7 +620,7 @@ func (c *AddService) AddMerchant(merchantName, phone, loginPassword,
keyDataJSON.Code = -1
keyDataJSON.Key = "#merchant-phone-error"
keyDataJSON.Msg = "手机号为空"
} else if merchant2.IsExistByMerchantPhone(phone) {
} else if merchant.IsExistByMerchantPhone(phone) {
keyDataJSON.Code = -1
keyDataJSON.Key = "#merchant-phone-error"
keyDataJSON.Msg = "该手机号已经注册"
@@ -639,7 +644,7 @@ func (c *AddService) AddMerchant(merchantName, phone, loginPassword,
merchantUid := "8888" + xid.New().String()
merchantKey := "kkkk" + xid.New().String() //商户key
merchantSecret := "ssss" + xid.New().String() //商户密钥
merchantInfo := merchant2.MerchantInfo{
merchantInfo := merchant.MerchantInfo{
MerchantName: merchantName,
MerchantUid: merchantUid,
LoginAccount: phone,
@@ -652,7 +657,7 @@ func (c *AddService) AddMerchant(merchantName, phone, loginPassword,
CreateTime: time.Now(),
}
if merchant2.InsertMerchantInfo(merchantInfo) {
if merchant.InsertMerchantInfo(merchantInfo) {
keyDataJSON.Code = 200
} else {
keyDataJSON.Code = -1
@@ -687,7 +692,7 @@ func (c *AddService) AddMerchantDeploy(merchantUid, isAutoSettle, isAutoPayfor,
belongAgentUid, payforRoadChoose, rollPayforRoadChoose, payforFee string) *datas.KeyDataJSON {
keyDataJSON := new(datas.KeyDataJSON)
merchantInfo := merchant2.GetMerchantByUid(merchantUid)
merchantInfo := merchant.GetMerchantByUid(merchantUid)
merchantInfo.AutoSettle = isAutoSettle
merchantInfo.AutoPayFor = isAutoPayfor
merchantInfo.WhiteIps = ipWhite
@@ -695,22 +700,22 @@ func (c *AddService) AddMerchantDeploy(merchantUid, isAutoSettle, isAutoPayfor,
merchantInfo.BelongAgentUid = belongAgentUid
if payforRoadChoose != "" {
roadInfo := road2.GetRoadInfoByName(payforRoadChoose)
roadInfo := road.GetRoadInfoByName(payforRoadChoose)
merchantInfo.SinglePayForRoadName = payforRoadChoose
merchantInfo.SinglePayForRoadUid = roadInfo.RoadUid
}
if rollPayforRoadChoose != "" {
rollPoolInfo := road2.GetRoadPoolByName(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 = common2.PAYFOR_FEE
tmp = common.PAYFOR_FEE
}
merchantInfo.PayforFee = tmp
if merchant2.UpdateMerchant(merchantInfo) {
if merchant.UpdateMerchant(merchantInfo) {
keyDataJSON.Code = 200
} else {
keyDataJSON.Code = -1
@@ -744,7 +749,7 @@ func (c *AddService) AddMerchantPayType(payType, singleRoad, rollPoolRoad,
keyDataJSON.Msg = "轮询通道平台利润率不能为0"
}
if !merchant2.CheckMarginValid(singleRoadPlatformFee) {
if !merchant.CheckMarginValid(singleRoadPlatformFee) {
keyDataJSON.Code = -1
keyDataJSON.Msg = "费率映射设置错误!"
}
@@ -779,7 +784,7 @@ func (c *AddService) AddMerchantPayType(payType, singleRoad, rollPoolRoad,
j = 0
}
var merchantDeployInfo merchant2.MerchantDeployInfo
var merchantDeployInfo merchant.MerchantDeployInfo
merchantDeployInfo.MerchantUid = merchantNo
merchantDeployInfo.PayType = payType
merchantDeployInfo.SingleRoadName = singleRoad
@@ -792,16 +797,16 @@ func (c *AddService) AddMerchantPayType(payType, singleRoad, rollPoolRoad,
merchantDeployInfo.LoanDays = i
merchantDeployInfo.UnfreezeHour = j
merchantDeployInfo.RollRoadName = rollPoolRoad
roadInfo := road2.GetRoadInfoByName(singleRoad)
rollPoolInfo := road2.GetRoadPoolByName(rollPoolRoad)
roadInfo := road.GetRoadInfoByName(singleRoad)
rollPoolInfo := road.GetRoadPoolByName(rollPoolRoad)
merchantDeployInfo.SingleRoadUid = roadInfo.RoadUid
merchantDeployInfo.RollRoadCode = rollPoolInfo.RoadPoolCode
//如果该用户的改支付类型已经存在,那么进行更新,否则进行添加
if merchant2.IsExistByUidAndPayType(merchantNo, payType) {
if merchant.IsExistByUidAndPayType(merchantNo, payType) {
if singleRoad == "" && rollPoolRoad == "" {
//表示需要删除该支付类型的通道
if merchant2.DeleteMerchantDeployByUidAndPayType(merchantNo, payType) {
if merchant.DeleteMerchantDeployByUidAndPayType(merchantNo, payType) {
keyDataJSON.Code = 200
keyDataJSON.Msg = "删除该支付类型通道成功"
} else {
@@ -809,12 +814,12 @@ func (c *AddService) AddMerchantPayType(payType, singleRoad, rollPoolRoad,
keyDataJSON.Msg = "删除该支付类型通道失败"
}
} else {
tmpInfo := merchant2.GetMerchantDeployByUidAndPayType(merchantNo, payType)
tmpInfo := merchant.GetMerchantDeployByUidAndPayType(merchantNo, payType)
merchantDeployInfo.Id = tmpInfo.Id
merchantDeployInfo.Status = tmpInfo.Status
merchantDeployInfo.UpdateTime = time.Now()
merchantDeployInfo.CreateTime = tmpInfo.CreateTime
if merchant2.UpdateMerchantDeploy(merchantDeployInfo) {
if merchant.UpdateMerchantDeploy(merchantDeployInfo) {
keyDataJSON.Code = 200
keyDataJSON.Msg = "更新成功"
} else {
@@ -829,8 +834,8 @@ func (c *AddService) AddMerchantPayType(payType, singleRoad, rollPoolRoad,
} else {
merchantDeployInfo.CreateTime = time.Now()
merchantDeployInfo.UpdateTime = time.Now()
merchantDeployInfo.Status = common2.ACTIVE
if merchant2.InsertMerchantDeployInfo(merchantDeployInfo) {
merchantDeployInfo.Status = common.ACTIVE
if merchant.InsertMerchantDeployInfo(merchantDeployInfo) {
keyDataJSON.Code = 200
keyDataJSON.Msg = "添加支付类型成功"
} else {
@@ -866,12 +871,12 @@ func (c *AddService) AddPayFor(merchantUid, bankUid, payForAmount, bankNo, accou
}
accountInfo := accounts.GetAccountByUid(merchantUid)
if accountInfo.SettleAmount < money+common2.PAYFOR_FEE {
if accountInfo.SettleAmount < money+common.PAYFOR_FEE {
keyDataJSON.Msg = "用户可用金额不够"
return keyDataJSON
}
bankInfo := system2.GetBankCardByUid(bankUid)
bankInfo := system.GetBankCardByUid(bankUid)
if bankInfo.BankNo != bankNo || bankInfo.AccountName != accountName || bankInfo.PhoneNo != phone {
keyDataJSON.Msg = "银行卡信息有误,请连接管理员"
@@ -884,16 +889,16 @@ func (c *AddService) AddPayFor(merchantUid, bankUid, payForAmount, bankNo, accou
MerchantName: merchantName, PhoneNo: phone,
MerchantOrderId: xid.New().String(),
BankOrderId: "4444" + xid.New().String(),
PayforFee: common2.PAYFOR_FEE, Type: common2.SELF_MERCHANT,
PayforFee: common.PAYFOR_FEE, Type: common.SELF_MERCHANT,
PayforAmount: money,
PayforTotalAmount: money + common2.PAYFOR_FEE,
PayforTotalAmount: money + common.PAYFOR_FEE,
BankCode: bankInfo.BankCode,
BankName: bankName, IsSend: common2.NO,
BankName: bankName, IsSend: common.NO,
BankAccountName: bankInfo.AccountName,
BankAccountNo: bankInfo.BankNo,
BankAccountType: bankInfo.BankAccountType,
BankAccountAddress: bankAddress,
Status: common2.PAYFOR_COMFRIM,
Status: common.PAYFOR_COMFRIM,
RequestTime: time.Now(),
CreateTime: time.Now(),
UpdateTime: time.Now(),
@@ -926,7 +931,7 @@ func (c *AddService) AddSelfPayFor(bankUid, payForAmount, accountName,
return keyDataJSON
}
bankInfo := system2.GetBankCardByUid(bankUid)
bankInfo := system.GetBankCardByUid(bankUid)
//需要对前端传入的数据做校验,不能完全相信前端的数据
if bankInfo.AccountName != accountName || bankInfo.BankNo != bankNo || bankInfo.PhoneNo != phone {
@@ -937,18 +942,18 @@ func (c *AddService) AddSelfPayFor(bankUid, payForAmount, accountName,
selfPayFor := payfor.PayforInfo{
PayforUid: "pppp" + xid.New().String(),
BankOrderId: "4444" + xid.New().String(),
PayforFee: common2.ZERO,
Type: common2.SELF_HELP,
PayforFee: common.ZERO,
Type: common.SELF_HELP,
PayforAmount: money,
PayforTotalAmount: money + common2.ZERO,
PayforTotalAmount: money + common.ZERO,
BankCode: bankInfo.BankCode,
BankName: bankName,
IsSend: common2.NO,
IsSend: common.NO,
BankAccountName: bankInfo.AccountName,
BankAccountNo: bankInfo.BankNo,
BankAccountType: bankInfo.BankAccountType,
BankAccountAddress: bankAddress,
Status: common2.PAYFOR_COMFRIM,
Status: common.PAYFOR_COMFRIM,
CreateTime: time.Now(),
UpdateTime: time.Now(),
}

View File

@@ -5,8 +5,8 @@ import (
"boss/internal/models/accounts"
"boss/internal/models/agent"
"boss/internal/models/merchant"
road2 "boss/internal/models/road"
system2 "boss/internal/models/system"
"boss/internal/models/road"
"boss/internal/models/system"
"boss/internal/models/user"
"github.com/beego/beego/v2/core/logs"
"sort"
@@ -24,27 +24,27 @@ func (c *DeleteService) Finish() {
remainderSecondMenu := make([]string, 0)
remainderPowerId := make([]string, 0)
remainderPower := make([]string, 0)
allRoleInfo := system2.GetRole()
allRoleInfo := system.GetRole()
//如果有删除任何的东西,需要重新赋值权限
for _, r := range allRoleInfo {
for _, showFirstUid := range strings.Split(r.ShowFirstUid, "||") {
if system2.FirstMenuUidIsExists(showFirstUid) {
if system.FirstMenuUidIsExists(showFirstUid) {
remainderFirstMenuUid = append(remainderFirstMenuUid, showFirstUid)
menuInfo := system2.GetMenuInfoByMenuUid(showFirstUid)
menuInfo := system.GetMenuInfoByMenuUid(showFirstUid)
remainderFirstMenu = append(remainderFirstMenu, menuInfo.FirstMenu)
}
}
for _, showSecondUid := range strings.Split(r.ShowSecondUid, "||") {
if system2.SecondMenuUidIsExists(showSecondUid) {
if system.SecondMenuUidIsExists(showSecondUid) {
remainderSecondMenuUid = append(remainderSecondMenuUid, showSecondUid)
secondMenuInfo := system2.GetSecondMenuInfoBySecondMenuUid(showSecondUid)
secondMenuInfo := system.GetSecondMenuInfoBySecondMenuUid(showSecondUid)
remainderSecondMenu = append(remainderSecondMenu, secondMenuInfo.SecondMenu)
}
}
for _, showPowerId := range strings.Split(r.ShowPowerUid, "||") {
if system2.PowerUidExists(showPowerId) {
if system.PowerUidExists(showPowerId) {
remainderPowerId = append(remainderPowerId, showPowerId)
powerInfo := system2.GetPowerById(showPowerId)
powerInfo := system.GetPowerById(showPowerId)
remainderPower = append(remainderPower, powerInfo.PowerItem)
}
}
@@ -55,22 +55,22 @@ func (c *DeleteService) Finish() {
r.ShowPowerUid = strings.Join(remainderPowerId, "||")
r.ShowPower = strings.Join(remainderPower, "||")
r.UpdateTime = time.Now()
system2.UpdateRoleInfo(r)
system.UpdateRoleInfo(r)
}
}
func (c *DeleteService) DeleteMenu(menuUid, userID string) *datas.BaseDataJSON {
dataJSON := new(datas.BaseDataJSON)
menuInfo := system2.GetMenuInfoByMenuUid(menuUid)
menuInfo := system.GetMenuInfoByMenuUid(menuUid)
if menuInfo.MenuUid == "" {
dataJSON.Msg = "不存在该菜单"
dataJSON.Code = -1
} else {
logs.Info(userID + ",执行了删除一级菜单操作")
system2.DeleteMenuInfo(menuUid)
system.DeleteMenuInfo(menuUid)
//删除该一级目下下的所有二级目录
system2.DeleteSecondMenuByFirstMenuUid(menuUid)
system.DeleteSecondMenuByFirstMenuUid(menuUid)
SortFirstMenuOrder()
dataJSON.Code = 200
}
@@ -79,27 +79,27 @@ func (c *DeleteService) DeleteMenu(menuUid, userID string) *datas.BaseDataJSON {
}
func (c *DeleteService) DeleteSecondMenu(secondMenuUid string) *datas.BaseDataJSON {
secondMenuInfo := system2.GetSecondMenuInfoBySecondMenuUid(secondMenuUid)
secondMenuInfo := system.GetSecondMenuInfoBySecondMenuUid(secondMenuUid)
dataJSON := new(datas.BaseDataJSON)
if secondMenuUid == "" || secondMenuInfo.SecondMenuUid == "" {
dataJSON.Code = -1
dataJSON.Msg = "该二级菜单不存在"
} else {
if system2.DeleteSecondMenuBySecondMenuUid(secondMenuUid) {
if system.DeleteSecondMenuBySecondMenuUid(secondMenuUid) {
dataJSON.Code = 200
ml := system2.GetSecondMenuLenByFirstMenuUid(secondMenuInfo.FirstMenuUid)
ml := system.GetSecondMenuLenByFirstMenuUid(secondMenuInfo.FirstMenuUid)
//删除该二级页面下的所有权限项
system2.DeletePowerBySecondUid(secondMenuUid)
system.DeletePowerBySecondUid(secondMenuUid)
if ml == 0 {
//如果该二级类目已经被全部删除,那么对应的一级类目也应当删除
system2.DeleteMenuInfo(secondMenuInfo.FirstMenuUid)
system.DeleteMenuInfo(secondMenuInfo.FirstMenuUid)
SortFirstMenuOrder()
} else {
secondMenuInfoList := system2.GetSecondMenuListByFirstMenuUid(secondMenuInfo.FirstMenuUid)
sort.Sort(system2.SecondMenuSlice(secondMenuInfoList))
secondMenuInfoList := system.GetSecondMenuListByFirstMenuUid(secondMenuInfo.FirstMenuUid)
sort.Sort(system.SecondMenuSlice(secondMenuInfoList))
for i := 0; i < len(secondMenuInfoList); i++ {
m := secondMenuInfoList[i]
system2.UpdateSecondMenuOrderBySecondUid(m.SecondMenuUid, i+1)
system.UpdateSecondMenuOrderBySecondUid(m.SecondMenuUid, i+1)
}
}
} else {
@@ -111,7 +111,7 @@ func (c *DeleteService) DeleteSecondMenu(secondMenuUid string) *datas.BaseDataJS
}
func (c *DeleteService) DeletePowerItem(powerID string) *datas.BaseDataJSON {
system2.DeletePowerItemByPowerID(powerID)
system.DeletePowerItemByPowerID(powerID)
dataJSON := new(datas.BaseDataJSON)
dataJSON.Code = 200
return dataJSON
@@ -120,7 +120,7 @@ func (c *DeleteService) DeletePowerItem(powerID string) *datas.BaseDataJSON {
func (c *DeleteService) DeleteRole(roleUid string) *datas.BaseDataJSON {
dataJSON := new(datas.BaseDataJSON)
if system2.DeleteRoleByRoleUid(roleUid) {
if system.DeleteRoleByRoleUid(roleUid) {
dataJSON.Code = 200
} else {
dataJSON.Code = -1
@@ -145,7 +145,7 @@ func (c *DeleteService) DeleteBankCardRecord(uid string) *datas.BankCardDataJSON
dataJSON := new(datas.BankCardDataJSON)
dataJSON.Code = -1
if system2.DeleteBankCardByUid(uid) {
if system.DeleteBankCardByUid(uid) {
dataJSON.Code = 200
}
return dataJSON
@@ -156,11 +156,11 @@ func (c *DeleteService) DeleteRoad(roadUid string) *datas.BaseDataJSON {
dataJSON := new(datas.BaseDataJSON)
dataJSON.Code = -1
if road2.DeleteRoadByRoadUid(roadUid) {
if road.DeleteRoadByRoadUid(roadUid) {
dataJSON.Code = 200
}
params := make(map[string]string)
roadPoolInfoList := road2.GetAllRollPool(params)
roadPoolInfoList := road.GetAllRollPool(params)
//将轮询池中的对应的通道删除
for _, roadPoolInfo := range roadPoolInfoList {
var uids []string
@@ -172,7 +172,7 @@ func (c *DeleteService) DeleteRoad(roadUid string) *datas.BaseDataJSON {
}
roadPoolInfo.RoadUidPool = strings.Join(uids, "||")
roadPoolInfo.UpdateTime = time.Now()
road2.UpdateRoadPool(roadPoolInfo)
road.UpdateRoadPool(roadPoolInfo)
}
return dataJSON
}
@@ -181,7 +181,7 @@ func (c *DeleteService) DeleteRoadPool(roadPoolCode string) *datas.BaseDataJSON
dataJSON := new(datas.BaseDataJSON)
dataJSON.Code = -1
if road2.DeleteRoadPoolByCode(roadPoolCode) {
if road.DeleteRoadPoolByCode(roadPoolCode) {
dataJSON.Code = 200
} else {
dataJSON.Msg = "删除通道池失败"
@@ -264,14 +264,14 @@ func (c *DeleteService) DeleteAgentRelation(merchantUid string) *datas.KeyDataJS
* 对一级菜单重新进行排序
*/
func SortFirstMenuOrder() {
menuInfoList := system2.GetMenuAll()
sort.Sort(system2.MenuInfoSlice(menuInfoList))
menuInfoList := system.GetMenuAll()
sort.Sort(system.MenuInfoSlice(menuInfoList))
for i := 0; i < len(menuInfoList); i++ {
m := menuInfoList[i]
m.UpdateTime = time.Now()
m.MenuOrder = i + 1
system2.UpdateMenuInfo(m)
system.UpdateMenuInfo(m)
//对应的二级菜单也应该重新分配顺序号
SortSecondMenuOrder(m)
}
@@ -280,13 +280,13 @@ func SortFirstMenuOrder() {
/*
* 对二级菜单分配顺序号
*/
func SortSecondMenuOrder(firstMenuInfo system2.MenuInfo) {
secondMenuInfoList := system2.GetSecondMenuListByFirstMenuUid(firstMenuInfo.MenuUid)
func SortSecondMenuOrder(firstMenuInfo system.MenuInfo) {
secondMenuInfoList := system.GetSecondMenuListByFirstMenuUid(firstMenuInfo.MenuUid)
for _, sm := range secondMenuInfoList {
sm.FirstMenuOrder = firstMenuInfo.MenuOrder
sm.UpdateTime = time.Now()
system2.UpdateSecondMenu(sm)
system.UpdateSecondMenu(sm)
//删除下下一级的所有权限项
system2.DeletePowerBySecondUid(sm.SecondMenuUid)
system.DeletePowerBySecondUid(sm.SecondMenuUid)
}
}

View File

@@ -3,7 +3,7 @@ package service
import (
"boss/internal/common"
"boss/internal/datas"
order2 "boss/internal/models/order"
"boss/internal/models/order"
"boss/internal/models/payfor"
"boss/internal/models/road"
"boss/internal/models/user"
@@ -21,7 +21,7 @@ type QueryService struct {
}
func OrderQuery(bankOrderId string) string {
orderInfo := order2.GetOrderByBankOrderId(bankOrderId)
orderInfo := order.GetOrderByBankOrderId(bankOrderId)
if orderInfo.BankOrderId == "" || len(orderInfo.BankOrderId) == 0 {
logs.Error("不存在这样的订单,订单查询结束")
return "不存在这样的订单"
@@ -47,7 +47,7 @@ func OrderQuery(bankOrderId string) string {
func (c *QueryService) SupplierOrderQuery(bankOrderId string) *datas.KeyDataJSON {
keyDataJSON := new(datas.KeyDataJSON)
keyDataJSON.Code = 200
exist := order2.BankOrderIdIsExist(bankOrderId)
exist := order.BankOrderIdIsExist(bankOrderId)
if !exist {
keyDataJSON.Msg = "该订单不存在"
keyDataJSON.Code = -1
@@ -97,13 +97,13 @@ func querySupplierPayForResult(bankOrderId string) bool {
}
}
func QueryTotalSummary(params map[string]string) order2.Summary {
orderInfoList := order2.GetOrderByMap(params, -1, 0)
func QueryTotalSummary(params map[string]string) order.Summary {
orderInfoList := order.GetOrderByMap(params, -1, 0)
bankIdList := make([]string, 0)
for _, info := range orderInfoList {
bankIdList = append(bankIdList, info.BankOrderId)
}
orderProfitList := order2.GetOrderProfitListByBankOrderIdList(bankIdList)
orderProfitList := order.GetOrderProfitListByBankOrderIdList(bankIdList)
supplierAll := 0.0
platformAll := 0.0
agentAll := 0.0
@@ -129,7 +129,7 @@ func QueryTotalSummary(params map[string]string) order2.Summary {
} else {
succeedRate = 0
}
return order2.Summary{
return order.Summary{
TotalNum: totalNum,
TotalAmount: math.Round(allAmount*100) / 100,
PaidNum: succeedNum,
@@ -139,11 +139,11 @@ func QueryTotalSummary(params map[string]string) order2.Summary {
}
}
func QuerySummaryByOrderInfo(infoInfoList []order2.OrderInfo) order2.Summary {
orderProfitInfoList := make([]order2.OrderProfitInfo, 0)
func QuerySummaryByOrderInfo(infoInfoList []order.OrderInfo) order.Summary {
orderProfitInfoList := make([]order.OrderProfitInfo, 0)
for _, info := range infoInfoList {
orderProfitInfoList = append(orderProfitInfoList, order2.GetOrderProfitByBankOrderId(info.BankOrderId))
orderProfitInfoList = append(orderProfitInfoList, order.GetOrderProfitByBankOrderId(info.BankOrderId))
}
totalNum := 0
@@ -175,7 +175,7 @@ func QuerySummaryByOrderInfo(infoInfoList []order2.OrderInfo) order2.Summary {
succeedRate = 0
}
return order2.Summary{
return order.Summary{
TotalNum: totalNum,
TotalAmount: math.Round(todayAllAmount*100) / 100,
PaidNum: TodaySuccessNum,
@@ -185,7 +185,7 @@ func QuerySummaryByOrderInfo(infoInfoList []order2.OrderInfo) order2.Summary {
}
}
func QueryTodaySummary(params map[string]string) order2.Summary {
func QueryTodaySummary(params map[string]string) order.Summary {
now := time.Now()
todayAtMidnight := time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, now.Location())
tomorrowAtMidNight := time.Date(now.Year(), now.Month(), now.Day(), 59, 59, 59, 0, now.Location())
@@ -217,13 +217,13 @@ func QueryTodaySummary(params map[string]string) order2.Summary {
} else {
paramsProfit["create_time__lte"] = end
}
orderInfoList := order2.GetOrderByMap(paramsProfit, -1, 0)
orderInfoList := order.GetOrderByMap(paramsProfit, -1, 0)
bankIdList := make([]string, 0)
for _, info := range orderInfoList {
bankIdList = append(bankIdList, info.BankOrderId)
}
dataInfo := order2.GetOrderProfitListByBankOrderIdList(bankIdList)
dataInfo := order.GetOrderProfitListByBankOrderIdList(bankIdList)
totalNum := 0
todaySuccessNum := 0
todayAllAmount := 0.0
@@ -247,7 +247,7 @@ func QueryTodaySummary(params map[string]string) order2.Summary {
if totalNum != 0 {
succeedRate = math.Round(float64(todaySuccessNum)/float64(totalNum)*100*100) / 100
}
return order2.Summary{
return order.Summary{
TotalNum: totalNum,
TotalAmount: math.Round(todayAllAmount*100) / 100,
PaidNum: todaySuccessNum,

View File

@@ -2,7 +2,7 @@ package service
import (
"boss/internal/common"
order2 "boss/internal/models/order"
"boss/internal/models/order"
"math"
"time"
)
@@ -10,13 +10,13 @@ import (
type OrderSummary struct {
}
func (s *OrderSummary) GetTodaySummary() (todaySummary order2.Summary) {
todaySummary = order2.Summary{}
func (s *OrderSummary) GetTodaySummary() (todaySummary order.Summary) {
todaySummary = order.Summary{}
now := time.Now()
// 获取今日零点
todayZero := time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, time.UTC)
orderList, err := order2.GetOrderByTime(todayZero.String(), now.String())
orderList, err := order.GetOrderByTime(todayZero.String(), now.String())
if err != nil {
return
@@ -38,7 +38,7 @@ func (s *OrderSummary) GetTodaySummary() (todaySummary order2.Summary) {
}
todaySummary = order2.Summary{
todaySummary = order.Summary{
TotalNum: len(orderList),
TotalAmount: math.Round(amount*100) / 100,
PaidNum: paidNum,

View File

@@ -10,7 +10,7 @@ import (
"boss/internal/models/merchant"
"boss/internal/models/payfor"
"boss/internal/models/road"
system2 "boss/internal/models/system"
"boss/internal/models/system"
"boss/internal/models/user"
"boss/internal/utils"
"fmt"
@@ -25,26 +25,26 @@ type UpdateService struct {
}
func (c *UpdateService) UpMenu(menuUid string) *datas.BaseDataJSON {
menuInfo := system2.GetMenuInfoByMenuUid(menuUid)
menuInfo := system.GetMenuInfoByMenuUid(menuUid)
dataJSON := new(datas.BaseDataJSON)
if menuInfo.MenuUid == "" {
dataJSON.Msg = "更改排列顺序失败"
dataJSON.Code = -1
} else {
exist := system2.MenuOrderIsExists(menuInfo.MenuOrder - 1)
exist := system.MenuOrderIsExists(menuInfo.MenuOrder - 1)
if !exist {
dataJSON.Msg = "已经是最高的顺序"
dataJSON.Code = -1
} else {
//如果他前面有菜单那么交换他们的menuOrder
preMenuInfo := system2.GetMenuInfoByMenuOrder(menuInfo.MenuOrder - 1)
preMenuInfo := system.GetMenuInfoByMenuOrder(menuInfo.MenuOrder - 1)
menuInfo.MenuOrder = menuInfo.MenuOrder - 1
preMenuInfo.MenuOrder = preMenuInfo.MenuOrder + 1
preMenuInfo.UpdateTime = time.Now()
menuInfo.UpdateTime = time.Now()
//更新菜单表
system2.UpdateMenuInfo(preMenuInfo)
system2.UpdateMenuInfo(menuInfo)
system.UpdateMenuInfo(preMenuInfo)
system.UpdateMenuInfo(menuInfo)
//更新二级菜单表
SortSecondMenuOrder(preMenuInfo)
SortSecondMenuOrder(menuInfo)
@@ -55,26 +55,26 @@ func (c *UpdateService) UpMenu(menuUid string) *datas.BaseDataJSON {
}
func (c *UpdateService) DownMenu(menuUid string) *datas.BaseDataJSON {
menuInfo := system2.GetMenuInfoByMenuUid(menuUid)
menuInfo := system.GetMenuInfoByMenuUid(menuUid)
dataJSON := new(datas.BaseDataJSON)
if menuInfo.MenuUid == "" {
dataJSON.Msg = "更改排列顺序失败"
dataJSON.Code = -1
} else {
exist := system2.MenuOrderIsExists(menuInfo.MenuOrder + 1)
exist := system.MenuOrderIsExists(menuInfo.MenuOrder + 1)
if !exist {
dataJSON.Msg = "已经是最高的顺序"
dataJSON.Code = -1
} else {
//如果他前面有菜单那么交换他们的menuOrder
lastMenuInfo := system2.GetMenuInfoByMenuOrder(menuInfo.MenuOrder + 1)
lastMenuInfo := system.GetMenuInfoByMenuOrder(menuInfo.MenuOrder + 1)
menuInfo.MenuOrder = menuInfo.MenuOrder + 1
lastMenuInfo.MenuOrder = lastMenuInfo.MenuOrder - 1
lastMenuInfo.UpdateTime = time.Now()
menuInfo.UpdateTime = time.Now()
//更新菜单表
system2.UpdateMenuInfo(lastMenuInfo)
system2.UpdateMenuInfo(menuInfo)
system.UpdateMenuInfo(lastMenuInfo)
system.UpdateMenuInfo(menuInfo)
//更新二级菜单表
SortSecondMenuOrder(lastMenuInfo)
SortSecondMenuOrder(menuInfo)
@@ -85,19 +85,19 @@ func (c *UpdateService) DownMenu(menuUid string) *datas.BaseDataJSON {
}
func (c *UpdateService) UpSecondMenu(secondMenuUid string) *datas.BaseDataJSON {
secondMenuInfo := system2.GetSecondMenuInfoBySecondMenuUid(secondMenuUid)
secondMenuInfo := system.GetSecondMenuInfoBySecondMenuUid(secondMenuUid)
dataJSON := new(datas.BaseDataJSON)
if secondMenuInfo.MenuOrder == 1 {
dataJSON.Code = -1
} else {
preSecondMenuInfo := system2.GetSecondMenuInfoByMenuOrder(secondMenuInfo.MenuOrder-1, secondMenuInfo.FirstMenuUid)
preSecondMenuInfo := system.GetSecondMenuInfoByMenuOrder(secondMenuInfo.MenuOrder-1, secondMenuInfo.FirstMenuUid)
preSecondMenuInfo.MenuOrder = preSecondMenuInfo.MenuOrder + 1
preSecondMenuInfo.UpdateTime = time.Now()
secondMenuInfo.MenuOrder = secondMenuInfo.MenuOrder - 1
secondMenuInfo.UpdateTime = time.Now()
//更新二级菜单项
system2.UpdateSecondMenu(preSecondMenuInfo)
system2.UpdateSecondMenu(secondMenuInfo)
system.UpdateSecondMenu(preSecondMenuInfo)
system.UpdateSecondMenu(secondMenuInfo)
dataJSON.Code = 200
}
@@ -105,23 +105,23 @@ func (c *UpdateService) UpSecondMenu(secondMenuUid string) *datas.BaseDataJSON {
}
func (c *UpdateService) DownSecondMenu(secondMenuUid string) *datas.BaseDataJSON {
secondMenuInfo := system2.GetSecondMenuInfoBySecondMenuUid(secondMenuUid)
secondMenuInfo := system.GetSecondMenuInfoBySecondMenuUid(secondMenuUid)
dataJSON := new(datas.BaseDataJSON)
l := system2.GetSecondMenuLenByFirstMenuUid(secondMenuInfo.FirstMenuUid)
l := system.GetSecondMenuLenByFirstMenuUid(secondMenuInfo.FirstMenuUid)
if l == secondMenuInfo.MenuOrder {
dataJSON.Code = -1
} else {
lastSecondMenu := system2.GetSecondMenuInfoByMenuOrder(secondMenuInfo.MenuOrder+1, secondMenuInfo.FirstMenuUid)
lastSecondMenu := system.GetSecondMenuInfoByMenuOrder(secondMenuInfo.MenuOrder+1, secondMenuInfo.FirstMenuUid)
lastSecondMenu.MenuOrder = lastSecondMenu.MenuOrder - 1
lastSecondMenu.UpdateTime = time.Now()
secondMenuInfo.MenuOrder = secondMenuInfo.MenuOrder + 1
secondMenuInfo.UpdateTime = time.Now()
system2.UpdateSecondMenu(lastSecondMenu)
system2.UpdateSecondMenu(secondMenuInfo)
system.UpdateSecondMenu(lastSecondMenu)
system.UpdateSecondMenu(secondMenuInfo)
dataJSON.Code = 200
}
@@ -179,7 +179,7 @@ func (c *UpdateService) EditOperator(password, changePassword, role, userId, nic
} else {
userInfo.UpdateTime = time.Now()
userInfo.Remark = remark
roleInfo := system2.GetRoleByRoleUid(role)
roleInfo := system.GetRoleByRoleUid(role)
userInfo.RoleName = roleInfo.RoleName
userInfo.Role = role
if len(password) > 0 && len(changePassword) > 0 && password == changePassword {

View File

@@ -1,8 +1,8 @@
package main
import (
_ "boss/models"
_ "boss/routers"
_ "boss/internal/models"
_ "boss/internal/routers"
"github.com/beego/beego/v2/core/logs"
"github.com/beego/beego/v2/server/web"

View File

@@ -5,7 +5,7 @@
<head>
<meta charset="utf-8">
<title>管理后台</title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<link href="../static/css/basic.css" rel="stylesheet" type="text/css">
<script src="../static/js/filter.js"></script>
<style type="text/css">
.explain {
@@ -27,14 +27,14 @@
<div class="search">
<div>
商户名称:
<input type="text" id="account-name">
<input id="account-name" type="text">
</div>
<div>
商户编号:
<input type="text" id="account-no">
<input id="account-no" type="text">
</div>
<div>
<button type="button" class="btn btn-default" id="account-search">搜索</button>
<button class="btn btn-default" id="account-search" type="button">搜索</button>
</div>
</div>
<div>
@@ -97,24 +97,24 @@
</li>
<li class="pre_page">上一页</li>
<li class="next_page">下一页</li>
<li class="jump_page">跳转 <input type="text" name="jump_page" value="">
<button type="button" class="btn btn-default">Go</button>
<li class="jump_page">跳转 <input name="jump_page" type="text" value="">
<button class="btn btn-default" type="button">Go</button>
</li>
</div>
</div>
<div class="modal fade" id="account-solve" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div aria-labelledby="myModalLabel" class="modal fade" id="account-solve" role="dialog" tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">订单处理</h4>
</div>
<div class="modal-body modal-body-order-solve">
<input type="text" id="account-uid-edit" hidden>
<input hidden id="account-uid-edit" type="text">
<div style="display: flex">
<div>
<label>
操作:
<select value="" id="account-edit-operator">
<select id="account-edit-operator" value="">
<option value="plus_amount">加款</option>
<option value="sub_amount">减款</option>
</select>
@@ -122,14 +122,15 @@
</div>
<div>
<label>
<input type="text" value="" id="account-edit-operator-amount" placeholder="请输入增加(减少)金额">
<input id="account-edit-operator-amount" placeholder="请输入增加(减少)金额" type="text"
value="">
</label>
</div>
</div>
<div>
<label>
二次验证:
<input type="text" value="" id="order-info-totp">
<input id="order-info-totp" type="text" value="">
</label>
</div>
<div>
@@ -137,25 +138,25 @@
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default account-edit-save">确定</button>
<button type="button" class="btn btn-default cancel-order-solve" data-dismiss="modal">取消</button>
<button class="btn btn-default account-edit-save" type="button">确定</button>
<button class="btn btn-default cancel-order-solve" data-dismiss="modal" type="button">取消</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="delete-solve" tabindex="-1" role="dialog" aria-labelledby="myModalDeleteLabel">
<div aria-labelledby="myModalDeleteLabel" class="modal fade" id="delete-solve" role="dialog" tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">二次验证</h4>
</div>
<div class="modal-body modal-body-order-solve">
<input type="text" id="account-uid-delete" hidden>
<input hidden id="account-uid-delete" type="text">
<div>
<label>
二次验证:
<input type="text" value="" id="order-info-delete-totp">
<input id="order-info-delete-totp" type="text" value="">
</label>
</div>
<div>
@@ -163,8 +164,8 @@
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default account-delete-save">确定</button>
<button type="button" class="btn btn-default cancel-order-solve" data-dismiss="modal">取消</button>
<button class="btn btn-default account-delete-save" type="button">确定</button>
<button class="btn btn-default cancel-order-solve" data-dismiss="modal" type="button">取消</button>
</div>
</div>
</div>

View File

@@ -4,9 +4,10 @@
<head>
<meta charset="utf-8">
<title>后台管理</title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<link rel="stylesheet" type="text/css" href="../static/lib/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../static/lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css">
<link href="../static/css/basic.css" rel="stylesheet" type="text/css">
<link href="../static/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="../static/lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet"
type="text/css">
<script src="../static/js/filter.js"></script>
<script src="../static/js/jquery.min.js"></script>
<script src="../static/lib/bootstrap/js/bootstrap.min.js"></script>
@@ -17,16 +18,19 @@
#account-history-table-body tr {
height: 30px;
}
.account-history-record .search {
margin: 0;
padding: 0;
}
.search label {
font-weight: normal;
margin-top: 10px;
margin-bottom: 10px;
margin-right: 20px;
}
.search label select {
height: 30px;
}
@@ -37,19 +41,19 @@
<div class="search">
<label for="">
开始时间:
<input type="text" name="" value="" id="account-history-start-time" class="start-time" value="">
<input class="start-time" id="account-history-start-time" name="" type="text" value="" value="">
</label>
<label for="">
结束时间:
<input type="text" name="" value="" id="account-history-end-time" class="end-time" value="">
<input class="end-time" id="account-history-end-time" name="" type="text" value="" value="">
</label>
<label for="">
账户名称:
<input type="text" id="account-history-name" value="">
<input id="account-history-name" type="text" value="">
</label>
<label for="">
账户编号:
<input type="text" id="account-history-no" value="">
<input id="account-history-no" type="text" value="">
</label>
<label for="">
动账类型:
@@ -62,7 +66,7 @@
</select>
</label>
<button type="button" class="btn btn-primary" id="account-history-search">搜索</button>
<button class="btn btn-primary" id="account-history-search" type="button">搜索</button>
</div>
<div class="menu-table">
@@ -97,7 +101,9 @@
<li class="current_total_page"><span class="current_page">0</span>/<span class="total_page">0</span></li>
<li class="pre_page">上一页</li>
<li class="next_page">下一页</li>
<li class="jump_page">跳转 <input type="text" name="jump_page" value=""> <button type="button" class="btn btn-default">Go</button></li>
<li class="jump_page">跳转 <input name="jump_page" type="text" value="">
<button class="btn btn-default" type="button">Go</button>
</li>
</div>
</div>
@@ -125,6 +131,7 @@
"endTime": endTime
};
}
function setAccountHistoryCutPageValues(res) {
$(".current_page").html(res.CurrentPage);
$(".total_page").html(res.TotalPage);
@@ -150,6 +157,7 @@
$("#account-history-table-body").html(str);
}
function ajaxAccountHistoryList(dataJSON) {
$.ajax({
url: "/get/account/history",
@@ -169,6 +177,7 @@
}
});
}
$("#account-history-search").click(function () {
let dataJSON = getAccountHistoryCutPageValues();
ajaxAccountHistoryList(dataJSON);

View File

@@ -3,9 +3,10 @@
<head>
<meta charset="UTF-8">
<title>管理后台</title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<link rel="stylesheet" type="text/css" href="../static/lib/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../static/lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css">
<link href="../static/css/basic.css" rel="stylesheet" type="text/css">
<link href="../static/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="../static/lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet"
type="text/css">
<script src="../static/js/filter.js"></script>
<script src="../static/js/jquery.min.js"></script>
<script src="../static/lib/bootstrap/js/bootstrap.min.js"></script>
@@ -16,9 +17,11 @@
.search label {
font-weight: normal;
}
#select-agent-name, #select-merchant-name {
margin-right: 20px;
}
.search label select {
height: 30px;
line-height: 30px;
@@ -29,13 +32,13 @@
<div class="search">
<label for="">
代理名称:
<select name="" id="select-agent-name"></select>
<select id="select-agent-name" name=""></select>
</label>
<label for="">
商户名称:
<select name="" id="select-merchant-name"></select>
<select id="select-merchant-name" name=""></select>
</label>
<input type="button" class="btn btn-primary" value="开始" onclick="search(getValues());">
<input class="btn btn-primary" onclick="search(getValues());" type="button" value="开始">
</div>
<div class="menu-table">
<table>
@@ -69,7 +72,9 @@
<li class="current_total_page"><span class="current_page">0</span>/<span class="total_page">0</span></li>
<li class="pre_page">上一页</li>
<li class="next_page">下一页</li>
<li class="jump_page">跳转 <input type="text" name="jump_page" value=""> <button type="button" class="btn btn-default">Go</button></li>
<li class="jump_page">跳转 <input name="jump_page" type="text" value="">
<button class="btn btn-default" type="button">Go</button>
</li>
</div>
<script>
@@ -107,6 +112,7 @@
}
search(dataJSON);
});
function getValues() {
let displayCount = $("#display_count").val();
let currentPage = $(".current_page").html();
@@ -151,6 +157,7 @@
$("#table-body").html(str);
}
function deleteRelation(merchantUid) {
if (!confirm("是否删除?")) {
return
@@ -173,6 +180,7 @@
}
});
}
function search(dataJSON) {
$.ajax({
url: "/get/agent/to/merchant",

View File

@@ -4,29 +4,35 @@
<head>
<meta charset="utf-8">
<title>管理后台</title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<link href="../static/css/basic.css" rel="stylesheet" type="text/css">
<script src="../static/js/jquery.min.js"></script>
<script src="../static/js/filter.js"></script>
<style>
.add-bank-card, .bank-card-record {
overflow-x: hidden;
}
fieldset {
margin-top: 10px;
}
legend {
width: 60px;
}
fieldset div {
margin-bottom: 20px;
}
fieldset div span {
display: inline-block;
width: 120px;
}
#certificate-type {
height: 30px;
}
.bank-card-footer {
height: 40px;
width: 100%
@@ -34,6 +40,7 @@
/* border: 1px solid #e7e7e7; */
margin-top: 10px;
}
.bank-card-footer span {
display: inline-block;
text-align: center;
@@ -44,19 +51,23 @@
line-height: 40px;
margin-left: 20px;
}
.bank-card-footer span:hover {
background-color: red;
cursor: pointer;
}
.add-card-button {
margin-bottom: 10px;
}
.bank-card-search {
border-bottom: 1px solid #e7e7e7;
margin-bottom: 10px;
margin-top: 10px;
padding-bottom: 10px;
}
.account-name-search {
margin-right: 10px;
}
@@ -67,11 +78,11 @@
<div class="row bank-card-search">
<div class="col-md-4">
<span>开户名:</span>
<input type="text" value="" class="account-name-search" placeholder="模糊匹配">
<input class="account-name-search" placeholder="模糊匹配" type="text" value="">
<button class="btn btn-info bank-card-button">搜索</button>
</div>
</div>
<button type="button" class="btn btn-default btn-xs glyphicon glyphicon-plus add-card-button">添加银行卡</button>
<button class="btn btn-default btn-xs glyphicon glyphicon-plus add-card-button" type="button">添加银行卡</button>
<div class="menu-table">
<table>
<thead class="thead-dark">
@@ -110,7 +121,9 @@
<li class="current_total_page"><span class="current_page">0</span>/<span class="total_page">0</span></li>
<li class="pre_page">上一页</li>
<li class="next_page">下一页</li>
<li class="jump_page">跳转 <input type="text" name="jump_page" value=""> <button type="button" class="btn btn-default">Go</button></li>
<li class="jump_page">跳转 <input name="jump_page" type="text" value="">
<button class="btn btn-default" type="button">Go</button>
</li>
</div>
</div>
@@ -119,19 +132,19 @@
<legend>添加银行卡</legend>
<div class="row">
<div class="col-md-4">
<input type="hidden" value="" class="bank-card-uid">
<input class="bank-card-uid" type="hidden" value="">
<div>
<span>商户名称:</span>
<select name="" class="user-name" id="select-self-name">
<select class="user-name" id="select-self-name" name="">
</select>
</div>
<div>
<span>银行编码:</span>
<input type="text" value="" class="bank-code">
<input class="bank-code" type="text" value="">
</div>
<div>
<span>银行开户名:</span>
<input type="text" value="" class="account-name">
<input class="account-name" type="text" value="">
</div>
<div>
<span>证件类型:</span>
@@ -141,14 +154,14 @@
</div>
<div>
<span>手机号:</span>
<input type="text" value="" placeholder="" class="phone-code">
<input class="phone-code" placeholder="" type="text" value="">
</div>
</div>
<div class="col-md-4">
<div>
<span>银行名称:</span>
<input type="text" value="" placeholder="" class="bank-name">
<input class="bank-name" placeholder="" type="text" value="">
</div>
<div>
<span>银行账户类型</span>
@@ -159,15 +172,15 @@
</div>
<div>
<span>银行卡账号:</span>
<input type="text" placeholder="" class="bank-no">
<input class="bank-no" placeholder="" type="text">
</div>
<div>
<span>证件号:</span>
<input type="text" class="certificate-no" value="" placeholder="">
<input class="certificate-no" placeholder="" type="text" value="">
</div>
<div>
<span>开户行详细地址:</span>
<input type="text" class="bank-address" value="" placeholder="">
<input class="bank-address" placeholder="" type="text" value="">
</div>
</div>
</div>
@@ -196,6 +209,7 @@
"jumpPage": jumpPage
};
}
function editBankCard(uid) {
$.ajax({
url: "/get/oneBankCard",
@@ -259,6 +273,7 @@
}
});
}
function showBankCradRecord(dataJSON) {
// let dataJSON = getBankCardData();
$.ajax({
@@ -304,6 +319,7 @@
}
});
}
$(function () {
$(".add-bank-card").hide();
showBankCradRecord(getBankCardData());
@@ -319,6 +335,7 @@
$(".add-bank-card").show();
$(".bank-card-record").hide();
});
function clearBankCardData() {
$(".user-name").val("");
$(".bank-code").val("");
@@ -332,6 +349,7 @@
$(".bank-address").val("");
$(".bank-card-uid").html("");
}
function getBankCardData() {
let userName = $(".user-name").val();
let bankCode = $(".bank-code").val();
@@ -361,6 +379,7 @@
"bankAddress": bankAddress
};
}
//当每页显示数更改后,执行的操作
$("#display_count").change(function () {
let dataJSON = getCutPageval();
@@ -461,6 +480,7 @@
}
});
}
$(function () {
setAccount();
});

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<title>管理后台</title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<link href="../static/css/basic.css" rel="stylesheet" type="text/css">
<link src="../static/lib/bootstrap/css/bootstrap.min.css">
<script src="../static/js/jquery.min.js"></script>
<script src="../static/lib/bootstrap/js/bootstrap.min.js"></script>
@@ -13,6 +13,7 @@
font-weight: normal;
margin-right: 20px;
}
.margin-bottom {
margin-bottom: 20px;
}
@@ -26,28 +27,28 @@
<div class="panel-body">
<div class="margin-bottom">
<label for="">
<input type="radio" name="confirm" value="payfor_road" checked>通道打款
<input checked name="confirm" type="radio" value="payfor_road">通道打款
</label>
<label for="">
<input type="radio" name="confirm" value="payfor_refuse">拒绝打款
<input name="confirm" type="radio" value="payfor_refuse">拒绝打款
</label>
<label for="">
<input type="radio" name="confirm" value="payfor_hand">手动打款
<input name="confirm" type="radio" value="payfor_hand">手动打款
</label>
<label for="">
备注:<input type="text" id="remark" value=""><span class="color-red"> *必须</span>
备注:<input id="remark" type="text" value=""><span class="color-red"> *必须</span>
</label>
<input type="button" class="btn btn-success" value="确定" onclick="yes();">
<input class="btn btn-success" onclick="yes();" type="button" value="确定">
</div>
<div class="margin-bottom" id="road">
<label for="">
请选择打款通道:
<input type="text" value="" id="road-name"><span class="color-red"> *必须</span>
<input type="button" class="btn btn-info" value="搜索" id="road-search">
<input id="road-name" type="text" value=""><span class="color-red"> *必须</span>
<input class="btn btn-info" id="road-search" type="button" value="搜索">
</label>
<label for="">
<input type="text" value="" id="balance">
<button type="button" class="btn btn-primary" onclick="getBalance();">显示余额
<input id="balance" type="text" value="">
<button class="btn btn-primary" onclick="getBalance();" type="button">显示余额
</label>
</div>
@@ -87,7 +88,9 @@
<li class="current_total_page"><span class="current_page">0</span>/<span class="total_page">0</span></li>
<li class="pre_page">上一页</li>
<li class="next_page">下一页</li>
<li class="jump_page">跳转 <input type="text" name="jump_page" value=""> <button type="button" class="btn btn-default">Go</button></li>
<li class="jump_page">跳转 <input name="jump_page" type="text" value="">
<button class="btn btn-default" type="button">Go</button>
</li>
</div>
</div>
@@ -103,6 +106,7 @@
$(".road-list").show();
}
});
function getCutPageValues() {
let displayCount = $("#display_count").val();
let currentPage = $(".current_page").html();
@@ -117,6 +121,7 @@
"roadName": roadName
};
}
//当每页显示数更改后,执行的操作
$("#display_count").change(function () {
let dataJSON = getCutPageValues();
@@ -151,6 +156,7 @@
}
ajaxRoadList(dataJSON);
});
function setCutPageValues(res) {
$(".current_page").html(res.CurrentPage);
$(".total_page").html(res.TotalPage);
@@ -161,6 +167,7 @@
});
$(".jump_page input").val("");
}
function randRoadList(res) {
setCutPageValues(res);
let str = "";
@@ -177,6 +184,7 @@
$("#table-body").html(str);
}
}
function ajaxRoadList(dataJSON) {
$.ajax({
url: "/get/road",
@@ -193,6 +201,7 @@
}
});
}
function getBalance() {
let roadName = $("#road-name").val();
$.ajax({
@@ -212,6 +221,7 @@
}
});
}
function yes() {
let roadName = $("#road-name").val();
let remark = $("#remark").val();
@@ -244,9 +254,11 @@
}
});
}
function save(roadName) {
$("#road-name").val(roadName);
}
//搜索列表
$("#road-search").click(function () {
let dataJSON = getCutPageValues();

View File

@@ -4,16 +4,18 @@
<head>
<meta charset="utf-8">
<title>管理后台</title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<link href="../static/css/basic.css" rel="stylesheet" type="text/css">
<script src="../static/js/filter.js"></script>
<style>
#create-agent span {
display: inline-block;
width: 100px;
}
#create-agent div {
margin-bottom: 15px;
}
.add-agnet-button {
margin-bottom: 10px;
}
@@ -23,13 +25,16 @@
color: red;
margin-left: 10px;
}
#reset-agent-password span {
display: inline-block;
width: 100px;
}
#reset-agent-password div {
margin-bottom: 10px;
}
#agent-login-password-error-reset, #agent-vertify-password-error-reset {
color: red;
}
@@ -40,40 +45,42 @@
<div class="search">
<div>
代理名称:
<input type="text" value="" placeholder="模糊匹配" id="agent-name-search">
<input id="agent-name-search" placeholder="模糊匹配" type="text" value="">
</div>
<div>
<button type="button" class="btn btn-default" id="agent-search">搜索</button>
<button class="btn btn-default" id="agent-search" type="button">搜索</button>
</div>
</div>
<button type="button" class="btn btn-default btn-xs glyphicon glyphicon-plus add-agnet-button">创建代理</button>
<button class="btn btn-default btn-xs glyphicon glyphicon-plus add-agnet-button" type="button">创建代理</button>
<!-- 创建代理的模态框 -->
<div class="modal fade" id="create-agent" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-keyboard="false" data-backdrop="static">
<div aria-labelledby="myModalLabel" class="modal fade" data-backdrop="static" data-keyboard="false" id="create-agent"
role="dialog" tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<button aria-label="Close" class="close" data-dismiss="modal" type="button"><span
aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabel">创建代理商</h4>
</div>
<div class="modal-body modal-body-agent">
<div>
<span>代理商名称:</span>
<input type="text" id="agent-name-modal">
<input id="agent-name-modal" type="text">
<span id="agent-name-error"></span>
</div>
<div>
<span>注册手机号:</span>
<input type="text" id="agent-phone-modal">
<input id="agent-phone-modal" type="text">
<span id="agent-phone-error"></span>
</div>
<div>
<span>账号登录密码:</span>
<input type="password" id="agent-login-password-modal">
<input id="agent-login-password-modal" type="password">
<span id="agent-login-password-error"></span>
</div>
<div>
<span>确认密码:</span>
<input type="password" id="agent-vertify-password-modal">
<input id="agent-vertify-password-modal" type="password">
<span id="agent-vertify-password-error"></span>
</div>
@@ -81,7 +88,8 @@
<span>代理商状态:</span>
<select id="agent-status">
<option value="active">激活</option>
<option value="unactive">冻结</option>}
<option value="unactive">冻结</option>
}
</select>
</div>
<div>
@@ -90,8 +98,8 @@
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default cancel-agent" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary save-agent">保存</button>
<button class="btn btn-default cancel-agent" data-dismiss="modal" type="button">取消</button>
<button class="btn btn-primary save-agent" type="button">保存</button>
</div>
</div>
</div>
@@ -129,49 +137,55 @@
<li class="current_total_page"><span class="current_page">0</span>/<span class="total_page">0</span></li>
<li class="pre_page">上一页</li>
<li class="next_page">下一页</li>
<li class="jump_page">跳转 <input type="text" name="jump_page" value=""> <button type="button" class="btn btn-default">Go</button></li>
<li class="jump_page">跳转 <input name="jump_page" type="text" value="">
<button class="btn btn-default" type="button">Go</button>
</li>
</div>
</div>
<!-- 充值密码 -->
<div class="modal fade" id="reset-agent-password" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-keyboard="false" data-backdrop="static">
<div aria-labelledby="myModalLabel" class="modal fade" data-backdrop="static" data-keyboard="false" id="reset-agent-password"
role="dialog" tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<button aria-label="Close" class="close" data-dismiss="modal" type="button"><span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="myModalLabel">重置密码</h4>
</div>
<div class="modal-body modal-body-agent">
<input type="text" hidden="true" value="" id="agent-uid-reset">
<input hidden="true" id="agent-uid-reset" type="text" value="">
<div>
<span>新密码:</span>
<input type="password" id="agent-login-password-reset">
<input id="agent-login-password-reset" type="password">
<span id="agent-login-password-error-reset"></span>
</div>
<div>
<span>确认新密码:</span>
<input type="password" id="agent-vertify-password-reset">
<input id="agent-vertify-password-reset" type="password">
<span id="agent-vertify-password-error-reset"></span>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default cancel-agent-reset" data-dismiss="modal">放弃</button>
<button type="button" class="btn btn-primary save-agent-reset">重置</button>
<button class="btn btn-default cancel-agent-reset" data-dismiss="modal" type="button">放弃</button>
<button class="btn btn-primary save-agent-reset" type="button">重置</button>
</div>
</div>
</div>
</div>
<!-- 操作代理商 -->
<div class="modal fade" id="operator-agent" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-keyboard="false" data-backdrop="static">
<div aria-labelledby="myModalLabel" class="modal fade" data-backdrop="static" data-keyboard="false" id="operator-agent"
role="dialog" tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<button aria-label="Close" class="close" data-dismiss="modal" type="button"><span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="myModalLabel">代理商操作</h4>
</div>
<div class="modal-body modal-body-agent">
<input type="text" hidden="true" value="" id="agent-uid-operator">
<input hidden="true" id="agent-uid-operator" type="text" value="">
<div>
<span>操作类型:</span>
<select id="agent-opertor">
@@ -183,7 +197,7 @@
</div>
<div>
<span>操作金额:</span>
<input type="password" id="agent-opertor-amount">
<input id="agent-opertor-amount" type="password">
</div>
<div>
<span>操作结果:</span>
@@ -191,8 +205,8 @@
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default cancel-agent-reset" data-dismiss="modal">放弃</button>
<button type="button" class="btn btn-primary save-agent-reset">重置</button>
<button class="btn btn-default cancel-agent-reset" data-dismiss="modal" type="button">放弃</button>
<button class="btn btn-primary save-agent-reset" type="button">重置</button>
</div>
</div>
</div>
@@ -216,6 +230,7 @@
"status": status
};
}
function getAgentCutPageValues() {
let displayCount = $("#display_count").val();
let currentPage = $(".current_page").html();
@@ -246,6 +261,7 @@
$("#agent-login-password-error").html("");
$("#agent-vertify-password-error").html("");
}
function clearAgentCutPageValues(res) {
$(".current_page").html(res.CurrentPage);
$(".total_page").html(res.TotalPage);
@@ -256,6 +272,7 @@
});
$(".jump_page input").val("");
}
function showAgentList(res) {
clearAgentCutPageValues(res);
let str = "";
@@ -294,6 +311,7 @@
$("#agent-vertify-password-error-reset").html("");
$("#reset-agent-password").modal();
}
function updateAgentStatus(agentUid) {
$.ajax({
url: "/update/agent/status",

View File

@@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<title>管理后台</title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<link href="../static/css/basic.css" rel="stylesheet" type="text/css">
<script src="../static/js/jquery.min.js"></script>
<script src="../static/lib/bootstrap/js/bootstrap.min.js"></script>
<script src="../static/js/jquery.ui.min.js"></script>
@@ -15,13 +15,16 @@
height: 500px;
overflow-y: hidden;
}
.modal-content {
overflow: auto;
max-height: 500px;
}
.modal-header {
padding: 10px;
}
.modal-footer {
padding-top: 10px;
padding-bottom: 30px;
@@ -30,18 +33,20 @@
</head>
<body>
<!-- 权限配置模态框 -->
<div class="modal fade" id="deployRoleModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-keyboard="false" data-backdrop="static">
<div aria-labelledby="myModalLabel" class="modal fade" data-backdrop="static" data-keyboard="false" id="deployRoleModal"
role="dialog" tabindex="-1">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<button aria-label="Close" class="close" data-dismiss="modal" type="button"><span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="deployButton">配置权限项</h4>
</div>
<div class="modal-body modal-body-deploy">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default cancel-deploy" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary save-deploy">保存</button>
<button class="btn btn-default cancel-deploy" data-dismiss="modal" type="button">取消</button>
<button class="btn btn-primary save-deploy" type="button">保存</button>
</div>
</div>
</div>
@@ -69,7 +74,12 @@
let roleUid = $("#roleUid").html();
savePower({"firstMenuUid":firstMenuUid, "secondMenuUid":secondMenuUid, "powerId":powerId, "roleUid": roleUid});
savePower({
"firstMenuUid": firstMenuUid,
"secondMenuUid": secondMenuUid,
"powerId": powerId,
"roleUid": roleUid
});
});
//对已经选择checkbox进行打钩

View File

@@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<title>管理后台</title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<link href="../static/css/basic.css" rel="stylesheet" type="text/css">
<script src="../static/js/jquery.min.js"></script>
<script src="../static/js/filter.js"></script>
<script src="../static/js/basic.js"></script>
@@ -16,24 +16,26 @@
</head>
<body>
<!-- 添加菜单的模态框 -->
<div class="modal fade" id="addMenuModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-keyboard="false" data-backdrop="static">
<div aria-labelledby="myModalLabel" class="modal fade" data-backdrop="static" data-keyboard="false" id="addMenuModal"
role="dialog" tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<button aria-label="Close" class="close" data-dismiss="modal" type="button"><span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="myModalLabel">添加一级菜单</h4>
</div>
<div class="modal-body modal-body-menu">
<div class="input-group first-input-group">
<span class="input-group-addon basic-addon3">一级菜单</span>
<input type="text" class="form-control basic-url">
<input class="form-control basic-url" type="text">
<span class="first-menu-error"></span>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default cancel-menu" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary save-menu">保存</button>
<button class="btn btn-default cancel-menu" data-dismiss="modal" type="button">取消</button>
<button class="btn btn-primary save-menu" type="button">保存</button>
</div>
</div>
</div>
@@ -41,14 +43,16 @@
<div class="search">
<div>
<span>一级菜单</span>
<input type="text" class="first-menu-serach" placeholder="模糊匹配" value="">
<input class="first-menu-serach" placeholder="模糊匹配" type="text" value="">
</div>
<div>
<button type="button" class="btn btn-default first-menu-search">搜索</button>
<button class="btn btn-default first-menu-search" type="button">搜索</button>
</div>
</div>
<div class="add-menu">
<button type="button" class="btn btn-default btn-xs glyphicon glyphicon-plus add-button" data-toggle="modal" data-target="#addMenuModal">添加一级菜单</button>
<button class="btn btn-default btn-xs glyphicon glyphicon-plus add-button" data-target="#addMenuModal" data-toggle="modal"
type="button">添加一级菜单
</button>
<strong>提示:创建导航菜单栏,一般由技术开发人员进行配置!</strong>
</div>
@@ -85,7 +89,9 @@
<li class="current_total_page"><span class="current_page">1</span>/<span class="total_page">2</span></li>
<li class="pre_page">上一页</li>
<li class="next_page">下一页</li>
<li class="jump_page">跳转 <input type="text" name="jump_page" value=""> <button type="button" class="btn btn-default">Go</button></li>
<li class="jump_page">跳转 <input name="jump_page" type="text" value="">
<button class="btn btn-default" type="button">Go</button>
</li>
</div>
@@ -96,6 +102,7 @@
dataJSON["firstMenuSearch"] = firstMenuSearch;
showMenuList(dataJSON);
});
//获取分页的基础数据
function getCutPageData() {
let displayCount = $("#display_count").val();
@@ -105,6 +112,7 @@
return {"displayCount": displayCount, "currentPage": currentPage, "totalPage": totalPage, "jumpPage": jumpPage};
}
$(".first-menu-search").click(function () {
showMenuList(getCutPageData());
});
@@ -181,10 +189,12 @@
function menuUp(menuUid) {
Ajax(menuUid, "/up/menu");
}
//降低菜单的顺序
function menuDown(menuUid) {
Ajax(menuUid, "/down/menu");
}
//删除菜单
function menuDelete(menuUid) {
if (!window.confirm("是否确定删除该项?")) {
@@ -192,6 +202,7 @@
}
Ajax(menuUid, "/delete/menu");
}
//此函数的作用,是在每行的最后一格,加入可操作的按钮图标
function showMenuList(dataJSON) {
$.ajax({

View File

@@ -3,14 +3,14 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta content="width=device-width, initial-scale=1" name="viewport">
<title>管理后台</title>
<link rel="stylesheet" type="text/css" href="../static/lib/bootstrap/css/bootstrap.min.css" />
<link href="../static/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<script src="../static/js/jquery.min.js"></script>
<script src="../static/lib/bootstrap/js/bootstrap.min.js"></script>
<script src="../static/js/filter.js"></script>
<style type="text/css" media="screen">
<style media="screen" type="text/css">
body {
overflow-y: hidden;
overflow-x: hidden;
@@ -136,12 +136,12 @@
<body>
<!-- 更改密码的模态框 -->
<div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
data-keyboard="false">
<div aria-labelledby="myModalLabel" class="modal fade" data-keyboard="false" id="logoutModal" role="dialog"
tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
<button aria-label="Close" class="close" data-dismiss="modal" type="button"><span
aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="myModalLabel">用户密码更改</h4>
@@ -153,7 +153,7 @@
<span>旧密码:</span>
</div>
<div class="col-xs-5">
<input class="old-passwrod" type="password" name=""> <span class="color-red">*</span>
<input class="old-passwrod" name="" type="password"> <span class="color-red">*</span>
</div>
<div class="col-xs-4 color-red old-error">
@@ -164,7 +164,7 @@
<span>新密码:</span>
</div>
<div class="col-xs-5">
<input class="new-password" type="password" name=""> <span class="color-red">*</span>
<input class="new-password" name="" type="password"> <span class="color-red">*</span>
</div>
<div class="col-xs-4 color-red new-error">
</div>
@@ -174,7 +174,7 @@
<span>再次输入新密码:</span>
</div>
<div class="col-xs-5">
<input class="twice-password" type="password" name=""> <span class="color-red">*</span>
<input class="twice-password" name="" type="password"> <span class="color-red">*</span>
</div>
<div class="col-xs-4 color-red twice-error">
@@ -182,19 +182,19 @@
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default password-cancal cancal-save" data-dismiss="modal">取消
<button class="btn btn-default password-cancal cancal-save" data-dismiss="modal" type="button">取消
</button>
<button type="button" class="btn btn-primary password-save">保存</button>
<button class="btn btn-primary password-save" type="button">保存</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="totpModal" tabindex="-1" role="dialog" aria-labelledby="myTotpLabel"
data-keyboard="false">
<div aria-labelledby="myTotpLabel" class="modal fade" data-keyboard="false" id="totpModal" role="dialog"
tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
<button aria-label="Close" class="close" data-dismiss="modal" type="button"><span
aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="totpLabel">TOTP二次验证</h4>
@@ -212,20 +212,20 @@
</div>
<div class="row margin-top-20 totp-body">
<div id="totp-img">
<img src="" alt="" srcset="">
<input value="" id="totp-secret" hidden>
<img alt="" src="" srcset="">
<input hidden id="totp-secret" value="">
</div>
<label>请输入二次验证:
<input id="totp-value" type="text" name="">
<input id="totp-value" name="" type="text">
</label>
</div>
<div class="col-xs-4 color-red totp-new-error">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default totp-cancal cancal-save" data-dismiss="modal">取消
<button class="btn btn-default totp-cancal cancal-save" data-dismiss="modal" type="button">取消
</button>
<button type="button" class="btn btn-primary totp-save">保存</button>
<button class="btn btn-primary totp-save" type="button">保存</button>
</div>
</div>
</div>
@@ -242,21 +242,22 @@
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false">
<a aria-expanded="false" aria-haspopup="true" class="dropdown-toggle" data-toggle="dropdown"
href="#"
role="button">
<span class="glyphicon glyphicon-user"></span>你好!管理员 <span class="caret"></span></a>
<ul class="dropdown-menu">
<li>
<a href="#" style="text-align: center;" data-toggle="modal" data-target="#logoutModal">
<a data-target="#logoutModal" data-toggle="modal" href="#" style="text-align: center;">
<i class="glyphicon glyphicon-cog change-password"></i> 更改密码</a>
</li>
<li>
<a href="#" style="text-align: center;" data-toggle="modal" data-target="#totpModal"> <i
<a data-target="#totpModal" data-toggle="modal" href="#" style="text-align: center;"> <i
class="glyphicon glyphicon-cog totp"></i>二次验证</a>
</li>
<li role="separator" class="divider"></li>
<li class="divider" role="separator"></li>
<li>
<a href="#" style="text-align: center;" class="logout"> <i
<a class="logout" href="#" style="text-align: center;"> <i
class="glyphicon glyphicon-off"></i> 退出登录</a>
</li>
</ul>
@@ -271,13 +272,13 @@
<div class="sider-bar">
<div>
<a href="#" class="first-menu" onclick='loadMainContent("/main.html")'>
<a class="first-menu" href="#" onclick='loadMainContent("/main.html")'>
<span class="glyphicon glyphicon-home"></span>
<span class="first-title">控制面板</span>
</a>
</div>
<div>
<a href="#" class="first-menu">
<a class="first-menu" href="#">
<span class="glyphicon glyphicon-wrench"></span>
<span class="first-title">权限控制</span>
<span class="glyphicon glyphicon-plus last-glyphicon"></span>
@@ -291,7 +292,7 @@
</div>
</div>
<div>
<a href="#" class="first-menu">
<a class="first-menu" href="#">
<span class="glyphicon glyphicon-road"></span>
<span class="first-title">通道管理</span>
<span class="glyphicon glyphicon-plus last-glyphicon"></span>
@@ -302,7 +303,7 @@
</div>
</div>
<div>
<a href="#" class="first-menu">
<a class="first-menu" href="#">
<span class="glyphicon glyphicon-user"></span>
<span class="first-title">商户管理</span>
<span class="glyphicon glyphicon-plus last-glyphicon"></span>
@@ -314,19 +315,33 @@
</div>
</div>
<div>
<a href="#" class="first-menu">
<a class="first-menu" href="#">
<span class="glyphicon glyphicon-user"></span>
<span class="first-title">Apple充值管理</span>
<span class="first-title">Apple兑换管理</span>
<span class="glyphicon glyphicon-plus last-glyphicon"></span>
</a>
<div class="second-menu">
<a href="#"
onclick='loadMainContent("/recharge-apple-card-account.html")'><span>苹果账户管理</span></a>
<a href="#" onclick='loadMainContent("/recharge-apple-card-order.html")'><span>充值订单管理</span></a>
<a href="#"
onclick='loadMainContent("/recharge-apple-card-order.html")'><span>订单管理</span></a>
</div>
</div>
<div>
<a href="#" class="first-menu">
<a class="first-menu" href="#">
<span class="glyphicon glyphicon-user"></span>
<span class="first-title">充值管理</span>
<span class="glyphicon glyphicon-plus last-glyphicon"></span>
</a>
<div class="second-menu">
<a href="#"
onclick='loadMainContent("/recharge-t-mall-game-account.html")'><span>天猫账户管理</span></a>
<a href="#"
onclick='loadMainContent("/recharge-t-mall-game-order.html")'><span>天猫订单管理</span></a>
</div>
</div>
<div>
<a class="first-menu" href="#">
<span class="glyphicon glyphicon-console"></span>
<span class="first-title">代理管理</span>
<span class="glyphicon glyphicon-plus last-glyphicon"></span>
@@ -338,7 +353,7 @@
</div>
<div>
<a href="#" class="first-menu">
<a class="first-menu" href="#">
<span class="glyphicon glyphicon-folder-open"></span>
<span class="first-title">资金管理</span>
<span class="glyphicon glyphicon-plus last-glyphicon"></span>
@@ -350,17 +365,17 @@
</div>
{{range.roadList}}
<div>
<a href="#" class="first-menu">
<a class="first-menu" href="#">
<span class="glyphicon glyphicon-book"></span>
<span class="first-title" data-toggle="tooltip" title="{{.RoadName}}">订单管理({{.RoadName}})</span>
<span class="glyphicon glyphicon-plus last-glyphicon"></span>
</a>
<div class="second-menu">
<a href="#" data-toggle="tooltip"
<a data-toggle="tooltip" href="#"
onclick='loadMainContent("/order_info.html?roadUid={{.RoadUid}}")'><span>实时订单</span></a>
<a href="#" data-toggle="tooltip"
<a data-toggle="tooltip" href="#"
onclick='loadMainContent("/order_profit.html?roadUid={{.RoadUid}}")'><span>订单收益</span></a>
<a href="#" data-toggle="tooltip"
<a data-toggle="tooltip" href="#"
onclick='loadMainContent("/order-summary-info.html?roadUid={{.RoadUid}}")'><span>订单汇总</span></a>
</div>
</div>
@@ -381,7 +396,7 @@
<!-- </div>-->
<!-- </div>-->
<div>
<a href="#" class="first-menu">
<a class="first-menu" href="#">
<span class="glyphicon glyphicon-piggy-bank"></span>
<span class="first-title">代付管理</span>
<span class="glyphicon glyphicon-plus last-glyphicon"></span>
@@ -395,7 +410,7 @@
</div>
<div>
<a href="#" class="first-menu">
<a class="first-menu" href="#">
<span class="glyphicon glyphicon-yen"></span>
<span class="first-title">分润管理</span>
<span class="glyphicon glyphicon-plus last-glyphicon"></span>
@@ -407,7 +422,7 @@
</div>
<div>
<a href="#" class="first-menu">
<a class="first-menu" href="#">
<span class="glyphicon glyphicon-edit"></span>
<span class="first-title">自助服务</span>
<span class="glyphicon glyphicon-plus last-glyphicon"></span>
@@ -418,7 +433,7 @@
</div>
</div>
<div>
<a href="#" class="first-menu">
<a class="first-menu" href="#">
<span class="glyphicon glyphicon-edit"></span>
<span class="first-title">支付测试</span>
<span class="glyphicon glyphicon-plus last-glyphicon"></span>
@@ -431,7 +446,7 @@
</div>
<div class="sider-right">
<input type="text" hidden="hidden" id="main-bank-order-id" value="">
<label for="main-bank-order-id"></label><input hidden="hidden" id="main-bank-order-id" type="text" value="">
<div class="main">
</div>
@@ -502,11 +517,11 @@
return;
}
if (!(newPassword == twicePassword)) {
if (!(newPassword === twicePassword)) {
setError(".twice-error", "新密码两次输入不一致!");
return;
}
if (oldPassword == newPassword) {
if (oldPassword === newPassword) {
setError(".new-error", "新密码不能和旧密码一样!");
return;
}
@@ -523,14 +538,14 @@
twicePassword: twicePassword
},
success: function (res) {
if (res.Code == 200) {
if (res.Code === 200) {
//将模态框关闭
$("input[type='password']").val("");
$(".cancal-save").trigger('click');
setTimeout("", 1500);//等待1.5秒
alert("密码修改成功!");
window.parent.location = "/login.html";
} else if (res.Code == 404) {
} else if (res.Code === 404) {
//用户登录已经过期,需要重新登录
window.parent.location = "/login.html";
} else {
@@ -632,8 +647,7 @@
const secret = $("#totp-secret").val();
const code = $("#totp-value").val();
const key = $("#totp-key").text();
console.log(secret, code, key)
if (secret === "" || code === "" || key === "") {
if (secret === "" || key === "") {
setError(".totp-new-error", "信息填写不完整,需要重新填写");
return;
}
@@ -671,5 +685,4 @@
margin: 20px;
}
</style>
</html>

View File

@@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<title>商戶后台</title>
<link rel="stylesheet" type="text/css" href="../static/lib/bootstrap/css/bootstrap.min.css">
<link href="../static/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<script src="../static/js/jquery.min.js"></script>
<script src="../static/js/jquery.min.js"></script>
<script src="../static/lib/bootstrap/js/bootstrap.min.js"></script>
@@ -14,13 +14,16 @@
margin-right: 1px;
text-align: center;
}
.first-menu-html, .second-menu-html {
height: 30px;
line-height: 30px;
}
.first-menu-html, .second-menu-html:hover {
cursor: pointer;
}
.first-menu-html {
border: 1px solid #d3d3d3;
border-radius: 2px;
@@ -50,11 +53,13 @@
$(".second-menu-html").css('background-color', 'white');
$(".menu-content-html").load("/jhboss/first_menu.html");
}
function clickSecondMenuHtml() {
$(".second-menu-html").css('background-color', 'skyblue');
$(".first-menu-html").css('background-color', 'white');
$(".menu-content-html").load("/jhboss/second_menu.html");
}
//默认打开的是一级菜单管理页面
$(function () {
clickFirstMenuHtml();

View File

@@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<title>管理后台</title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<link href="../static/css/basic.css" rel="stylesheet" type="text/css">
<script src="../static/js/filter.js"></script>
<style>
.merchant-record, .merchant-edit {
@@ -118,46 +118,46 @@
<div class="search">
<div>
商户名称:
<input type="text" value="" placeholder="模糊匹配" id="merchant-name-search">
<input id="merchant-name-search" placeholder="模糊匹配" type="text" value="">
</div>
<div>
商户编号:
<input type="text" value="" placeholder="" id="merchant-no-search">
<input id="merchant-no-search" placeholder="" type="text" value="">
</div>
<div>
<button type="button" class="btn btn-default" id="merchant-search">搜索</button>
<button class="btn btn-default" id="merchant-search" type="button">搜索</button>
</div>
</div>
<button type="button" class="btn btn-default btn-xs glyphicon glyphicon-plus add-merchant-button">添加商户</button>
<button class="btn btn-default btn-xs glyphicon glyphicon-plus add-merchant-button" type="button">添加商户</button>
<!-- 创建商户的模态框 -->
<div class="modal fade" id="create-merchant" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
data-keyboard="false" data-backdrop="static">
<div aria-labelledby="myModalLabel" class="modal fade" data-backdrop="static" data-keyboard="false" id="create-merchant"
role="dialog" tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
<button aria-label="Close" class="close" data-dismiss="modal" type="button"><span
aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabel">添加商户</h4>
</div>
<div class="modal-body modal-body-merchant">
<div>
<span>商户名称:</span>
<input type="text" id="merchant-name-modal">
<input id="merchant-name-modal" type="text">
<span id="merchant-name-error"></span>
</div>
<div>
<span>注册手机号:</span>
<input type="text" id="merchant-phone-modal">
<input id="merchant-phone-modal" type="text">
<span id="merchant-phone-error"></span>
</div>
<div>
<span>账号登录密码:</span>
<input type="password" id="merchant-login-password-modal">
<input id="merchant-login-password-modal" type="password">
<span id="merchant-login-password-error"></span>
</div>
<div>
<span>确认密码:</span>
<input type="password" id="merchant-vertify-password-modal">
<input id="merchant-vertify-password-modal" type="password">
<span id="merchant-verify-password-error"></span>
</div>
@@ -174,8 +174,8 @@
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default cancel-merchant" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary save-merchant">保存</button>
<button class="btn btn-default cancel-merchant" data-dismiss="modal" type="button">取消</button>
<button class="btn btn-primary save-merchant" type="button">保存</button>
</div>
</div>
</div>
@@ -214,8 +214,8 @@
<li class="current_total_page"><span class="current_page">0</span>/<span class="total_page">0</span></li>
<li class="pre_page">上一页</li>
<li class="next_page">下一页</li>
<li class="jump_page">跳转 <input type="text" name="jump_page" value="">
<button type="button" class="btn btn-default">Go</button>
<li class="jump_page">跳转 <input name="jump_page" type="text" value="">
<button class="btn btn-default" type="button">Go</button>
</li>
</div>
</div>
@@ -225,30 +225,30 @@
<div class="row">
<div class="col-md-4">
<span>商户名称:</span>
<input type="text" readonly="true" value="不可修改" id="merchant-edit-merchant-name">
<input id="merchant-edit-merchant-name" readonly="true" type="text" value="不可修改">
</div>
<div class="col-md-4">
<span>商户编号:</span>
<input type="text" readonly="true" value="" id="merchant-edit-merchant-no">
<input id="merchant-edit-merchant-no" readonly="true" type="text" value="">
</div>
</div>
<div class="row">
<div class="col-md-4">
<span>是否自动结算:</span>
<input type="radio" name="auto-settle-radio" value="yes" checked="checked">
<input type="radio" name="auto-settle-radio" value="no">
<input checked="checked" name="auto-settle-radio" type="radio" value="yes">
<input name="auto-settle-radio" type="radio" value="no">
</div>
<div class="col-md-4">
<span>是否自动代付:</span>
<input type="radio" name="auto-payfor-radio" value="yes" checked="checked">
<input type="radio" name="auto-payfor-radio" value="no">
<input checked="checked" name="auto-payfor-radio" type="radio" value="yes">
<input name="auto-payfor-radio" type="radio" value="no">
</div>
</div>
<div class="row">
<div class="col-md-12">
<span>请求ip白名单</span>
<textarea placeholder="多个ip隔开。" id="merchant-edit-ip-white"></textarea>
<textarea id="merchant-edit-ip-white" placeholder="多个ip隔开。"></textarea>
</div>
</div>
</fieldset>
@@ -262,7 +262,7 @@
<div class="col-md-6">
<span>支付类型:</span>
<label for="pay-type"></label>
<select id="pay-type" style="top: 31px;" value="CARD_DH" hidden>
<select hidden id="pay-type" style="top: 31px;" value="CARD_DH">
<option value="none">请选择</option>
<option value="CARD_DH">卡密兑换</option>
<option value="WEIXIN_SCAN">微信扫码</option>
@@ -291,49 +291,49 @@
<div class="row">
<div class="col-md-4">
<span>单通道:</span>
<input type="text" readonly id="single-road" value="" placeholder="">
<input id="single-road" placeholder="" readonly type="text" value="">
</div>
<div class="col-md-3">
<span style="width: 150px;">平台净利率:</span>
<input style="width: 60px;" type="text" readonly id="single-road-platform-fee" placeholder="例:0.3">
<input id="single-road-platform-fee" placeholder="例:0.3" readonly style="width: 60px;" type="text">
</div>
<div class="col-md-4">
<span style="width: 150px;">代理净利率:</span>
<input style="width: 60px;" type="text" id="single-road-agent-fee" placeholder="例:0.3">
<input id="single-road-agent-fee" placeholder="例:0.3" style="width: 60px;" type="text">
</div>
</div>
<div class="row">
<div class="col-md-4">
<span>轮询通道:</span>
<input type="text" readonly value="" placeholder="" id="roll-pool-road">
<input id="roll-pool-road" placeholder="" readonly type="text" value="">
</div>
<div class="col-md-3">
<span style="width: 150px;">轮询平台净利率:</span>
<input style="width: 60px;" type="text" name="" value="0" id="roll-road-platform-fee">
<input id="roll-road-platform-fee" name="" style="width: 60px;" type="text" value="0">
</div>
<div class="col-md-4">
<span style="width: 150px;">轮询代理净利率:</span>
<label for="roll-road-agent-fee">
<input style="width: 60px;" type="text" placeholder="" value="0"
id="roll-road-agent-fee">
<input id="roll-road-agent-fee" placeholder="" style="width: 60px;" type="text"
value="0">
</label>
</div>
</div>
<div class="row">
<div class="col-md-4">
<span>是否押款:</span>
<input type="radio" name="is-loan" value="yes" placeholder="">
<input type="radio" name="is-loan" value="no" placeholder="" checked="">
<input name="is-loan" placeholder="" type="radio" value="yes">
<input checked="" name="is-loan" placeholder="" type="radio" value="no">
</div>
<div class="col-md-4">
<span style="width: 150px;">押款比例:</span>
<input style="width: 60px;" type="text" placeholder="例:0.4" value="0" id="loan-rate">
<input id="loan-rate" placeholder="例:0.4" style="width: 60px;" type="text" value="0">
</div>
</div>
<div class="row">
<div class="col-md-4">
<span style="width: 100px;">押款天数:</span>
<input style="width: 60px;" type="text" name="" value="0" placeholder="x天" id="loan-days">
<input id="loan-days" name="" placeholder="x天" style="width: 60px;" type="text" value="0">
</div>
<div class="col-md-4">
<span style="width: 150px;">解款时间点:</span>
@@ -378,19 +378,19 @@
<div class="col-md-4">
<span>单代付通道:</span>
<label for="payfor-road-choose">
<input type="text" id="payfor-road-choose" value="" readonly placeholder="">
<input id="payfor-road-choose" placeholder="" readonly type="text" value="">
</label>
</div>
<div class="col-md-4">
<span>轮询代付通道:</span>
<label for="roll-payfor-road-choose">
<input type="text" id="roll-payfor-road-choose" value="" name="" readonly="true" placeholder="">
<input id="roll-payfor-road-choose" name="" placeholder="" readonly="true" type="text" value="">
</label>
</div>
<div class="col-md-4">
<span>代付手续费:</span>
<label for="payfor-fee">
<input id="payfor-fee" type="text" name="" value="0">
<input id="payfor-fee" name="" type="text" value="0">
</label>
</div>
</div>
@@ -400,10 +400,10 @@
<span style="color: blue;display: block;margin-bottom: 10px;">注意:每个商户同时最多只能有一个代理商</span>
<div class="row">
<span>代理商名称:</span>
<input type="text" id="belong-agent-name" readonly="readonly" value="" placeholder="">
<input id="belong-agent-name" placeholder="" readonly="readonly" type="text" value="">
<span>代理商uid</span>
<input type="text" id="belong-agent-uid" readonly="readonly">
<span id="find-merchant" class="glyphicon glyphicon-search"></span>
<input id="belong-agent-uid" readonly="readonly" type="text">
<span class="glyphicon glyphicon-search" id="find-merchant"></span>
</div>
</fieldset>
<div class="merchant-deploy-footer">
@@ -411,12 +411,12 @@
<button class="btn btn-success merchant-deploy-save-button" style="margin-top: 5px;margin-left: 20px;">保存
</button>
</div>
<div class="modal fade" id="roll-or-road-list" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
data-keyboard="false" data-backdrop="static">
<div aria-labelledby="myModalLabel" class="modal fade" data-backdrop="static" data-keyboard="false" id="roll-or-road-list"
role="dialog" tabindex="-1">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
<button aria-label="Close" class="close" data-dismiss="modal" type="button"><span
aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabelList">通道或者通道池选择</h4>
</div>
@@ -424,7 +424,7 @@
<!-- TODO -->
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default cancel-single-roll" data-dismiss="modal">放弃</button>
<button class="btn btn-default cancel-single-roll" data-dismiss="modal" type="button">放弃</button>
</div>
</div>
</div>
@@ -433,8 +433,8 @@
{{/*展示代理商,配置商户*/}}
</div>
<div class="modal fade" id="platform-rate-list" tabindex="-2" role="dialog" aria-labelledby="myModalLabelData"
data-keyboard="false" data-backdrop="static">
<div aria-labelledby="myModalLabelData" class="modal fade" data-backdrop="static" data-keyboard="false" id="platform-rate-list"
role="dialog" tabindex="-2">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
@@ -469,17 +469,17 @@
<tr class="platformMM" hidden>
<td>
<label>
<input placeholder="输入面值" id="platformM">
<input id="platformM" placeholder="输入面值">
</label>
</td>
<td>
<label>
<input placeholder="输入链接ID" id="linkID">
<input id="linkID" placeholder="输入链接ID">
</label>
</td>
<td>
<label>
<input placeholder="输入折扣" id="platformV">
<input id="platformV" placeholder="输入折扣">
</label>
</td>
<td>
@@ -491,18 +491,18 @@
<div class="error-msg" style="color: red"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default cancel-single-roll-two" data-dismiss="modal">关闭
<button class="btn btn-default cancel-single-roll-two" data-dismiss="modal" type="button">关闭
</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="totp-delete-modal" tabindex="-1" role="dialog" aria-labelledby="totpLabel"
data-keyboard="false">
<div aria-labelledby="totpLabel" class="modal fade" data-keyboard="false" id="totp-delete-modal" role="dialog"
tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
<button aria-label="Close" class="close" data-dismiss="modal" type="button"><span
aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="totpLabel">TOTP二次验证</h4>
@@ -515,24 +515,24 @@
</label>
</div>
</div>
<input id="totp-merchant-value" type="text" name="" value="" hidden>
<input hidden id="totp-merchant-value" name="" type="text" value="">
<div class="col-xs-4 color-red totp-new-error">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default totp-cancal cancel-save" data-dismiss="modal">取消
<button class="btn btn-default totp-cancal cancel-save" data-dismiss="modal" type="button">取消
</button>
<button type="button" class="btn btn-primary totp-save">保存</button>
<button class="btn btn-primary totp-save" type="button">保存</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="agent-list" tabindex="-1" role="dialog" aria-labelledby="myModalLabelDL"
data-keyboard="false" data-backdrop="static">
<div aria-labelledby="myModalLabelDL" class="modal fade" data-backdrop="static" data-keyboard="false" id="agent-list"
role="dialog" tabindex="-1">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
<button aria-label="Close" class="close" data-dismiss="modal" type="button"><span
aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabelDL">选择代理商</h4>
</div>
@@ -540,36 +540,36 @@
<!-- TODO -->
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default cancel-agent" data-dismiss="modal">放弃</button>
<button class="btn btn-default cancel-agent" data-dismiss="modal" type="button">放弃</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="change-password" tabindex="-1" role="dialog" aria-labelledby="passwordLabel"
data-keyboard="false" data-backdrop="static">
<div aria-labelledby="passwordLabel" class="modal fade" data-backdrop="static" data-keyboard="false" id="change-password"
role="dialog" tabindex="-1">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
<button aria-label="Close" class="close" data-dismiss="modal" type="button"><span
aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="passwordLabel">修改商户密码</h4>
</div>
<div class="modal-body modal-body-agent menu-table">
<input type="text" id="merchantUid" value="" placeholder="" hidden>
<input hidden id="merchantUid" placeholder="" type="text" value="">
<div class="row">
<span></span>
<label for="newPassword">
<input type="text" id="newPassword" value="" placeholder="新密码">
<input id="newPassword" placeholder="新密码" type="text" value="">
</label>
<label for="totpCode">
<input type="text" id="totpCode" value="" placeholder="二次验证">
<input id="totpCode" placeholder="二次验证" type="text" value="">
</label>
</div>
<div class="password-error-msg"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default cancel-save" data-dismiss="modal">放弃</button>
<button type="button" class="btn btn-default btn-primary submit-new-password">
<button class="btn btn-default cancel-save" data-dismiss="modal" type="button">放弃</button>
<button class="btn btn-default btn-primary submit-new-password" type="button">
确认
</button>
</div>
@@ -1465,7 +1465,7 @@
$(".totp-save").click(function (event) {// 获取secret
const totpCode = $("#totp-d-value").val();
const merchantUid = $("#totp-merchant-value").val();
if (totpCode === "" || merchantUid === "") {
if (merchantUid === "") {
setError(".totp-new-error", "信息填写不完整,需要重新填写");
return;
}

View File

@@ -3,18 +3,22 @@
<head>
<meta charset="UTF-8">
<title>管理后台</title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<link href="../static/css/basic.css" rel="stylesheet" type="text/css">
<link src="../static/lib/bootstrap/css/bootstrap.min.css">
<script src="../static/lib/bootstrap/js/bootstrap.min.js"></script>
<script src="../static/js/filter.js"></script>
{{/*<script src="../static/js/basic.js"></script>*/}}
{{/*
<script src="../static/js/basic.js"></script>
*/}}
<style>
.panel .panel-body input {
width: 50%;
}
.algin-right {
text-align: right;
}
table tr td {
display: inline-block;
width: 50%;
@@ -23,13 +27,16 @@
.panel-heading:hover {
cursor: pointer;
}
.panel-footer {
padding-left: 45%;
}
#modal-search {
height: 40px;
position: relative;
}
#modal-search button {
position: absolute;
right: 10px;
@@ -46,18 +53,22 @@
<table class="table table-responsive table-bordered">
<thead>
<tr>
<td class="algin-right">下发所属商户</td><td><span id="merchant-name">未选择</span></td>
<td class="algin-right">下发所属商户</td>
<td><span id="merchant-name">未选择</span></td>
</tr>
</thead>
<tbody>
<tr>
<td class="algin-right">商户uid</td><td><span id="merchant-uid">未选择</span></td>
<td class="algin-right">商户uid</td>
<td><span id="merchant-uid">未选择</span></td>
</tr>
<tr>
<td class="algin-right">可用金额</td><td><span id="able-amount"></span></td>
<td class="algin-right">可用金额</td>
<td><span id="able-amount"></span></td>
</tr>
<tr>
<td class="algin-right">创建时间</td><td><span id="create-time">未选择</span></td>
<td class="algin-right">创建时间</td>
<td><span id="create-time">未选择</span></td>
</tr>
</tbody>
</table>
@@ -66,45 +77,51 @@
<span class="glyphicon glyphicon-search"></span>
</div>
<table class="table table-responsive table-bordered">
<input type="text" hidden="hidden" id="bank-uid" value="">
<input hidden="hidden" id="bank-uid" type="text" value="">
<thead>
<tr>
<td class="algin-right">银行名称</td><td><span id="bank-name">未选择</span></td>
<td class="algin-right">银行名称</td>
<td><span id="bank-name">未选择</span></td>
</tr>
</thead>
<tbody>
<tr>
<td class="algin-right">开户名</td><td><span id="account-name">未选择</span></td>
<td class="algin-right">开户名</td>
<td><span id="account-name">未选择</span></td>
</tr>
<tr>
<td class="algin-right">卡号</td><td><span id="card-number">未选择</span></td>
<td class="algin-right">卡号</td>
<td><span id="card-number">未选择</span></td>
</tr>
<tr>
<td class="algin-right">开户卡类型</td>
<td>
<input type="radio" name="card-type" value="private" checked>对私卡
<input type="radio" name="card-type" value="public">对公卡
<input checked name="card-type" type="radio" value="private">对私卡
<input name="card-type" type="radio" value="public">对公卡
</td>
</tr>
<tr>
<td class="algin-right">开户行所在地</td><td><span id="bank-address">未选择</span></td>
<td class="algin-right">开户行所在地</td>
<td><span id="bank-address">未选择</span></td>
</tr>
<tr>
<td class="algin-right">开户人手机号码</td><td><span id="phone">未选择</span></td>
<td class="algin-right">开户人手机号码</td>
<td><span id="phone">未选择</span></td>
</tr>
<tr>
<td class="algin-right">下发金额</td><td><input type="text" value="" id="payfor-amount"><span></span></td>
<td class="algin-right">下发金额</td>
<td><input id="payfor-amount" type="text" value=""><span></span></td>
</tr>
</tbody>
</table>
<div class="panel-footer">
<input type="button" class="btn btn-default" name="" id="" value="取消">
<input type="button" class="btn btn-primary" value="提交" id="submit">
<input class="btn btn-default" id="" name="" type="button" value="取消">
<input class="btn btn-primary" id="submit" type="button" value="提交">
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div aria-labelledby="myModalLabel" class="modal fade" id="myModal" role="dialog" tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
@@ -112,9 +129,9 @@
<div class="menu-table table-responsive">
<table>
<div id="modal-search">
<input type="text" hidden="hidden" id="modal-search-hidden" value="">
搜索:<input type="text" value="" id="modal-search-input" placeholder="名称">
<button type="button" class="btn btn-warning" data-dismiss="modal" id="cannel">取消</button>
<input hidden="hidden" id="modal-search-hidden" type="text" value="">
搜索:<input id="modal-search-input" placeholder="名称" type="text" value="">
<button class="btn btn-warning" data-dismiss="modal" id="cannel" type="button">取消</button>
</div>
<thead class="thead-dark" id="table-head">
</thead>
@@ -135,10 +152,14 @@
</select>
</li>
<li class="current_total_page"><span class="current_page">0</span>/<span class="total_page">0</span></li>
<li class="current_total_page"><span class="current_page">0</span>/<span
class="total_page">0</span>
</li>
<li class="pre_page">上一页</li>
<li class="next_page">下一页</li>
<li class="jump_page">跳转 <input type="text" name="jump_page" value=""> <button type="button" class="btn btn-default">Go</button></li>
<li class="jump_page">跳转 <input name="jump_page" type="text" value="">
<button class="btn btn-default" type="button">Go</button>
</li>
</div>
</div>
</div>
@@ -158,6 +179,7 @@
"jumpPage": jumpPage
};
}
function setOrderCutPageValues(res) {
$(".current_page").html(res.CurrentPage);
$(".total_page").html(res.TotalPage);
@@ -168,10 +190,12 @@
});
$(".jump_page input").val("");
}
function clearModal() {
$("#table-head").html("");
$("#table-body").html("");
}
function randMerchantList(res) {
clearModal();
setOrderCutPageValues(res);
@@ -218,6 +242,7 @@
}
});
}
function merchantList(dataJSON) {
if (JSONIsEmpty(dataJSON)) {
@@ -280,6 +305,7 @@
//标记是商户选择
$("#modal-search-hidden").val("bank-list");
}
function saveBankCard(uid) {
$("#cannel").trigger('click');
$.ajax({
@@ -305,6 +331,7 @@
}
});
}
//当每页显示数更改后,执行的操作
$("#display_count").change(function () {
let dataJSON = getCutPagesValues();
@@ -339,6 +366,7 @@
}
f(dataJSON);
});
function bankList(dataJSON) {
if (JSONIsEmpty(dataJSON)) {
dataJSON = getCutPagesValues();
@@ -360,6 +388,7 @@
});
$("#myModal").modal();
}
$("#submit").click(function () {
let merchantUid = $("#merchant-uid").html();
let merchantName = $("#merchant-name").html();
@@ -404,6 +433,7 @@
}
});
});
//判断json是否为空
function JSONIsEmpty(dataJSON) {
let b = (JSON.stringify(dataJSON) == "{}");

View File

@@ -4,8 +4,8 @@
<head>
<meta charset="utf-8">
<title>商户后台</title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<style type="text/css" media="screen">
<link href="../static/css/basic.css" rel="stylesheet" type="text/css">
<style media="screen" type="text/css">
.first-input-group .basic-url, .operator-input-group .basic-url {
width: 210px;
}
@@ -42,27 +42,27 @@
<div class="search">
<div>
<span>操作员名称</span>
<input type="text" class="operator-name" value="" placeholder="模糊匹配">
<input class="operator-name" placeholder="模糊匹配" type="text" value="">
</div>
<div>
<button type="button" class="btn btn-default operator-name-search">搜索</button>
<button class="btn btn-default operator-name-search" type="button">搜索</button>
</div>
</div>
<div class="add-menu">
<button type="button"
class="btn btn-default btn-xs glyphicon glyphicon-plus add-operator-button"
data-toggle="modal" data-target="#addOperatorModal"
<button class="btn btn-default btn-xs glyphicon glyphicon-plus add-operator-button"
data-target="#addOperatorModal"
data-toggle="modal" type="button"
>新加操作员
</button>
</div>
<!-- 添加操作员的模态框 -->
<div class="modal fade" id="addOperatorModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
data-keyboard="false" data-backdrop="static">
<div aria-labelledby="myModalLabel" class="modal fade" data-backdrop="static" data-keyboard="false" id="addOperatorModal"
role="dialog" tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
<button aria-label="Close" class="close" data-dismiss="modal" type="button"><span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="addPowerButton">添加新的操作员</h4>
</div>
@@ -70,12 +70,12 @@
<div class="modal-body modal-body-menu">
<div class="input-group first-input-group">
<span class="input-group-addon basic-addon">登录账号</span>
<input type="text" class="form-control basic-url operator-account" value="">
<input class="form-control basic-url operator-account" type="text" value="">
<span class="operator-name-error"></span>
</div>
<div class="input-group first-input-group">
<span class="input-group-addon basic-addon">初始密码</span>
<input type="password" class="form-control basic-url operator-password" value="">
<input class="form-control basic-url operator-password" type="password" value="">
<span class="operator-password-error"></span>
</div>
@@ -104,20 +104,20 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default cancel-operator" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary save-operator">保存</button>
<button class="btn btn-default cancel-operator" data-dismiss="modal" type="button">取消</button>
<button class="btn btn-primary save-operator" type="button">保存</button>
</div>
</div>
</div>
</div>
<!-- end 模态框 -->
<!-- 修改操作员信息的模态框 -->
<div class="modal fade" id="editOperatorModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
data-keyboard="false" data-backdrop="static">
<div aria-labelledby="myModalLabel" class="modal fade" data-backdrop="static" data-keyboard="false" id="editOperatorModal"
role="dialog" tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
<button aria-label="Close" class="close" data-dismiss="modal" type="button"><span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="editOperatorButton">添加新的操作员</h4>
</div>
@@ -129,19 +129,19 @@
</div>
<div class="input-group first-input-group">
<span class="input-group-addon basic-addon">修改密码</span>
<input type="password" class="form-control basic-url change-operator-password" value="">
<input class="form-control basic-url change-operator-password" type="password" value="">
<span class="change-operator-password-error"></span>
</div>
<div class="input-group first-input-group">
<span class="input-group-addon basic-addon">确认密码</span>
<input type="password" class="form-control basic-url veritfy-operator-password" value="">
<input class="form-control basic-url veritfy-operator-password" type="password" value="">
<span class="veritfy-operator-password-error"></span>
</div>
<div class="input-group first-input-group">
<span class="input-group-addon basic-addon">修改昵称</span>
<input type="text" class="form-control basic-url change-operator-nick" value="">
<input class="form-control basic-url change-operator-nick" type="text" value="">
<span class="change-operator-password-error"></span>
</div>
@@ -162,8 +162,8 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default change-cancel-operator" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary change-save-operator">保存</button>
<button class="btn btn-default change-cancel-operator" data-dismiss="modal" type="button">取消</button>
<button class="btn btn-primary change-save-operator" type="button">保存</button>
</div>
</div>
</div>
@@ -202,8 +202,8 @@
<li class="current_total_page"><span class="current_page">0</span>/<span class="total_page">0</span></li>
<li class="pre_page">上一页</li>
<li class="next_page">下一页</li>
<li class="jump_page">跳转 <input type="text" name="jump_page" value="">
<button type="button" class="btn btn-default">Go</button>
<li class="jump_page">跳转 <input name="jump_page" type="text" value="">
<button class="btn btn-default" type="button">Go</button>
</li>
</div>

View File

@@ -4,10 +4,10 @@
<head>
<meta charset="UTF-8">
<title>管理后台</title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<link rel="stylesheet" type="text/css" href="../static/lib/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css"
href="../static/lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css">
<link href="../static/css/basic.css" rel="stylesheet" type="text/css">
<link href="../static/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="../static/lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet"
type="text/css">
<script src="../static/js/filter.js"></script>
<script src="../static/js/jquery.min.js"></script>
<script src="../static/lib/bootstrap/js/bootstrap.min.js"></script>
@@ -54,31 +54,31 @@
<div class="search form-inline">
<label for="">
<span>开始时间:</span>
<input type="text" name="" id="search-order-start-time" class="start-time" value="">
<input class="start-time" id="search-order-start-time" name="" type="text" value="">
</label>
<label for="">
<span>结束时间:</span>
<input type="text" name="" id="search-order-end-time" class="end-time" value="">
<input class="end-time" id="search-order-end-time" name="" type="text" value="">
</label>
<label for="">
<span>商户名称:</span>
<input type="text" id="search-order-merchant-name" placeholder="模糊匹配">
<input id="search-order-merchant-name" placeholder="模糊匹配" type="text">
</label>
<label for="">
<span>卡片数据:</span>
<input type="text" id="search-order-card-data" placeholder="卡片数据">
<input id="search-order-card-data" placeholder="卡片数据" type="text">
</label>
<label for="">
<span>商户订单号:</span>
<input type="text" id="search-order-merchant-order-id" value="">
<input id="search-order-merchant-order-id" type="text" value="">
</label>
<label>
<span>本系统订单号:</span>
<input type="text" id="search-order-bank-order-id" value="">
<input id="search-order-bank-order-id" type="text" value="">
</label>
<label for="">
订单状态:
<select name="" id="search-order-status">
<select id="search-order-status" name="">
<option value="">请选择</option>
<option value="success">支付成功</option>
<option value="wait">等待支付</option>
@@ -88,7 +88,7 @@
</label>
<label for="">
上游名称:
<select name="" id="search-order-supplier-name">
<select id="search-order-supplier-name" name="">
</select>
</label>
<!-- <label for="">-->
@@ -120,14 +120,14 @@
<!-- </label>-->
<!-- <label>-->
冻结状态:
<select name="" id="search-order-free-status">
<select id="search-order-free-status" name="">
<option value="">请选择</option>
<option value="freeze_amount">冻结</option>
<option value="refund">退款</option>
</select>
</label>
<button type="button" class="btn btn-default" id="order-search">搜索</button>
<button onclick='loadMainContent("/order_info.html")' type="button" class="btn btn-default">刷新</button>
<button class="btn btn-default" id="order-search" type="button">搜索</button>
<button class="btn btn-default" onclick='loadMainContent("/order_info.html")' type="button">刷新</button>
<!-- <label class="color-red" style="font-size: 16px;">-->
<!-- 交易金额:-->
@@ -269,13 +269,13 @@
<li class="current_total_page"><span class="current_page">0</span>/<span class="total_page">0</span></li>
<li class="pre_page">上一页</li>
<li class="next_page">下一页</li>
<li class="jump_page">跳转 <input type="text" name="jump_page" value="">
<button type="button" class="btn btn-default">Go</button>
<li class="jump_page">跳转 <input name="jump_page" type="text" value="">
<button class="btn btn-default" type="button">Go</button>
</li>
</div>
<!-- 模态框 -->
<div class="modal fade" id="order-details" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
data-keyboard="false" data-backdrop="static">
<div aria-labelledby="myModalLabel" class="modal fade" data-backdrop="static" data-keyboard="false" id="order-details"
role="dialog" tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
@@ -328,15 +328,15 @@
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default cancel-order-details" data-dismiss="modal">取消
<button class="btn btn-default cancel-order-details" data-dismiss="modal" type="button">取消
</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="order-solve" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
data-keyboard="false" data-backdrop="static">
<div aria-labelledby="myModalLabel" class="modal fade" data-backdrop="static" data-keyboard="false" id="order-solve"
role="dialog" tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
@@ -344,70 +344,71 @@
</div>
<div class="modal-body modal-body-order-solve">
<div>
<input type="radio" name="order-solve-radio" value="success" style="margin-left: 10%;">
<input name="order-solve-radio" style="margin-left: 10%;" type="radio" value="success">
<span style="color: blue;">处理成功</span>
<input type="radio" name="order-solve-radio" value="fail" style="margin-left: 15%;"><span
<input name="order-solve-radio" style="margin-left: 15%;" type="radio" value="fail"><span
style="color: red;">处理失败</span>
<input type="text" hidden value="" id="order-solve-bank-order-id">
<input hidden id="order-solve-bank-order-id" type="text" value="">
</div>
<div>
<label>
二次验证:
<input type="text" value="" id="order-info-totp">
<input id="order-info-totp" type="text" value="">
</label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default save-order-solve">确定</button>
<button type="button" class="btn btn-default cancel-order-solve"
data-dismiss="modal">取消</button>
<button class="btn btn-default save-order-solve" type="button">确定</button>
<button class="btn btn-default cancel-order-solve" data-dismiss="modal"
type="button">取消
</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="totp-order-solve" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
data-keyboard="false" data-backdrop="static">
<div aria-labelledby="myModalLabel" class="modal fade" data-backdrop="static" data-keyboard="false" id="totp-order-solve"
role="dialog" tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">二次验证</h4>
</div>
<div class="modal-body modal-body-order-solve">
<input type="text" hidden value="" id="totp-solve-bank-order-id">
<input type="text" hidden value="" id="totp-solveType">
<input hidden id="totp-solve-bank-order-id" type="text" value="">
<input hidden id="totp-solveType" type="text" value="">
<label>
二次验证:
<input type="text" value="" id="totp-orderInfo">
<input id="totp-orderInfo" type="text" value="">
</label>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default save-totp-solve">确定</button>
<button type="button" class="btn btn-default cancel-order-solve" data-dismiss="modal">
<button class="btn btn-default save-totp-solve" type="button">确定</button>
<button class="btn btn-default cancel-order-solve" data-dismiss="modal" type="button">
取消
</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="totp-order-deal-solve" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
data-keyboard="false" data-backdrop="static">
<div aria-labelledby="myModalLabel" class="modal fade" data-backdrop="static" data-keyboard="false" id="totp-order-deal-solve"
role="dialog" tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">二次验证</h4>
</div>
<div class="modal-body modal-body-order-solve">
<input type="text" hidden value="" id="totp-solve-deal-order-id">
<input type="text" hidden value="" id="totp-deal-solveType">
<input hidden id="totp-solve-deal-order-id" type="text" value="">
<input hidden id="totp-deal-solveType" type="text" value="">
<label>
二次验证:
<input type="text" value="" id="totp-totp-orderInfo">
<input id="totp-totp-orderInfo" type="text" value="">
</label>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default save-totp-deal-solve">确定</button>
<button type="button" class="btn btn-default cancel-order-solve" data-dismiss="modal">
<button class="btn btn-default save-totp-deal-solve" type="button">确定</button>
<button class="btn btn-default cancel-order-solve" data-dismiss="modal" type="button">
取消
</button>
</div>
@@ -585,6 +586,7 @@
$("#TodayAllNum").html(res.OrderProfitSummary.todayProfit.totalNum);
$("#todaySucceedRate").html(res.OrderProfitSummary.todayProfit.succeedRate)
}
function orderRoll(bankOrderId) {
$.ajax({
url: "/update/order/status",
@@ -773,6 +775,7 @@
}
});
}
function AjaxOrderList(dataJSON) {
dataJSON["roadUid"] = "{{.roadUid}}"
$.ajax({
@@ -792,6 +795,7 @@
});
AjaxOrderSummaryList(dataJSON)
}
function AjaxOrderSummaryList(dataJSON) {
dataJSON["roadUid"] = "{{.roadUid}}"
$.ajax({
@@ -810,6 +814,7 @@
}
});
}
//当每页显示数更改后,执行的操作
$("#display_count").change(function () {
let dataJSON = getOrderSearchValues();

View File

@@ -3,10 +3,10 @@
<head>
<meta charset="UTF-8">
<title>管理后台</title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<link rel="stylesheet" type="text/css" href="../static/lib/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css"
href="../static/lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css">
<link href="../static/css/basic.css" rel="stylesheet" type="text/css">
<link href="../static/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="../static/lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet"
type="text/css">
<script src="../static/js/filter.js"></script>
<script src="../static/js/jquery.min.js"></script>
<script src="../static/lib/bootstrap/js/bootstrap.min.js"></script>
@@ -59,32 +59,32 @@
<div class="search form-inline" style="font-weight: normal;">
<label for="" style="font-weight: normal;">
<span>开始时间:</span>
<input type="text" name="" value="" id="search-order-start-time" class="start-time" value="">
<input class="start-time" id="search-order-start-time" name="" type="text" value="" value="">
</label>
<label for="" style="font-weight: normal;">
<span>结束时间:</span>
<input type="text" name="" value="" id="search-order-end-time" class="end-time" value="">
<input class="end-time" id="search-order-end-time" name="" type="text" value="" value="">
</label>
<label for="" style="font-weight: normal;">
<span>商户名称:</span>
<input type="text" id="search-order-merchant-name" placeholder="模糊匹配">
<input id="search-order-merchant-name" placeholder="模糊匹配" type="text">
</label>
<label for="">
<span>代理名称:</span>
<input type="text" name="" value="" id="search-order-agent-name" placeholder="模糊匹配">
<input id="search-order-agent-name" name="" placeholder="模糊匹配" type="text" value="">
</label>
<label style="font-weight: normal;">
<span>本系统订单号:</span>
<input type="text" id="search-order-bank-order-id" value="">
<input id="search-order-bank-order-id" type="text" value="">
</label>
<label for="" style="font-weight: normal;">
上游名称:
<select name="" id="search-order-supplier-name">
<select id="search-order-supplier-name" name="">
</select>
</label>
<label for="" style="font-weight: normal;">
订单状态:
<select name="" id="search-order-status">
<select id="search-order-status" name="">
<option value="">请选择</option>
<option value="success">支付成功</option>
<option value="wait">等待支付</option>
@@ -94,7 +94,7 @@
</label>
<label for="" style="font-weight: normal;">
支付类型:
<select name="" id="search-order-pay-way-code">
<select id="search-order-pay-way-code" name="">
<option value="">请选择</option>
<option value="CARD_DH">卡密兑换</option>
<option value="WEIXIN_SCAN">微信扫码</option>
@@ -119,7 +119,7 @@
<option value="JD_SYT">京东收银台</option>
</select>
</label>
<button type="button" class="btn btn-default" id="order-search">搜索</button>
<button class="btn btn-default" id="order-search" type="button">搜索</button>
</div>
<div class="menu-table table-responsive">
<table>
@@ -155,8 +155,8 @@
<li class="current_total_page"><span class="current_page">0</span>/<span class="total_page">0</span></li>
<li class="pre_page">上一页</li>
<li class="next_page">下一页</li>
<li class="jump_page">跳转 <input type="text" name="jump_page" value="">
<button type="button" class="btn btn-default">Go</button>
<li class="jump_page">跳转 <input name="jump_page" type="text" value="">
<button class="btn btn-default" type="button">Go</button>
</li>
</div>
</div>

View File

@@ -3,9 +3,10 @@
<head>
<meta charset="UTF-8">
<title>管理后台</title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<link href="../static/css/basic.css" rel="stylesheet" type="text/css">
<link src="../static/lib/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../static/lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css">
<link href="../static/lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet"
type="text/css">
<script src="../static/js/jquery.min.js"></script>
<script src="../static/lib/bootstrap/js/bootstrap.min.js"></script>
<script src="../static/js/filter.js"></script>
@@ -17,21 +18,26 @@
font-weight: normal;
margin-right: 20px;
}
#status {
height: 30px;
line-height: 30px;
}
.search-button {
margin-left: 40px;
}
.modal-body label {
font-weight: normal;
margin-left: 2%;
margin-top: 2%;
}
#result-modal label {
margin-right: 50px;
}
#table-body tr {
height: 25px;
line-height: 25px;
@@ -42,19 +48,19 @@
<div class="search">
<label>
开始时间:
<input type="text" name="" value="" id="start-time" class="start-time" value="">
<input class="start-time" id="start-time" name="" type="text" value="" value="">
</label>
<label>
结束时间:
<input type="text" name="" value="" id="end-time" class="end-time" value="">
<input class="end-time" id="end-time" name="" type="text" value="" value="">
</label>
<label>
商户订单号:
<input type="text" id="merchantOrderId">
<input id="merchantOrderId" type="text">
</label>
<label>
系统订单号:
<input type="text" id="bankOrderId">
<input id="bankOrderId" type="text">
</label>
<select id="status">
<option value="">请选择</option>
@@ -64,7 +70,7 @@
<option value="payfor_success">代付成功</option>
<option value="payfor_fail">代付失败</option>
</select>
<input type="button" class="btn btn-primary search-button" value="搜索">
<input class="btn btn-primary search-button" type="button" value="搜索">
</div>
<div class="menu-table table-responsive">
@@ -105,27 +111,29 @@
<li class="current_total_page"><span class="current_page">0</span>/<span class="total_page">0</span></li>
<li class="pre_page">上一页</li>
<li class="next_page">下一页</li>
<li class="jump_page">跳转 <input type="text" name="jump_page" value=""> <button type="button" class="btn btn-default">Go</button></li>
<li class="jump_page">跳转 <input name="jump_page" type="text" value="">
<button class="btn btn-default" type="button">Go</button>
</li>
</div>
<!-- Modal -->
<div class="modal fade" id="result-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div aria-labelledby="myModalLabel" class="modal fade" id="result-modal" role="dialog" tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<input type="text" value="" hidden="hidden" id="result-bank-order-id">
<input hidden="hidden" id="result-bank-order-id" type="text" value="">
<div class="modal-body">
<label>
打款成功:
<input type="radio" name="result-payfor" value="payfor_success">
<input name="result-payfor" type="radio" value="payfor_success">
</label>
<label for="">
打款失败:
<input type="radio" name="result-payfor" value="payfor_fail">
<input name="result-payfor" type="radio" value="payfor_fail">
</label>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal" id="result-cannel">取消</button>
<input type="button" class="btn btn-primary" value="确定" onclick="resultSubmit();">
<button class="btn btn-default" data-dismiss="modal" id="result-cannel" type="button">取消</button>
<input class="btn btn-primary" onclick="resultSubmit();" type="button" value="确定">
</div>
</div>
</div>
@@ -154,6 +162,7 @@
"status": status
}
}
function setCutPageValues(res) {
$(".current_page").html(res.CurrentPage);
$(".total_page").html(res.TotalPage);
@@ -164,6 +173,7 @@
});
$(".jump_page input").val("");
}
function randPayForList(res) {
setCutPageValues(res);
let str = "";
@@ -195,8 +205,7 @@
tmp = tmp + '<button type="button" class="btn btn-primary">处理中</button>';
}
tmp = tmp + /*'</div>' +*/ "</th>" + "</tr>";
str = str + tmp.replace("payfor_fail", "失败").replace("payfor_success","成功").replace("payfor_confirm","待审核").replace("payfor_solving","系统处理中").
replace("payfor_banking","银行处理中").replace("payfor_hand","手动打款").replace("payfor_refuse","拒绝打款").replace("payfor_road","通道打款");
str = str + tmp.replace("payfor_fail", "失败").replace("payfor_success", "成功").replace("payfor_confirm", "待审核").replace("payfor_solving", "系统处理中").replace("payfor_banking", "银行处理中").replace("payfor_hand", "手动打款").replace("payfor_refuse", "拒绝打款").replace("payfor_road", "通道打款");
}
$("#table-body").html(str);
@@ -256,6 +265,7 @@
}
});
}
//当每页显示数更改后,执行的操作
$("#display_count").change(function () {
let dataJSON = getCurPageValues();
@@ -299,6 +309,7 @@
$("#result-bank-order-id").val(bankOrderId);
$("#result-modal").modal();
}
function resultSubmit() {
let bankOrderId = $("#result-bank-order-id").val();
let resultType = $("input[name='result-payfor']:checked").val();
@@ -325,6 +336,7 @@
}
});
}
//审核操作
function confirm(bankOrderId) {
$("#main-bank-order-id").val(bankOrderId);

View File

@@ -3,9 +3,10 @@
<head>
<meta charset="UTF-8">
<title>管理后台</title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<link href="../static/css/basic.css" rel="stylesheet" type="text/css">
<link src="../static/lib/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../static/lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css">
<link href="../static/lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet"
type="text/css">
<script src="../static/js/jquery.min.js"></script>
<script src="../static/lib/bootstrap/js/bootstrap.min.js"></script>
<script src="../static/js/filter.js"></script>
@@ -17,19 +18,23 @@
font-weight: normal;
margin-right: 20px;
}
select {
height: 30px;
line-height: 30px;
text-align: center;
}
#total-amount, #total-platform-profit {
display: inline-block;
margin-right: 40px;
}
.profit {
font-size: 16px;
margin-top: 10px;
}
table tr {
height: 28px;
font-size: 16px;
@@ -40,19 +45,19 @@
<div class="search">
<label>
商户名称:
<select name="" id="select-merchant-name"></select>
<select id="select-merchant-name" name=""></select>
</label>
<label for="">
代理名称:
<select name="" id="select-agent-name"></select>
<select id="select-agent-name" name=""></select>
</label>
<label for="">
上游通道名:
<select name="" id="search-order-supplier-name"></select>
<select id="search-order-supplier-name" name=""></select>
</label>
<label>
支付类型:
<select name="" id="pay-type">
<select id="pay-type" name="">
<option value="">请选择</option>
<option value="CARD_DH">卡密兑换</option>
<option value="WEIXIN_SCAN">微信扫码</option>
@@ -79,25 +84,25 @@
</label>
<label>
开始时间:
<input type="text" name="" value="" id="start-time" class="start-time" value="">
<input class="start-time" id="start-time" name="" type="text" value="" value="">
</label>
<label>
结束时间:
<input type="text" name="" value="" id="end-time" class="end-time" value="">
<input class="end-time" id="end-time" name="" type="text" value="" value="">
</label>
<label for="">
<input type="button" class="btn btn-primary" value="搜索" onclick="search();">
<input class="btn btn-primary" onclick="search();" type="button" value="搜索">
</label>
<label for="" class="profit">
<label class="profit" for="">
<span class="color-red">交易总金额:</span>
<span id="total-amount" class="color-red">00.00</span>
<span class="color-red" id="total-amount">00.00</span>
<span class="disabled"></span>
<span class="color-red">平台总纯利润:</span>
<span id="total-platform-profit" class="color-red">00.00</span>
<span class="color-red" id="total-platform-profit">00.00</span>
<span class="disabled"></span>
<span class="color-red">代理总利润:</span>
<span id="total-agent-profit" class="color-red">00.00</span>
<span class="color-red" id="total-agent-profit">00.00</span>
</label>
</div>
<div class="menu-table">
@@ -140,6 +145,7 @@
"endTime": endTime
};
}
function randProfit(res) {
$("#total-amount").html(res.TotalAmount);
$("#total-platform-profit").html(res.PlatformTotalProfit);
@@ -157,6 +163,7 @@
$("#table-body").html(str);
}
function search() {
$.ajax({
url: "/get/profit",
@@ -172,6 +179,7 @@
},
});
}
$(function () {
setMerchant();
setSupplier();

View File

@@ -4,13 +4,14 @@
<head>
<meta charset="utf-8">
<title>商户后台</title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<link href="../static/css/basic.css" rel="stylesheet" type="text/css">
<script src="../static/js/jquery.min.js"></script>
<script src="../static/js/filter.js"></script>
<style type="text/css" media="screen">
<style media="screen" type="text/css">
.first-input-group .basic-url, .router-input-group .basic-url {
width: 210px;
}
.modal-body .pre-input-group select {
width: 210px;
height: 30px;
@@ -18,11 +19,13 @@
text-align-last: center;
padding-left: 5px;
}
.power-name-error, .power-id-error, .first-menu-error, .second-menu-error {
color: red;
display: inline-block;
margin-left: 20px;
}
.power-save-success {
color: blue;
text-align: center;
@@ -33,27 +36,31 @@
<div class="search">
<div>
<span>二级菜单名称</span>
<input type="text" class="menu-name" value="" placeholder="模糊匹配">
<input class="menu-name" placeholder="模糊匹配" type="text" value="">
</div>
<div>
<span>权限项名称</span>
<input type="text" class="power-name" value="" placeholder="模糊匹配">
<input class="power-name" placeholder="模糊匹配" type="text" value="">
</div>
<div>
<button type="button" class="btn btn-default power-menu-search">搜索</button>
<button class="btn btn-default power-menu-search" type="button">搜索</button>
</div>
</div>
<!-- 模态框 -->
<div class="add-menu">
<button type="button" class="btn btn-default btn-xs glyphicon glyphicon-plus add-button" data-toggle="modal" data-target="#addPowerModal">添加权限控制项</button>
<button class="btn btn-default btn-xs glyphicon glyphicon-plus add-button" data-target="#addPowerModal" data-toggle="modal"
type="button">添加权限控制项
</button>
<strong>权限控制项目加好后,不要随意修改,删除!!!</strong>
</div>
<div class="modal fade" id="addPowerModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-keyboard="false" data-backdrop="static">
<div aria-labelledby="myModalLabel" class="modal fade" data-backdrop="static" data-keyboard="false" id="addPowerModal"
role="dialog" tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<button aria-label="Close" class="close" data-dismiss="modal" type="button"><span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="addPowerButton">添加权限控制项</h4>
</div>
@@ -80,13 +87,14 @@
<div class="input-group first-input-group">
<span class="input-group-addon basic-addon">权限项名称</span>
<input type="text" class="form-control basic-url power-item" value="">
<input class="form-control basic-url power-item" type="text" value="">
<span class="power-name-error"></span>
</div>
<div class="input-group first-input-group">
<span class="input-group-addon basic-addon">权限项目ID</span>
<input type="text" class="form-control basic-url power-id" value="" placeholder="一级菜单:二级菜单:权限名">
<input class="form-control basic-url power-id" placeholder="一级菜单:二级菜单:权限名" type="text"
value="">
<span class="power-id-error"></span>
</div>
@@ -95,8 +103,8 @@
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default cancel-menu" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary save-menu">保存</button>
<button class="btn btn-default cancel-menu" data-dismiss="modal" type="button">取消</button>
<button class="btn btn-primary save-menu" type="button">保存</button>
</div>
</div>
</div>
@@ -133,7 +141,9 @@
<li class="current_total_page"><span class="current_page">0</span>/<span class="total_page">0</span></li>
<li class="pre_page">上一页</li>
<li class="next_page">下一页</li>
<li class="jump_page">跳转 <input type="text" name="jump_page" value=""> <button type="button" class="btn btn-default">Go</button></li>
<li class="jump_page">跳转 <input name="jump_page" type="text" value="">
<button class="btn btn-default" type="button">Go</button>
</li>
</div>
<script>
@@ -165,6 +175,7 @@
}
});
}
//当每页显示数更改后,执行的操作
$("#display_count").change(function () {
let dataJSON = getCutPageData();
@@ -209,6 +220,7 @@
}
Ajax({"powerID": powerID}, "/delete/powerItem");
}
//展示权限项的列表
function showPowerItem(res) {
@@ -234,6 +246,7 @@
}
$("#menu_table_body").html(str);
}
function initFirstMenuSelect(res) {
let MenuList = res.MenuList;
let str = '<option value="none">请选择</option>';
@@ -250,12 +263,14 @@
$(".first-menu-error").html("");
$(".second-menu-error").html("");
}
//点击 添加权限控制项 做出的响应
$(".add-button").click(function () {
clearContent();
$(".power-save-success").html();
Ajax({}, "/get/firstMenu");
});
function initSecondMenuSelect(res) {
let secondMenuList = res.SecondMenuList;
let str = '<option value="none">请选择</option>';
@@ -265,6 +280,7 @@
}
$("#second-menu-select").html(str);
}
//关联二级菜单名
$("#first-menu-select").change(function () {
let firstMenuUid = $("#first-menu-select").val();
@@ -273,6 +289,7 @@
}
Ajax({"firMenuUid": firstMenuUid}, "/get/secondMenus");
});
//点击 添加权限控制项的保存 按钮
function savePowerItem(res) {
let powerItem = $(".power-item").val();
@@ -286,6 +303,7 @@
}
clearContent();
}
$(".cancel-menu").click(function () {
Ajax(getCutPageData(), "/get/powerItem");
});
@@ -306,8 +324,14 @@
return
}
Ajax({"firstMenuUid":firstMenuUid, "secondMenuUid":secondMenuUid, "powerItem":powerItem, "powerID":powerID}, "/add/power");
Ajax({
"firstMenuUid": firstMenuUid,
"secondMenuUid": secondMenuUid,
"powerItem": powerItem,
"powerID": powerID
}, "/add/power");
});
//获取搜索框的数据,和分页的基础数据
function getCutPageData() {
let powerItem = $(".power-item").val();
@@ -317,8 +341,16 @@
let totalPage = $(".total_page").html();
let jumpPage = $(".jump_page input").val();
return {"displayCount":displayCount, "currentPage":currentPage, "totalPage":totalPage, "jumpPage":jumpPage, "powerItem": powerItem, "powerID":powerID};
return {
"displayCount": displayCount,
"currentPage": currentPage,
"totalPage": totalPage,
"jumpPage": jumpPage,
"powerItem": powerItem,
"powerID": powerID
};
}
$(".power-menu-search").click(function () {
Ajax(getCutPageData(), "/get/powerItem");
});

View File

@@ -4,9 +4,9 @@
<head>
<meta charset="utf-8">
<title>管理后台</title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<link href="../static/css/basic.css" rel="stylesheet" type="text/css">
<script src="../static/js/filter.js"></script>
<style type="text/css" media="screen">
<style media="screen" type="text/css">
.search div {
display: inline-block;
margin-top: 10px;
@@ -82,23 +82,24 @@
<div class="search">
<div>
<span>通道名称</span>
<input type="text" class="road-name-search" value="" placeholder="模糊匹配">
<input class="road-name-search" placeholder="模糊匹配" type="text" value="">
</div>
<div>
<span>产品名称</span>
<input type="text" class="product-name-search" value="" placeholder="模糊匹配">
<input class="product-name-search" placeholder="模糊匹配" type="text" value="">
</div>
<div>
<button type="button" class="btn btn-default road-search">搜索</button>
<button class="btn btn-default road-search" type="button">搜索</button>
</div>
</div>
<button type="button" class="btn btn-default btn-xs glyphicon glyphicon-plus add-road-button">添加通道</button>
<button class="btn btn-default btn-xs glyphicon glyphicon-plus add-road-button" type="button">添加通道</button>
<div class="menu-table">
<table>
<thead class="thead-dark">
<tr>
<th>序列号</th>
<th>通道名称</th>
<th>交易类型</th>
<th>产品名称</th>
<th>成本汇率</th>
<th>状态</th>
@@ -133,25 +134,25 @@
<li class="current_total_page"><span class="current_page">0</span>/<span class="total_page">0</span></li>
<li class="pre_page">上一页</li>
<li class="next_page">下一页</li>
<li class="jump_page">跳转 <input type="text" name="jump_page" value="">
<button type="button" class="btn btn-default">Go</button>
<li class="jump_page">跳转 <input name="jump_page" type="text" value="">
<button class="btn btn-default" type="button">Go</button>
</li>
</div>
</div>
<div class="add-edit-road">
<input type="hidden" value="" class="road-uid">
<input class="road-uid" type="hidden" value="">
<fieldset>
<legend style="width: 75px;">通道基本信息</legend>
<div>
<label>
<span>通道名称:</span>
<input type="text" class="road-name" value="">
<input class="road-name" type="text" value="">
<span class="star">*</span>
</label>
<label>
<span>通道编码:</span>
<input type="text" class="product-code" value="">
<input class="product-code" type="text" value="">
<span class="star">*</span>
</label>
<label>
@@ -171,12 +172,13 @@
<option value="index_wrm_tb.html">沃尔玛页面(淘宝)</option>
<option value="index_wrm_xy.html">沃尔玛页面(咸鱼)</option>
<option value="index_wrm_qq_group.html">QQ群</option>
<option value="index_account_tao-bao.html">天猫游戏页面</option>
</select>
<span class="star">*</span>
</label>
<label>
<span>备注:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
<input type="text" value="" class="road-remark">
<input class="road-remark" type="text" value="">
</label>
</div>
<div>
@@ -197,10 +199,10 @@
<legend style="width: 50px;">费用配置</legend>
<div>
<span>成本费率:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
<input type="text" value="" class="basic-rate" placeholder="样例1.2">
<input class="basic-rate" placeholder="样例1.2" type="text" value="">
<span class="star">*</span>
<span>代付手续费:&nbsp;&nbsp;&nbsp;&nbsp;</span>
<input type="text" value="" class="settle-fee" placeholder="单位:元">
<input class="settle-fee" placeholder="单位:元" type="text" value="">
<span class="star">*</span>
</div>
</fieldset>
@@ -208,18 +210,18 @@
<legend style="width: 50px;">额度设置</legend>
<div>
<span>通道总额度:&nbsp;&nbsp;&nbsp;&nbsp;</span>
<input type="text" value="" class="road-total-limit">
<input class="road-total-limit" type="text" value="">
<span class="star">*</span>
<span>每天额度:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
<input type="text" value="" class="road-everyday-limit">
<input class="road-everyday-limit" type="text" value="">
<span class="star">*</span>
</div>
<div>
<span>单笔金额最小:</span>
<input type="text" value="" class="single-min-limit">
<input class="single-min-limit" type="text" value="">
<span class="star">*</span>
<span>单笔金额最大:</span>
<input type="text" value="" class="single-max-limit">
<input class="single-max-limit" type="text" value="">
<span class="star">*</span>
</div>
</fieldset>
@@ -364,7 +366,7 @@
t = "<tr>";
}
let tmp = t + "<th>" + (res.StartIndex + i + 1) + "</th>" +
"<th>" + v.RoadName + "</th>" + "<th>" + v.ProductName + "</th>" +
"<th>" + v.RoadName + "</th>" + "<th>" + v.TransactionType + "</th>" + "<th>" + v.ProductName + "</th>" +
"<th>" + v.BasicFee + "</th>" + "<th>" + v.Status + "</th>" + "<th>" + v.TotalLimit + "</th>" +
"<th>" + v.TodayLimit + "</th>" + "<th>" + v.SingleMinLimit + "-" + v.SingleMaxLimit + "</th>" +
"<th>" + v.StarHour + "-" + v.EndHour + "</th>" + "<th>" + v.TotalIncome + "</th>" + "<th>" + v.TodayIncome + "</th>" +

View File

@@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<title>管理后台</title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<link href="../static/css/basic.css" rel="stylesheet" type="text/css">
<script src="../static/js/filter.js"></script>
<style type="text/css">
.road-pool-record, .edit-road-pool {
@@ -115,17 +115,17 @@
<div class="search">
<div>
<span>通道池名称:</span>
<input type="text" class="road-pool-name-search" value="" placeholder="模糊匹配">
<input class="road-pool-name-search" placeholder="模糊匹配" type="text" value="">
</div>
<div>
<span>通道池编号:</span>
<input type="text" class="product-pool-name-search" value="" placeholder="模糊匹配">
<input class="product-pool-name-search" placeholder="模糊匹配" type="text" value="">
</div>
<div>
<button type="button" class="btn btn-default road-pool-search">搜索</button>
<button class="btn btn-default road-pool-search" type="button">搜索</button>
</div>
</div>
<button type="button" class="btn btn-default btn-xs glyphicon glyphicon-plus add-road-pool-button">添加通道池
<button class="btn btn-default btn-xs glyphicon glyphicon-plus add-road-pool-button" type="button">添加通道池
</button>
<div class="menu-table">
<table>
@@ -159,29 +159,29 @@
<li class="current_total_page"><span class="current_page">0</span>/<span class="total_page">0</span></li>
<li class="pre_page">上一页</li>
<li class="next_page">下一页</li>
<li class="jump_page">跳转 <input type="text" name="jump_page" value="">
<button type="button" class="btn btn-default">Go</button>
<li class="jump_page">跳转 <input name="jump_page" type="text" value="">
<button class="btn btn-default" type="button">Go</button>
</li>
</div>
</div>
<div class="edit-road-pool">
<input type="hidden" value="" class="road-pool-code-hide">
<input class="road-pool-code-hide" type="hidden" value="">
<div class="edit-road-search">
<div>
通道名称:
<input type="text" class="road-name-search" value="" placeholder="模糊匹配">
<input class="road-name-search" placeholder="模糊匹配" type="text" value="">
</div>
<div>
产品名称:
<input type="text" class="road-product-name-search" value="" placeholder="模糊匹配">
<input class="road-product-name-search" placeholder="模糊匹配" type="text" value="">
</div>
<div>
支付类型:
<input type="text" class="road-pay-type-search" value="">
<input class="road-pay-type-search" type="text" value="">
</div>
<div>
<button type="button" class="btn btn-default edit-road-search-button">搜索</button>
<button class="btn btn-default edit-road-search-button" type="button">搜索</button>
</div>
</div>
@@ -189,7 +189,7 @@
<table>
<thead class="thead-dark">
<tr>
<th><input type="checkbox" id="controller-all-checkbox"></th>
<th><input id="controller-all-checkbox" type="checkbox"></th>
<th>序列号</th>
<th>通道名称</th>
<th>产品名称</th>
@@ -229,8 +229,8 @@
</li>
<li class="pre_page">上一页</li>
<li class="next_page">下一页</li>
<li class="jump_page">跳转 <input type="text" id="jump_page" value="">
<button type="button" class="btn btn-default">Go</button>
<li class="jump_page">跳转 <input id="jump_page" type="text" value="">
<button class="btn btn-default" type="button">Go</button>
</li>
</div>
<div class="road-footer">
@@ -241,12 +241,12 @@
</div>
<!-- 模态框 -->
<div class="modal fade" id="roadPoolModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
data-keyboard="false" data-backdrop="static">
<div aria-labelledby="myModalLabel" class="modal fade" data-backdrop="static" data-keyboard="false" id="roadPoolModal"
role="dialog" tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
<button aria-label="Close" class="close" data-dismiss="modal" type="button"><span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="addroadPoolButton">添加通道池</h4>
</div>
@@ -254,18 +254,18 @@
<div class="modal-body modal-body-road-pool">
<div>
<span>通道池名称:</span>
<input type="text" value="" placeholder="" class="road-pool-name">
<input class="road-pool-name" placeholder="" type="text" value="">
<span class="road-pool-name-error"></span>
</div>
<div>
<span>通道池编号:</span>
<input type="text" value="" class="road-pool-code">
<input class="road-pool-code" type="text" value="">
<span class="road-pool-code-error"></span>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default cancel-road-pool" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary save-road-pool">保存</button>
<button class="btn btn-default cancel-road-pool" data-dismiss="modal" type="button">取消</button>
<button class="btn btn-primary save-road-pool" type="button">保存</button>
</div>
</div>
</div>

View File

@@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<title>管理后台</title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<link href="../static/css/basic.css" rel="stylesheet" type="text/css">
<script src="../static/js/filter.js"></script>
</head>
<body>

View File

@@ -4,21 +4,24 @@
<head>
<meta charset="utf-8">
<title>商户后台</title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<link href="../static/css/basic.css" rel="stylesheet" type="text/css">
<script src="../static/js/filter.js"></script>
<style>
.role-name-add {
margin-left: 30px;
vertical-align: bottom;
}
.role-remark {
margin-left: 30px;
margin-top: 20px;
width: 190px;
}
.role-remark-word {
vertical-align: center;
}
.role-name-error {
margin-left: 20px;
color: red;
@@ -29,29 +32,33 @@
<div class="search">
<div>
<span>角色名称</span>
<input type="text" class="role-name" value="" placeholder="模糊匹配">
<input class="role-name" placeholder="模糊匹配" type="text" value="">
</div>
<div>
<button type="button" class="btn btn-default role-menu-search">搜索</button>
<button class="btn btn-default role-menu-search" type="button">搜索</button>
</div>
</div>
<div class="add-menu">
<button type="button" class="btn btn-default btn-xs glyphicon glyphicon-plus add-button" data-toggle="modal" data-target="#addRoleModal">创建新角色</button>
<button class="btn btn-default btn-xs glyphicon glyphicon-plus add-button" data-target="#addRoleModal" data-toggle="modal"
type="button">创建新角色
</button>
</div>
<!-- 创建新角色的模态框 -->
<div class="modal fade" id="addRoleModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-keyboard="false" data-backdrop="static">
<div aria-labelledby="myModalLabel" class="modal fade" data-backdrop="static" data-keyboard="false" id="addRoleModal"
role="dialog" tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<button aria-label="Close" class="close" data-dismiss="modal" type="button"><span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="addPowerButton">添加角色</h4>
</div>
<div class="modal-body modal-body-menu">
<div>
<span>角色名称: </span>
<input type="text" class="role-name-add">
<input class="role-name-add" type="text">
<span class="role-name-error"></span>
</div>
@@ -66,8 +73,8 @@
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default cancel-menu" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary save-menu">保存</button>
<button class="btn btn-default cancel-menu" data-dismiss="modal" type="button">取消</button>
<button class="btn btn-primary save-menu" type="button">保存</button>
</div>
</div>
</div>
@@ -107,7 +114,9 @@
<li class="current_total_page"><span class="current_page">0</span>/<span class="total_page">0</span></li>
<li class="pre_page">上一页</li>
<li class="next_page">下一页</li>
<li class="jump_page">跳转 <input type="text" name="jump_page" value=""> <button type="button" class="btn btn-default">Go</button></li>
<li class="jump_page">跳转 <input name="jump_page" type="text" value="">
<button class="btn btn-default" type="button">Go</button>
</li>
</div>
<script>
@@ -121,9 +130,12 @@
let roleNameAdd = $(".role-name-add").val();
let roleRemark = $(".role-remark").val();
return {"displayCount":displayCount, "currentPage":currentPage, "totalPage":totalPage, "jumpPage":jumpPage,
"roleName":roleName, "roleRemark":roleRemark, "roleNameAdd":roleNameAdd};
return {
"displayCount": displayCount, "currentPage": currentPage, "totalPage": totalPage, "jumpPage": jumpPage,
"roleName": roleName, "roleRemark": roleRemark, "roleNameAdd": roleNameAdd
};
}
function Ajax(dataJSON, urlHost) {
$.ajax({
url: urlHost,
@@ -160,6 +172,7 @@
dataJSON["roleUid"] = roleUid;
Ajax(dataJSON, "/delete/role");
}
//当每页显示数更改后,执行的操作
$("#display_count").change(function () {
let dataJSON = getRolePageData();
@@ -196,6 +209,7 @@
}
Ajax(dataJSON, "/get/role");
});
function addRole(res) {
let role = $(".role-name-add").val();
if (res.Code == 200) {
@@ -206,6 +220,7 @@
$(res.Key).html(res.Msg);
}
}
$(".save-menu").click(function () {
let roleName = $(".role-name").val();
@@ -221,6 +236,7 @@
Ajax({"roleName": roleName, "roleRemark": roleRemark, "roleNameAdd": roleNameAdd}, "/add/role");
});
function showRoleList(res) {
if (res.Code != 200) {
alert("获取数据失败");
@@ -250,6 +266,7 @@
}
$("#menu_table_body").html(str);
}
$(".role-menu-search").click(function () {
Ajax(getRolePageData(), "/get/role");
$(".edit-role-modal").load("/jhboss/edit_role.html");

View File

@@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<title>管理后台</title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<link href="../static/css/basic.css" rel="stylesheet" type="text/css">
<script src="../static/js/jquery.ui.min.js"></script>
<script src="../static/js/filter.js"></script>
<style>
@@ -20,11 +20,13 @@
</head>
<body>
<!-- 添加菜单的模态框 -->
<div class="modal fade" id="addMenuModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-keyboard="false" data-backdrop="static">
<div aria-labelledby="myModalLabel" class="modal fade" data-backdrop="static" data-keyboard="false" id="addMenuModal"
role="dialog" tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<button aria-label="Close" class="close" data-dismiss="modal" type="button"><span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="myModalLabel">添加二级菜单</h4>
</div>
<div class="modal-body modal-body-menu">
@@ -37,19 +39,19 @@
</div>
<div class="input-group first-input-group">
<span class="input-group-addon basic-addon">二级菜单</span>
<input type="text" class="form-control basic-url second-menu-content">
<input class="form-control basic-url second-menu-content" type="text">
<span class="second-menu-error"></span>
</div>
<div class="input-group first-input-group">
<span class="input-group-addon basic-addon">菜单路由</span>
<input type="text" class="form-control basic-url router-url">
<input class="form-control basic-url router-url" type="text">
<span class="second-router-error"></span>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default cancel-menu" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary save-menu">保存</button>
<button class="btn btn-default cancel-menu" data-dismiss="modal" type="button">取消</button>
<button class="btn btn-primary save-menu" type="button">保存</button>
</div>
</div>
</div>
@@ -58,19 +60,21 @@
<div class="search">
<div>
<span>一级菜单</span>
<input type="text" class="first-menu-serach" placeholder ="模糊匹配">
<input class="first-menu-serach" placeholder="模糊匹配" type="text">
</div>
<div>
<span>二级菜单</span>
<input type="text" class="second-menu-serach" value="" placeholder="模糊匹配">
<input class="second-menu-serach" placeholder="模糊匹配" type="text" value="">
</div>
<div>
<button type="button" class="btn btn-default second-menu-search">搜索</button>
<button class="btn btn-default second-menu-search" type="button">搜索</button>
</div>
</div>
<div class="add-menu">
<button type="button" class="btn btn-default btn-xs glyphicon glyphicon-plus add-button" data-toggle="modal" data-target="#addMenuModal">添加二级菜单</button>
<button class="btn btn-default btn-xs glyphicon glyphicon-plus add-button" data-target="#addMenuModal" data-toggle="modal"
type="button">添加二级菜单
</button>
<strong>在添加二级菜单时,确保对应的一级菜单已经创建好!</strong>
</div>
<div class="menu-table">
@@ -107,7 +111,9 @@
<li class="current_total_page"><span class="current_page">1</span>/<span class="total_page">2</span></li>
<li class="pre_page">上一页</li>
<li class="next_page">下一页</li>
<li class="jump_page">跳转 <input type="text" name="jump_page" value=""> <button type="button" class="btn btn-default">Go</button></li>
<li class="jump_page">跳转 <input name="jump_page" type="text" value="">
<button class="btn btn-default" type="button">Go</button>
</li>
</div>
<script>
@@ -121,8 +127,16 @@
let totalPage = $(".total_page").html();
let jumpPage = $(".jump_page input").val();
return {"displayCount":displayCount, "currentPage":currentPage, "totalPage":totalPage, "jumpPage":jumpPage, "firstMenuSerach": firstMenuSerach, "secondMenuSerach":secondMenuSerach};
return {
"displayCount": displayCount,
"currentPage": currentPage,
"totalPage": totalPage,
"jumpPage": jumpPage,
"firstMenuSerach": firstMenuSerach,
"secondMenuSerach": secondMenuSerach
};
}
$(".second-menu-search").click(function () {
showSecondMenuList(getCutPageData());
});
@@ -201,10 +215,12 @@
function menuUp(secondMenuUid) {
Ajax(secondMenuUid, "/up/secondMenu");
}
//降低菜单的顺序
function menuDown(secondMenuUid) {
Ajax(secondMenuUid, "/down/secondMenu");
}
//删除菜单
function menuDelete(secondMenuUid) {
if (!window.confirm("是否确定删除该项?")) {
@@ -212,6 +228,7 @@
}
Ajax(secondMenuUid, "/delete/secondMenu");
}
//此函数的作用,是在每行的最后一格,加入可操作的按钮图标
function showSecondMenuList(dataJSON) {
$.ajax({
@@ -302,11 +319,13 @@
}
});
});
function clearMenuError() {
$(".pre-menu-error").text("");
$(".second-menu-error").text("");
$(".second-router-error").text("");
}
function selectContent() {
$.ajax({
url: "/get/firstMenu",
@@ -331,6 +350,7 @@
}
});
}
$(".add-button").click(function () {
$(".basic-url").val("");
$(".select-content").html("");

View File

@@ -3,9 +3,10 @@
<head>
<meta charset="UTF-8">
<title>管理后台</title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<link rel="stylesheet" type="text/css" href="../static/lib/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../static/lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css">
<link href="../static/css/basic.css" rel="stylesheet" type="text/css">
<link href="../static/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="../static/lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet"
type="text/css">
<script src="../static/js/filter.js"></script>
<script src="../static/js/jquery.min.js"></script>
<script src="../static/lib/bootstrap/js/bootstrap.min.js"></script>
@@ -21,6 +22,7 @@
.order-record .search div {
height: 20px;
}
#search-order-supplier-name, #select-merchant-name, #search-notify-pay-type {
height: 30px;
line-height: 30px;
@@ -32,26 +34,26 @@
<div class="search form-inline">
<label for="">
<span>开始时间:</span>
<input type="text" name="" id="search-notify-start-time" class="start-time" value="">
<input class="start-time" id="search-notify-start-time" name="" type="text" value="">
</label>
<label for="">
<span>结束时间:</span>
<input type="text" name="" id="search-notify-end-time" class="end-time" value="">
<input class="end-time" id="search-notify-end-time" name="" type="text" value="">
</label>
<label for="">
<span>商户名称:</span>
<select name="" id="select-merchant-name">
<select id="select-merchant-name" name="">
</select>
</label>
<label for="">
<span>商户名称:</span>
<select name="" id="search-order-supplier-name">
<select id="search-order-supplier-name" name="">
</select>
</label>
<label for="">
<span>回调类型:</span>
<select name="" id="notify-type">
<select id="notify-type" name="">
<option value="">请选择</option>
<option value="order">支付回调</option>
<option value="payfor">代付回调</option>
@@ -59,7 +61,7 @@
</label>
<label for="">
<input type="button" class="btn btn-primary" value="开始" onclick="startNotify()">
<input class="btn btn-primary" onclick="startNotify()" type="button" value="开始">
</label>
</div>
<div class="panel panel-default">
@@ -83,6 +85,7 @@
"notifyType": notifyType
};
}
function sendNotify(bankOrderId) {
$.ajax({
url: "/self/send/notify",
@@ -93,6 +96,7 @@
}
});
}
function startNotify() {
if (!confirm("是否开始执行批量回调操作")) {
return;
@@ -117,6 +121,7 @@
}
});
}
$(function () {
let day = new Date(new Date().getTime() - 86400000);
let s = dateFtt("yyyy-MM-dd hh:mm:ss", day);

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<title>管理后台</title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<link href="../static/css/basic.css" rel="stylesheet" type="text/css">
<link src="../static/lib/bootstrap/css/bootstrap.min.css">
<script src="../static/lib/bootstrap/js/bootstrap.min.js"></script>
<script src="../static/js/filter.js"></script>
@@ -11,9 +11,11 @@
.panel .panel-body input {
width: 50%;
}
.algin-right {
text-align: right;
}
table tr td {
display: inline-block;
width: 50%;
@@ -22,13 +24,16 @@
.panel-heading:hover {
cursor: pointer;
}
.panel-footer {
padding-left: 45%;
}
#modal-search {
height: 40px;
position: relative;
}
#modal-search button {
position: absolute;
right: 10px;
@@ -43,44 +48,50 @@
<span class="glyphicon glyphicon-search"></span>
</div>
<table class="table table-responsive table-bordered">
<input type="text" hidden="hidden" id="bank-uid" value="">
<input hidden="hidden" id="bank-uid" type="text" value="">
<thead>
<tr>
<td class="algin-right">银行名称</td><td><span id="bank-name">未选择</span></td>
<td class="algin-right">银行名称</td>
<td><span id="bank-name">未选择</span></td>
</tr>
</thead>
<tbody>
<tr>
<td class="algin-right">开户名</td><td><span id="account-name">未选择</span></td>
<td class="algin-right">开户名</td>
<td><span id="account-name">未选择</span></td>
</tr>
<tr>
<td class="algin-right">卡号</td><td><span id="card-number">未选择</span></td>
<td class="algin-right">卡号</td>
<td><span id="card-number">未选择</span></td>
</tr>
<tr>
<td class="algin-right">开户卡类型</td>
<td>
<input type="radio" name="card-type" value="private" checked>对私卡
<input type="radio" name="card-type" value="public">对公卡
<input checked name="card-type" type="radio" value="private">对私卡
<input name="card-type" type="radio" value="public">对公卡
</td>
</tr>
<tr>
<td class="algin-right">开户行所在地</td><td><span id="bank-address">未选择</span></td>
<td class="algin-right">开户行所在地</td>
<td><span id="bank-address">未选择</span></td>
</tr>
<tr>
<td class="algin-right">开户人手机号码</td><td><span id="phone">未选择</span></td>
<td class="algin-right">开户人手机号码</td>
<td><span id="phone">未选择</span></td>
</tr>
<tr>
<td class="algin-right">下发金额</td><td><input type="text" value="" id="payfor-amount"><span></span></td>
<td class="algin-right">下发金额</td>
<td><input id="payfor-amount" type="text" value=""><span></span></td>
</tr>
</tbody>
</table>
<div class="panel-footer">
<input type="button" class="btn btn-default" name="" id="" value="取消">
<input type="button" class="btn btn-primary" value="提交" id="submit">
<input class="btn btn-default" id="" name="" type="button" value="取消">
<input class="btn btn-primary" id="submit" type="button" value="提交">
</div>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div aria-labelledby="myModalLabel" class="modal fade" id="myModal" role="dialog" tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
@@ -88,9 +99,10 @@
<div class="menu-table table-responsive">
<table>
<div id="modal-search">
<input type="text" hidden="hidden" id="modal-search-hidden" value="">
搜索:<input type="text" value="" id="modal-search-input" placeholder="名称">
<button type="button" class="btn btn-warning" data-dismiss="modal" id="cannel">取消</button>
<input hidden="hidden" id="modal-search-hidden" type="text" value="">
搜索:<input id="modal-search-input" placeholder="名称" type="text" value="">
<button class="btn btn-warning" data-dismiss="modal" id="cannel" type="button">取消
</button>
</div>
<thead class="thead-dark" id="table-head">
</thead>
@@ -110,10 +122,14 @@
</select>
</li>
<li class="current_total_page"><span class="current_page">0</span>/<span class="total_page">0</span></li>
<li class="current_total_page"><span class="current_page">0</span>/<span
class="total_page">0</span>
</li>
<li class="pre_page">上一页</li>
<li class="next_page">下一页</li>
<li class="jump_page">跳转 <input type="text" name="jump_page" value=""> <button type="button" class="btn btn-default">Go</button></li>
<li class="jump_page">跳转 <input name="jump_page" type="text" value="">
<button class="btn btn-default" type="button">Go</button>
</li>
</div>
</div>
</div>
@@ -133,6 +149,7 @@
"jumpPage": jumpPage
};
}
function setOrderCutPageValues(res) {
$(".current_page").html(res.CurrentPage);
$(".total_page").html(res.TotalPage);
@@ -143,10 +160,12 @@
});
$(".jump_page input").val("");
}
function clearModal() {
$("#table-head").html("");
$("#table-body").html("");
}
function randBankCardList(res) {
clearModal();
setOrderCutPageValues(res);
@@ -166,6 +185,7 @@
$("#table-body").html(str);
$("#myModal").modal();
}
function saveBankCard(uid) {
$("#cannel").trigger('click');
$.ajax({
@@ -191,6 +211,7 @@
}
});
}
$("#submit").click(function () {
let bankUid = $("#bank-uid").val();
let bankName = $("#bank-name").html();
@@ -262,6 +283,7 @@
}
bankList(dataJSON);
});
function bankList(dataJSON) {
$.ajax({

View File

@@ -3,9 +3,10 @@
<head>
<meta charset="UTF-8">
<title>管理后台</title>
<link rel="stylesheet" type="text/css" href="../static/css/basic.css">
<link rel="stylesheet" type="text/css" href="../static/lib/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../static/lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css">
<link href="../static/css/basic.css" rel="stylesheet" type="text/css">
<link href="../static/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="../static/lib/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet"
type="text/css">
<script src="../static/js/filter.js"></script>
<script src="../static/js/jquery.min.js"></script>
<script src="../static/lib/bootstrap/js/bootstrap.min.js"></script>
@@ -17,6 +18,7 @@
font-weight: normal;
margin-right: 10px;
}
#select-self-name {
height: 30px;
line-height: 30px;
@@ -31,12 +33,12 @@
<div class="panel-body">
<label for="">
<span>操作账户:</span>
<select name="" id="select-self-name">
<select id="select-self-name" name="">
</select>
</label>
<label for="">
<span>操作类型:</span>
<select name="" id="select-self-type">
<select id="select-self-type" name="">
<option value="">请选择</option>
<option value="plus_amount">加款</option>
<option value="sub_amount">减款</option>
@@ -46,9 +48,9 @@
</label>
<label for="">
<span>操作金额:</span>
<input type="text" id="select-self-amount" placeholder="单位:元">
<input id="select-self-amount" placeholder="单位:元" type="text">
</label>
<input type="button" class="btn btn-primary" value="执行" onclick="selfOperateAccount();">
<input class="btn btn-primary" onclick="selfOperateAccount();" type="button" value="执行">
</div>
</div>
@@ -60,27 +62,34 @@
<table class="table table-responsive table-bordered">
<thead>
<tr>
<td class="algin-right">结果</td><td><span id="operate-result">待处理......</span></td>
<td class="algin-right">结果</td>
<td><span id="operate-result">待处理......</span></td>
</tr>
</thead>
<tbody>
<tr>
<td class="algin-right">账户余额</td><td><span id="balance"> </span></td>
<td class="algin-right">账户余额</td>
<td><span id="balance"> </span></td>
</tr>
<tr>
<td class="algin-right">结算金额</td><td><span id="settle-amount"></span></td>
<td class="algin-right">结算金额</td>
<td><span id="settle-amount"></span></td>
</tr>
<tr>
<td class="algin-right">在途金额</td><td><span id="wait-amount"></span></td>
<td class="algin-right">在途金额</td>
<td><span id="wait-amount"></span></td>
</tr>
<tr>
<td class="algin-right">冻结金额</td><td><span id="freeze-amount"></span></td>
<td class="algin-right">冻结金额</td>
<td><span id="freeze-amount"></span></td>
</tr>
<tr>
<td class="algin-right">押款金额</td><td><span id="loan-amount"></span></td>
<td class="algin-right">押款金额</td>
<td><span id="loan-amount"></span></td>
</tr>
<tr>
<td class="algin-right">代付中金额</td><td><span id="payfor-amount"></span></td>
<td class="algin-right">代付中金额</td>
<td><span id="payfor-amount"></span></td>
</tr>
</tbody>
</table>
@@ -99,6 +108,7 @@
"amount": amount
};
}
function clearResult() {
$("#operate-result").html("待处理......");
$("#balance").html("");
@@ -108,6 +118,7 @@
$("#loan-amount").html("");
$("#payfor-amount").html("");
}
function randResult(res) {
let account = res.AccountList[0];
$("#operate-result").html(res.Msg);
@@ -118,6 +129,7 @@
$("#loan-amount").html(account.LoanAmount);
$("#payfor-amount").html(account.PayforAmount);
}
function selfOperateAccount() {
clearResult();
let dataJSON = getValues();
@@ -139,6 +151,7 @@
}
});
}
function getAccount() {
let dataJSON = getValues();
$.ajax({
@@ -158,6 +171,7 @@
}
});
}
$("#select-self-name").change(function () {
clearResult();
let accountUid = $("#select-self-name").val();
@@ -169,6 +183,7 @@
$("#select-self-type").click(function () {
// clearResult();
});
function setAccount() {
$.ajax({
url: "/get/all/account",
@@ -186,6 +201,7 @@
}
});
}
$(function () {
setAccount();
});

View File

@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="zh">
<body>
<iframe src="">
</iframe>
</body>
<style>
iframe {
width: 100%;
height: 90vh;
}
</style>
<script>
// 构建链接
const url = "{{.portalHost}}" + "/iframe/tMallGameAccount?token={{.token}}";
// 链接添加至到iframe中
document.getElementsByTagName("iframe")[0].src = url;
</script>
</html>

View File

@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="zh">
<body>
<iframe src="">
</iframe>
</body>
<style>
iframe {
width: 100%;
height: 90vh;
}
</style>
<script>
// 构建链接
const url = "{{.portalHost}}" + "/iframe/tMallGameOrder?token={{.token}}";
// 链接添加至到iframe中
document.getElementsByTagName("iframe")[0].src = url;
</script>
</html>