Merge branch 'gin-vue-admin_v2_dev' of https://github.com/flipped-aurora/gin-vue-admin into action-ci

This commit is contained in:
Granty1
2020-04-24 10:58:00 +08:00
104 changed files with 13165 additions and 1673 deletions
+26
View File
@@ -0,0 +1,26 @@
FROM centos:7.6.1810
# 设置go mod proxy 国内代理
# 设置golang path
ENV GOPROXY=https://goproxy.io GOPATH=/gopath PATH="${PATH}:/usr/local/go/bin"
# 定义使用的Golang 版本
ARG GO_VERSION=1.13.3
# 安装 golang 1.13.3
RUN yum install -y wget && \
yum install -y wqy-microhei-fonts wqy-zenhei-fonts && \
wget "https://dl.google.com/go/go$GO_VERSION.linux-amd64.tar.gz" && \
rm -rf /usr/local/go && \
tar -C /usr/local -xzf "go$GO_VERSION.linux-amd64.tar.gz" && \
rm -rf *.tar.gz && \
go version && go env;
WORKDIR $GOPATH
COPY . gin-vue
RUN cd server && go build -o app;
EXPOSE 8888
CMD ["gin-vue/app"]
+9 -9
View File
@@ -17,7 +17,7 @@ import (
// @Produce application/json
// @Param data body model.ExaCustomer true "创建客户"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /customer/createExaCustomer [post]
// @Router /customer/customer [post]
func CreateExaCustomer(c *gin.Context) {
var cu model.ExaCustomer
_ = c.ShouldBindJSON(&cu)
@@ -40,7 +40,7 @@ func CreateExaCustomer(c *gin.Context) {
// @Produce application/json
// @Param data body model.ExaCustomer true "删除客户"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /customer/deleteExaCustomer [post]
// @Router /customer/customer [delete]
func DeleteExaCustomer(c *gin.Context) {
var cu model.ExaCustomer
_ = c.ShouldBindJSON(&cu)
@@ -59,7 +59,7 @@ func DeleteExaCustomer(c *gin.Context) {
// @Produce application/json
// @Param data body model.ExaCustomer true "创建客户"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /customer/updateExaCustomer [post]
// @Router /customer/customer [put]
func UpdateExaCustomer(c *gin.Context) {
var cu model.ExaCustomer
_ = c.ShouldBindJSON(&cu)
@@ -78,10 +78,10 @@ func UpdateExaCustomer(c *gin.Context) {
// @Produce application/json
// @Param data body model.ExaCustomer true "获取单一客户信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /customer/getExaCustomer [post]
// @Router /customer/customer [get]
func GetExaCustomer(c *gin.Context) {
var cu model.ExaCustomer
_ = c.ShouldBindJSON(&cu)
_ = c.ShouldBindQuery(&cu)
err, customer := service.GetExaCustomer(cu.ID)
if err != nil {
response.FailWithMessage(fmt.Sprintf("获取失败:%v", err), c)
@@ -95,17 +95,17 @@ func GetExaCustomer(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.PageInfo true "获取权限客户列表"
// @Param data body request.PageInfo true "获取权限客户列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /customer/getExaCustomerList [post]
// @Router /customer/customerList [get]
func GetExaCustomerList(c *gin.Context) {
claims, _ := c.Get("claims")
waitUse := claims.(*request.CustomClaims)
var pageInfo request.PageInfo
_ = c.ShouldBindJSON(&pageInfo)
_ = c.ShouldBindQuery(&pageInfo)
err, customerList, total := service.GetCustomerInfoList(waitUse.AuthorityId, pageInfo)
if err != nil {
response.FailWithMessage(fmt.Sprintf("创建失败:%v", err), c)
response.FailWithMessage(fmt.Sprintf("获取失败:%v", err), c)
} else {
response.OkWithData(resp.PageResult{
List: customerList,
+1 -1
View File
@@ -85,7 +85,7 @@ func DeleteFile(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.PageInfo true "分页获取文件户列表"
// @Param data body request.PageInfo true "分页获取文件户列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /fileUploadAndDownload/getFileList [post]
func GetFileList(c *gin.Context) {
+2 -2
View File
@@ -55,7 +55,7 @@ func DeleteApi(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SearchApiParams true "分页获取API列表"
// @Param data body request.SearchApiParams true "分页获取API列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /api/getApiList [post]
func GetApiList(c *gin.Context) {
@@ -80,7 +80,7 @@ func GetApiList(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.GetById true "根据id获取api"
// @Param data body request.GetById true "根据id获取api"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /api/getApiById [post]
func GetApiById(c *gin.Context) {
+42 -4
View File
@@ -21,11 +21,30 @@ import (
func CreateAuthority(c *gin.Context) {
var auth model.SysAuthority
_ = c.ShouldBindJSON(&auth)
err, authBack := service.CreateAuthority(&auth)
err, authBack := service.CreateAuthority(auth)
if err != nil {
response.FailWithMessage(fmt.Sprintf("创建失败,%v", err), c)
} else {
response.OkWithData(resp.SysAuthorityResponse{Authority: *authBack}, c)
response.OkWithData(resp.SysAuthorityResponse{Authority: authBack}, c)
}
}
// @Tags authority
// @Summary 拷贝角色
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body response.SysAuthorityCopyResponse true "拷贝角色"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"拷贝成功"}"
// @Router /authority/copyAuthority [post]
func CopyAuthority(c *gin.Context) {
var copyInfo resp.SysAuthorityCopyResponse
_ = c.ShouldBindJSON(&copyInfo)
err, authBack := service.CopyAuthority(copyInfo)
if err != nil {
response.FailWithMessage(fmt.Sprintf("拷贝失败,%v", err), c)
} else {
response.OkWithData(resp.SysAuthorityResponse{Authority: authBack}, c)
}
}
@@ -41,7 +60,7 @@ func DeleteAuthority(c *gin.Context) {
var a model.SysAuthority
_ = c.ShouldBindJSON(&a)
//删除角色之前需要判断是否有用户正在使用此角色
err := service.DeleteAuthority(a)
err := service.DeleteAuthority(&a)
if err != nil {
response.FailWithMessage(fmt.Sprintf("删除失败,%v", err), c)
} else {
@@ -49,12 +68,31 @@ func DeleteAuthority(c *gin.Context) {
}
}
// @Tags authority
// @Summary 设置角色资源权限
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysAuthority true "设置角色资源权限"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"设置成功"}"
// @Router /authority/updateAuthority [post]
func UpdateAuthority(c *gin.Context) {
var auth model.SysAuthority
_ = c.ShouldBindJSON(&auth)
err, authority := service.UpdateAuthority(auth)
if err != nil {
response.FailWithMessage(fmt.Sprintf("更新失败,%v", err), c)
} else {
response.OkWithData(resp.SysAuthorityResponse{authority}, c)
}
}
// @Tags authority
// @Summary 分页获取角色列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.PageInfo true "分页获取用户列表"
// @Param data body request.PageInfo true "分页获取用户列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /authority/getAuthorityList [post]
func GetAuthorityList(c *gin.Context) {
+3 -3
View File
@@ -14,7 +14,7 @@ import (
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.CasbinInReceive true "更改角色api权限"
// @Param data body request.CasbinInReceive true "更改角色api权限"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /casbin/UpdateCasbin [post]
func UpdateCasbin(c *gin.Context) {
@@ -33,7 +33,7 @@ func UpdateCasbin(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.CasbinInReceive true "获取权限列表"
// @Param data body request.CasbinInReceive true "获取权限列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /casbin/getPolicyPathByAuthorityId [post]
func GetPolicyPathByAuthorityId(c *gin.Context) {
@@ -48,7 +48,7 @@ func GetPolicyPathByAuthorityId(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.CasbinInReceive true "获取权限列表"
// @Param data body request.CasbinInReceive true "获取权限列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /casbin/CasbinTest [get]
func CasbinTest(c *gin.Context) {
+1 -1
View File
@@ -20,7 +20,7 @@ func JsonInBlacklist(c *gin.Context) {
modelJwt := model.JwtBlacklist{
Jwt: token,
}
err := service.JsonInBlacklist(&modelJwt)
err := service.JsonInBlacklist(modelJwt)
if err != nil {
response.FailWithMessage(fmt.Sprintf("jwt作废失败,%v", err), c)
} else {
+7 -8
View File
@@ -14,7 +14,7 @@ import (
// @Summary 获取用户动态路由
// @Security ApiKeyAuth
// @Produce application/json
// @Param data body api.RegisterAndLoginStruct true "可以什么都不填"
// @Param data body request.RegisterAndLoginStruct true "可以什么都不填"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
// @Router /menu/getMenu [post]
func GetMenu(c *gin.Context) {
@@ -33,7 +33,7 @@ func GetMenu(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.PageInfo true "分页获取基础menu列表"
// @Param data body request.PageInfo true "分页获取基础menu列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/getMenuList [post]
func GetMenuList(c *gin.Context) {
@@ -75,7 +75,7 @@ func AddBaseMenu(c *gin.Context) {
// @Summary 获取用户动态路由
// @Security ApiKeyAuth
// @Produce application/json
// @Param data body api.RegisterAndLoginStruct true "可以什么都不填"
// @Param data body request.RegisterAndLoginStruct true "可以什么都不填"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
// @Router /menu/getBaseMenuTree [post]
func GetBaseMenuTree(c *gin.Context) {
@@ -84,7 +84,6 @@ func GetBaseMenuTree(c *gin.Context) {
response.FailWithMessage(fmt.Sprintf("获取失败,%v", err), c)
} else {
response.OkWithData(resp.SysBaseMenusResponse{Menus: menus}, c)
}
}
@@ -93,7 +92,7 @@ func GetBaseMenuTree(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.AddMenuAuthorityInfo true "增加menu和角色关联关系"
// @Param data body request.AddMenuAuthorityInfo true "增加menu和角色关联关系"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/addMenuAuthority [post]
func AddMenuAuthority(c *gin.Context) {
@@ -113,7 +112,7 @@ func AddMenuAuthority(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.AuthorityIdInfo true "增加menu和角色关联关系"
// @Param data body request.AuthorityIdInfo true "增加menu和角色关联关系"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/GetMenuAuthority [post]
func GetMenuAuthority(c *gin.Context) {
@@ -132,7 +131,7 @@ func GetMenuAuthority(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.GetById true "删除菜单"
// @Param data body request.GetById true "删除菜单"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/deleteBaseMenu [post]
func DeleteBaseMenu(c *gin.Context) {
@@ -171,7 +170,7 @@ func UpdateBaseMenu(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.GetById true "根据id获取菜单"
// @Param data body request.GetById true "根据id获取菜单"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/getBaseMenuById [post]
func GetBaseMenuById(c *gin.Context) {
+27 -8
View File
@@ -33,18 +33,18 @@ func Register(c *gin.Context) {
var R request.RegisterStruct
_ = c.ShouldBindJSON(&R)
user := &model.SysUser{Username: R.Username, NickName: R.NickName, Password: R.Password, HeaderImg: R.HeaderImg, AuthorityId: R.AuthorityId}
err, user := service.Register(user)
err, userReturn := service.Register(*user)
if err != nil {
response.FailWithDetailed(response.ERROR, resp.SysUserResponse{User: *user}, fmt.Sprintf("%v", err), c)
response.FailWithDetailed(response.ERROR, resp.SysUserResponse{User: userReturn}, fmt.Sprintf("%v", err), c)
} else {
response.OkDetailed(resp.SysUserResponse{User: *user}, "注册成功", c)
response.OkDetailed(resp.SysUserResponse{User: userReturn}, "注册成功", c)
}
}
// @Tags Base
// @Summary 用户登录
// @Produce application/json
// @Param data body model.RegisterAndLoginStruct true "用户登录接口"
// @Param data body request.RegisterAndLoginStruct true "用户登录接口"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"登陆成功"}"
// @Router /base/login [post]
func Login(c *gin.Context) {
@@ -103,7 +103,7 @@ func tokenNext(c *gin.Context, user model.SysUser) {
} else {
var blackJWT model.JwtBlacklist
blackJWT.Jwt = jwtStr
err3 := service.JsonInBlacklist(&blackJWT)
err3 := service.JsonInBlacklist(blackJWT)
if err3 != nil {
response.FailWithMessage("jwt作废失败", c)
} else {
@@ -133,7 +133,7 @@ func tokenNext(c *gin.Context, user model.SysUser) {
// @Summary 用户修改密码
// @Security ApiKeyAuth
// @Produce application/json
// @Param data body model.ChangePasswordStutrc true "用户修改密码"
// @Param data body request.ChangePasswordStruct true "用户修改密码"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"修改成功"}"
// @Router /user/changePassword [put]
func ChangePassword(c *gin.Context) {
@@ -192,7 +192,7 @@ func UploadHeaderImg(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.PageInfo true "分页获取用户列表"
// @Param data body request.PageInfo true "分页获取用户列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /user/getUserList [post]
func GetUserList(c *gin.Context) {
@@ -216,7 +216,7 @@ func GetUserList(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SetUserAuth true "设置用户权限"
// @Param data body request.SetUserAuth true "设置用户权限"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"修改成功"}"
// @Router /user/setUserAuthority [post]
func SetUserAuthority(c *gin.Context) {
@@ -229,3 +229,22 @@ func SetUserAuthority(c *gin.Context) {
response.OkWithMessage("修改成功", c)
}
}
// @Tags SysUser
// @Summary 删除用户
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.SetUserAuth true "删除用户"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"修改成功"}"
// @Router /user/deleteUser [delete]
func DeleteUser(c *gin.Context) {
var reqId request.GetById
_ = c.ShouldBindJSON(&reqId)
err := service.DeleteUser(reqId.Id)
if err != nil {
response.FailWithMessage(fmt.Sprintf("删除失败,%v", err), c)
} else {
response.OkWithMessage("删除成功", c)
}
}
+1 -1
View File
@@ -11,7 +11,7 @@ import (
// @Tags workflow
// @Summary 注册工作流
// @Produce application/json
// @Param data body sysModel.SysWorkflow true "注册工作流接口"
// @Param data body model.SysWorkflow true "注册工作流接口"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"注册成功"}"
// @Router /workflow/createWorkFlow [post]
func CreateWorkFlow(c *gin.Context) {
+8 -3
View File
@@ -18,7 +18,11 @@ mysql:
max-idle-conns: 10
max-open-conns: 10
log-mode: true
#sqlite 配置
sqlite:
path: db.db
log-mode: true
config: 'loc=Asia/Shanghai'
# oss configuration
qiniu:
access-key: '25j8dYBZ2wuiy0yhwShytjZDTX662b8xiFguwxzZ'
@@ -33,12 +37,13 @@ redis:
# system configuration
system:
use-multipoint: false
env: 'develop'
env: 'public' # Change to "develop" to skip authentication for development mode
addr: 8888
db-type: "mysql" # support mysql/sqlite
# captcha configuration
captcha:
key-long: 6
key-long: 4
img-width: 120
img-height: 40
+43 -33
View File
@@ -1,60 +1,70 @@
package config
type Server struct {
Mysql Mysql `mapstructure:"mysql" json:"mysql"`
Qiniu Qiniu `mapstructure:"qiniu" json:"qiniu"`
Casbin Casbin `mapstructure:"casbin" json:"casbin"`
Redis Redis `mapstructure:"redis" json:"redis"`
System System `mapstructure:"system" json:"system"`
JWT JWT `mapstructure:"jwt" json:"jwt"`
Captcha Captcha `mapstructure:"captcha" json:"captcha"`
Log Log `mapstructure:"log" json:"log"`
Mysql Mysql `mapstructure:"mysql" json:"mysql" yaml:"mysql"`
Sqlite Sqlite `mapstructure:"sqlite" json:"sqlite" yaml:"sqlite"`
Qiniu Qiniu `mapstructure:"qiniu" json:"qiniu" yaml:"qiniu"`
Casbin Casbin `mapstructure:"casbin" json:"casbin" yaml:"casbin"`
Redis Redis `mapstructure:"redis" json:"redis" yaml:"redis"`
System System `mapstructure:"system" json:"system" yaml:"system"`
JWT JWT `mapstructure:"jwt" json:"jwt" yaml:"jwt"`
Captcha Captcha `mapstructure:"captcha" json:"captcha" yaml:"captcha"`
Log Log `mapstructure:"log" json:"log" yaml:"log"`
}
type System struct {
UseMultipoint bool `mapstructure:"use-multipoint" json:"useMultipoint"`
Env string `mapstructure:"env" json:"env"`
Addr int `mapstructure:"addr" json:"addr"`
UseMultipoint bool `mapstructure:"use-multipoint" json:"useMultipoint" yaml:"use-multipoint"`
Env string `mapstructure:"env" json:"env" yaml:"env"`
Addr int `mapstructure:"addr" json:"addr" yaml:"addr"`
DbType string `mapstructure:"db-type" json:"dbType" yaml:"db-type"`
}
type JWT struct {
SigningKey string `mapstructure:"signing-key" json:"signingKey"`
SigningKey string `mapstructure:"signing-key" json:"signingKey" yaml:"signing-key"`
}
type Casbin struct {
ModelPath string `mapstructure:"model-path" json:"modelPath"`
ModelPath string `mapstructure:"model-path" json:"modelPath" yaml:"model-path"`
}
type Mysql struct {
Username string `mapstructure:"username" json:"username"`
Password string `mapstructure:"password" json:"password"`
Path string `mapstructure:"path" json:"path"`
Dbname string `mapstructure:"db-name" json:"dbname"`
Config string `mapstructure:"config" json:"config"`
MaxIdleConns int `mapstructure:"max-idle-conns" json:"maxIdleConns"`
MaxOpenConns int `mapstructure:"max-open-conns" json:"maxOpenConns"`
LogMode bool `mapstructure:"log-mode" json:"logMode"`
Username string `mapstructure:"username" json:"username" yaml:"username"`
Password string `mapstructure:"password" json:"password" yaml:"password"`
Path string `mapstructure:"path" json:"path" yaml:"path"`
Dbname string `mapstructure:"db-name" json:"dbname" yaml:"db-name"`
Config string `mapstructure:"config" json:"config" yaml:"config"`
MaxIdleConns int `mapstructure:"max-idle-conns" json:"maxIdleConns" yaml:"max-idle-conns"`
MaxOpenConns int `mapstructure:"max-open-conns" json:"maxOpenConns" yaml:"max-open-conns"`
LogMode bool `mapstructure:"log-mode" json:"logMode" yaml:"log-mode"`
}
type Redis struct {
Addr string `mapstructure:"addr" json:"addr"`
Password string `mapstructure:"password" json:"password"`
DB int `mapstructure:"db" json:"db"`
Addr string `mapstructure:"addr" json:"addr" yaml:"addr"`
Password string `mapstructure:"password" json:"password" yaml:"password"`
DB int `mapstructure:"db" json:"db" yaml:"db"`
}
type Qiniu struct {
AccessKey string `mapstructure:"access-key" json:"accessKey"`
SecretKey string `mapstructure:"secret-key" json:"secretKey"`
AccessKey string `mapstructure:"access-key" json:"accessKey" yaml:"access-key"`
SecretKey string `mapstructure:"secret-key" json:"secretKey" yaml:"secret-key"`
}
type Captcha struct {
KeyLong int `mapstructure:"key-long" json:"keyLong"`
ImgWidth int `mapstructure:"img-width" json:"imgWidth"`
ImgHeight int `mapstructure:"img-height" json:"imgHeight"`
KeyLong int `mapstructure:"key-long" json:"keyLong" yaml:"key-long"`
ImgWidth int `mapstructure:"img-width" json:"imgWidth" yaml:"img-width"`
ImgHeight int `mapstructure:"img-height" json:"imgHeight" yaml:"img-height"`
}
type Log struct {
Prefix string `mapstructure:"prefix" json:"prefix"`
LogFile bool `mapstructure:"log-file" json:"logFile"`
Stdout string `mapstructure:"stdout" json:"stdout"`
File string `mapstructure:"file" json:"file"`
Prefix string `mapstructure:"prefix" json:"prefix" yaml:"prefix"`
LogFile bool `mapstructure:"log-file" json:"logFile" yaml:"log-file"`
Stdout string `mapstructure:"stdout" json:"stdout" yaml:"stdout"`
File string `mapstructure:"file" json:"file" yaml:"file"`
}
type Sqlite struct {
Username string `mapstructure:"username" json:"username" yaml:"username"`
Password string `mapstructure:"password" json:"password" yaml:"password"`
Path string `mapstructure:"path" json:"path" yaml:"path"`
Config string `mapstructure:"config" json:"config" yaml:"config"`
LogMode bool `mapstructure:"log-mode" json:"logMode" yaml:"log-mode"`
}
BIN
View File
Binary file not shown.
+83 -67
View File
@@ -1,17 +1,17 @@
/*
Navicat Premium Data Transfer
Source Server : pandora
Source Server : qmplus
Source Server Type : MySQL
Source Server Version : 50640
Source Server Version : 50644
Source Host : localhost:3306
Source Schema : qmplus
Target Server Type : MySQL
Target Server Version : 50640
Target Server Version : 50644
File Encoding : 65001
Date: 07/04/2020 21:55:13
Date: 24/04/2020 10:28:38
*/
SET NAMES utf8mb4;
@@ -63,16 +63,16 @@ INSERT INTO `casbin_rule` VALUES ('p', '8881', '/user/setUserAuthority', 'POST',
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/fileUploadAndDownload/upload', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/fileUploadAndDownload/getFileList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/fileUploadAndDownload/deleteFile', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/casbin/UpdateCasbin', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/casbin/updateCasbin', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/casbin/getPolicyPathByAuthorityId', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/jwt/jsonInBlacklist', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/system/getSystemConfig', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/system/setSystemConfig', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/createExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/updateExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/deleteExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/getExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/getExaCustomerList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/customer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/customer', 'PUT', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/customer', 'DELETE', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/customer', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/customerList', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/base/login', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/base/register', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/api/createApi', 'POST', '', '', '');
@@ -102,16 +102,16 @@ INSERT INTO `casbin_rule` VALUES ('p', '9528', '/user/setUserAuthority', 'POST',
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/fileUploadAndDownload/upload', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/fileUploadAndDownload/getFileList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/fileUploadAndDownload/deleteFile', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/casbin/UpdateCasbin', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/casbin/updateCasbin', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/casbin/getPolicyPathByAuthorityId', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/jwt/jsonInBlacklist', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/system/getSystemConfig', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/system/setSystemConfig', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/createExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/updateExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/deleteExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/getExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/getExaCustomerList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/customer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/customer', 'PUT', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/customer', 'DELETE', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/customer', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/customerList', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/autoCode/createTemp', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/base/login', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/base/register', 'POST', '', '', '');
@@ -125,6 +125,8 @@ INSERT INTO `casbin_rule` VALUES ('p', '888', '/authority/createAuthority', 'POS
INSERT INTO `casbin_rule` VALUES ('p', '888', '/authority/deleteAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/authority/getAuthorityList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/authority/setDataAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/authority/updateAuthority', 'PUT', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/authority/copyAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/getMenu', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/getMenuList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/addBaseMenu', 'POST', '', '', '');
@@ -142,17 +144,17 @@ INSERT INTO `casbin_rule` VALUES ('p', '888', '/user/setUserAuthority', 'POST',
INSERT INTO `casbin_rule` VALUES ('p', '888', '/fileUploadAndDownload/upload', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/fileUploadAndDownload/getFileList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/fileUploadAndDownload/deleteFile', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/casbin/UpdateCasbin', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/casbin/updateCasbin', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/casbin/getPolicyPathByAuthorityId', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/casbin/casbinTest/:pathParam', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/jwt/jsonInBlacklist', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/system/getSystemConfig', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/system/setSystemConfig', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/createExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/updateExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/deleteExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/getExaCustomer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/getExaCustomerList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/customer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/customer', 'PUT', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/customer', 'DELETE', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/customer', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/customerList', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/autoCode/createTemp', 'POST', '', '', '');
-- ----------------------------
@@ -3789,12 +3791,15 @@ CREATE TABLE `exa_customers` (
`sys_user_authority_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_exa_customers_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of exa_customers
-- ----------------------------
INSERT INTO `exa_customers` VALUES (1, '2020-02-25 18:01:48', '2020-02-25 18:01:48', NULL, '测试客户123', '1761111111', 10, '888');
INSERT INTO `exa_customers` VALUES (1, '2020-02-25 18:01:48', '2020-04-10 12:29:29', NULL, '测试客户', '1761111111', 10, '888');
INSERT INTO `exa_customers` VALUES (2, '2020-04-10 12:25:53', '2020-04-10 12:25:53', '2020-04-10 13:43:56', 'test', '123123123', 10, '888');
INSERT INTO `exa_customers` VALUES (3, '2020-04-10 13:44:12', '2020-04-10 13:44:12', '2020-04-10 13:44:13', '123123', '123123', 10, '888');
INSERT INTO `exa_customers` VALUES (4, '2020-04-10 13:47:10', '2020-04-10 13:47:10', '2020-04-10 13:47:12', '22222222', '222222222222222', 10, '888');
-- ----------------------------
-- Table structure for exa_file_chunks
@@ -3810,7 +3815,7 @@ CREATE TABLE `exa_file_chunks` (
`file_chunk_number` int(11) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_exa_file_chunks_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for exa_file_upload_and_downloads
@@ -3830,15 +3835,6 @@ CREATE TABLE `exa_file_upload_and_downloads` (
INDEX `idx_exa_file_upload_and_downloads_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of exa_file_upload_and_downloads
-- ----------------------------
INSERT INTO `exa_file_upload_and_downloads` VALUES (7, '2019-10-26 22:46:32', '2019-10-26 22:46:32', NULL, 'logo.png', 'http://qmplusimg.henrongyi.top/1572101191logo.png', 'png', '1572101191logo.png');
INSERT INTO `exa_file_upload_and_downloads` VALUES (10, '2019-10-26 23:10:44', '2019-10-26 23:10:44', NULL, 'logo.png', 'http://qmplusimg.henrongyi.top/1572102643logo.png', 'png', '1572102643logo.png');
INSERT INTO `exa_file_upload_and_downloads` VALUES (12, '2019-10-26 23:14:08', '2019-10-26 23:14:08', NULL, 'logo.png', 'http://qmplusimg.henrongyi.top/1572102846logo.png', 'png', '1572102846logo.png');
INSERT INTO `exa_file_upload_and_downloads` VALUES (13, '2019-10-26 23:18:17', '2019-10-26 23:18:17', NULL, 'logo.png', 'http://qmplusimg.henrongyi.top/1572103096logo.png', 'png', '1572103096logo.png');
INSERT INTO `exa_file_upload_and_downloads` VALUES (15, '2019-12-15 14:31:00', '2019-12-15 14:31:00', NULL, 'logo.png', 'http://qmplusimg.henrongyi.top/1576391451logo.png', 'png', '1576391451logo.png');
-- ----------------------------
-- Table structure for exa_files
-- ----------------------------
@@ -3855,7 +3851,7 @@ CREATE TABLE `exa_files` (
`is_finish` tinyint(1) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_exa_files_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for jwt_blacklists
@@ -3869,7 +3865,7 @@ CREATE TABLE `jwt_blacklists` (
`jwt` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_jwt_blacklists_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 39 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 49 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of jwt_blacklists
@@ -3910,6 +3906,16 @@ INSERT INTO `jwt_blacklists` VALUES (35, '2020-01-06 16:59:26', '2020-01-06 16:5
INSERT INTO `jwt_blacklists` VALUES (36, '2020-03-21 14:46:14', '2020-03-21 14:46:14', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg1Mzc3ODY3LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODQ3NzIwNjd9.DLhWhD1FdcWLyFLcXQynKJnenbVHrSiKhlDGFRzgo5k');
INSERT INTO `jwt_blacklists` VALUES (37, '2020-03-31 14:24:35', '2020-03-31 14:24:35', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg2MTM4MTA4LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODU1MzIzMDh9.Ro2F2dZLfOk2Z_OPRbweOuCpchr6HlHfQIF5qjfc8y4');
INSERT INTO `jwt_blacklists` VALUES (38, '2020-04-01 16:07:57', '2020-04-01 16:07:57', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg2MjQwNzQyLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODU2MzQ5NDJ9.9qaOFu7D5cq4vxTfLi4pyO_JGcKjVAEJIcoStJWJlYg');
INSERT INTO `jwt_blacklists` VALUES (39, '2020-04-15 16:30:41', '2020-04-15 16:30:41', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg3MDk1Njg5LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODY0ODk4ODl9.-cNmRAyqhylZlzakwoFY08x7RnjI3CiWTiQc_Iabb-c');
INSERT INTO `jwt_blacklists` VALUES (40, '2020-04-15 16:39:26', '2020-04-15 16:39:26', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg3NTQ0MjUwLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODY5Mzg0NTB9.smVP-Rl1EkAuUVqXW7z0mpxA5O86vXj0oH4FukG-NVA');
INSERT INTO `jwt_blacklists` VALUES (41, '2020-04-15 17:08:06', '2020-04-15 17:08:06', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg3NTQ0NzgxLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODY5Mzg5ODF9.OMZ08Y8aPuj40-NGEQ402LyRFBpkLWzzaqD3_tvj1h8');
INSERT INTO `jwt_blacklists` VALUES (42, '2020-04-15 17:08:28', '2020-04-15 17:08:28', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg3NTQ2NDk0LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODY5NDA2OTR9.9lsoTbZrwhZ8kMXiH-Ta3A4h_yp7SwLj57mo_u5mrk4');
INSERT INTO `jwt_blacklists` VALUES (43, '2020-04-15 17:10:24', '2020-04-15 17:10:24', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg3NTQ2NTE1LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODY5NDA3MTV9.5SrUrUmd4YhzlGmSpA9xJW_wbjV6yI6ty_NriIceOQo');
INSERT INTO `jwt_blacklists` VALUES (44, '2020-04-15 17:11:43', '2020-04-15 17:11:43', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg3NTQ2NjI5LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODY5NDA4Mjl9.SFiomEpOshboOe0JGDa1HlJt5aQIF7IeyOsoDwl1o8E');
INSERT INTO `jwt_blacklists` VALUES (45, '2020-04-15 17:12:54', '2020-04-15 17:12:54', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg3NTQ2NzE4LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODY5NDA5MTh9.xrwEknZQN2J3poarMTQvb7mX1Icicz2_f60kw36g9og');
INSERT INTO `jwt_blacklists` VALUES (46, '2020-04-15 17:14:47', '2020-04-15 17:14:47', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg3NTQ2Nzg5LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODY5NDA5ODl9.3jbdl1N0KA8ExFMWXHi3ha4aESKq8yDKDgpSH4Xdsnk');
INSERT INTO `jwt_blacklists` VALUES (47, '2020-04-22 12:04:20', '2020-04-22 12:04:20', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg3NjE2MTYwLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODcwMTAzNjB9.jRHlnfXuJhp4hBE-QqCZ-lodzwK67IBkDI2xteB0OQw');
INSERT INTO `jwt_blacklists` VALUES (48, '2020-04-22 12:12:17', '2020-04-22 12:12:17', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg4MTMzMjQyLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODc1Mjc0NDJ9.WJ59uRUxXJ7-rUH07mE6jCfnwgfvQnpPaLU5vJ_VhWM');
-- ----------------------------
-- Table structure for sys_apis
@@ -3928,7 +3934,7 @@ CREATE TABLE `sys_apis` (
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_apis_deleted_at`(`deleted_at`) USING BTREE,
INDEX `idx_sys_apis_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 46 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 48 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of sys_apis
@@ -3960,20 +3966,22 @@ INSERT INTO `sys_apis` VALUES (28, '2019-10-09 15:15:17', '2019-10-09 15:17:07',
INSERT INTO `sys_apis` VALUES (29, '2019-10-09 23:01:40', '2019-10-09 23:01:40', NULL, NULL, '/user/setUserAuthority', '修改用户角色', 'user', 'POST');
INSERT INTO `sys_apis` VALUES (30, '2019-10-26 20:14:38', '2019-10-26 20:14:38', NULL, NULL, '/fileUploadAndDownload/upload', '文件上传示例', 'fileUploadAndDownload', 'POST');
INSERT INTO `sys_apis` VALUES (31, '2019-10-26 20:14:59', '2019-10-26 20:14:59', NULL, NULL, '/fileUploadAndDownload/getFileList', '获取上传文件列表', 'fileUploadAndDownload', 'POST');
INSERT INTO `sys_apis` VALUES (32, '2019-12-12 13:28:47', '2019-12-12 13:28:47', NULL, NULL, '/casbin/UpdateCasbin', '更改角色api权限', 'casbin', 'POST');
INSERT INTO `sys_apis` VALUES (32, '2019-12-12 13:28:47', '2019-12-12 13:28:47', NULL, NULL, '/casbin/updateCasbin', '更改角色api权限', 'casbin', 'POST');
INSERT INTO `sys_apis` VALUES (33, '2019-12-12 13:28:59', '2019-12-12 13:28:59', NULL, NULL, '/casbin/getPolicyPathByAuthorityId', '获取权限列表', 'casbin', 'POST');
INSERT INTO `sys_apis` VALUES (34, '2019-12-12 17:02:15', '2019-12-12 17:02:15', NULL, NULL, '/fileUploadAndDownload/deleteFile', '删除文件', 'fileUploadAndDownload', 'POST');
INSERT INTO `sys_apis` VALUES (35, '2019-12-28 18:18:07', '2019-12-28 18:18:07', NULL, NULL, '/jwt/jsonInBlacklist', 'jwt加入黑名单', 'jwt', 'POST');
INSERT INTO `sys_apis` VALUES (36, '2020-01-06 17:56:36', '2020-01-06 17:56:36', NULL, NULL, '/authority/setDataAuthority', '设置角色资源权限', 'authority', 'POST');
INSERT INTO `sys_apis` VALUES (37, '2020-01-13 14:04:05', '2020-01-13 14:04:05', NULL, NULL, '/system/getSystemConfig', '获取配置文件内容', 'system', 'POST');
INSERT INTO `sys_apis` VALUES (38, '2020-01-13 15:02:06', '2020-01-13 15:02:06', NULL, NULL, '/system/setSystemConfig', '设置配置文件内容', 'system', 'POST');
INSERT INTO `sys_apis` VALUES (39, '2020-02-25 15:32:39', '2020-02-25 15:32:39', NULL, NULL, '/customer/createExaCustomer', '创建客户', 'customer', 'POST');
INSERT INTO `sys_apis` VALUES (40, '2020-02-25 15:32:51', '2020-02-25 15:34:56', NULL, NULL, '/customer/updateExaCustomer', '更新客户', 'customer', 'POST');
INSERT INTO `sys_apis` VALUES (41, '2020-02-25 15:33:57', '2020-02-25 15:33:57', NULL, NULL, '/customer/deleteExaCustomer', '删除客户', 'customer', 'POST');
INSERT INTO `sys_apis` VALUES (42, '2020-02-25 15:36:48', '2020-02-25 15:37:16', NULL, NULL, '/customer/getExaCustomer', '获取单一客户', 'customer', 'POST');
INSERT INTO `sys_apis` VALUES (43, '2020-02-25 15:37:06', '2020-02-25 15:37:06', NULL, NULL, '/customer/getExaCustomerList', '获取客户列表', 'customer', 'POST');
INSERT INTO `sys_apis` VALUES (39, '2020-02-25 15:32:39', '2020-02-25 15:32:39', NULL, NULL, '/customer/customer', '创建客户', 'customer', 'POST');
INSERT INTO `sys_apis` VALUES (40, '2020-02-25 15:32:51', '2020-02-25 15:34:56', NULL, NULL, '/customer/customer', '更新客户', 'customer', 'PUT');
INSERT INTO `sys_apis` VALUES (41, '2020-02-25 15:33:57', '2020-02-25 15:33:57', NULL, NULL, '/customer/customer', '删除客户', 'customer', 'DELETE');
INSERT INTO `sys_apis` VALUES (42, '2020-02-25 15:36:48', '2020-02-25 15:37:16', NULL, NULL, '/customer/customer', '获取单一客户', 'customer', 'GET');
INSERT INTO `sys_apis` VALUES (43, '2020-02-25 15:37:06', '2020-02-25 15:37:06', NULL, NULL, '/customer/customerList', '获取客户列表', 'customer', 'GET');
INSERT INTO `sys_apis` VALUES (44, '2020-03-12 14:36:54', '2020-03-12 14:56:50', NULL, NULL, '/casbin/casbinTest/:pathParam', 'RESTFUL模式测试', 'casbin', 'GET');
INSERT INTO `sys_apis` VALUES (45, '2020-03-29 23:01:28', '2020-03-29 23:01:28', NULL, NULL, '/autoCode/createTemp', '自动化代码', 'autoCode', 'POST');
INSERT INTO `sys_apis` VALUES (46, '2020-04-15 12:46:58', '2020-04-15 12:46:58', NULL, NULL, '/authority/updateAuthority', '更新角色信息', 'authority', 'PUT');
INSERT INTO `sys_apis` VALUES (47, '2020-04-20 15:14:25', '2020-04-20 15:14:25', NULL, NULL, '/authority/copyAuthority', '拷贝角色', 'authority', 'POST');
-- ----------------------------
-- Table structure for sys_authorities
@@ -3994,9 +4002,9 @@ CREATE TABLE `sys_authorities` (
-- ----------------------------
-- Records of sys_authorities
-- ----------------------------
INSERT INTO `sys_authorities` VALUES ('888', '普通用户', '0', '2020-04-04 11:44:56', NULL, NULL);
INSERT INTO `sys_authorities` VALUES ('8881', '普通用户子角色', '888', '2020-04-04 11:44:56', NULL, NULL);
INSERT INTO `sys_authorities` VALUES ('9528', '测试角色', '0', '2020-04-04 11:44:56', NULL, NULL);
INSERT INTO `sys_authorities` VALUES ('888', '普通用户', '0', '2020-04-04 11:44:56', '2020-04-24 10:16:42', NULL);
INSERT INTO `sys_authorities` VALUES ('8881', '普通用户子角色', '888', '2020-04-04 11:44:56', '2020-04-24 10:16:42', NULL);
INSERT INTO `sys_authorities` VALUES ('9528', '测试角色', '0', '2020-04-04 11:44:56', '2020-04-24 10:16:42', NULL);
-- ----------------------------
-- Table structure for sys_authority_menus
@@ -4079,6 +4087,8 @@ CREATE TABLE `sys_base_menus` (
`icon` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`nick_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sort` int(255) NULL DEFAULT NULL,
`keep_alive` tinyint(1) NULL DEFAULT NULL,
`default_menu` tinyint(1) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_base_menus_deleted_at`(`deleted_at`) USING BTREE,
INDEX `idx_sys_base_menus_deleted_at`(`deleted_at`) USING BTREE
@@ -4087,26 +4097,26 @@ CREATE TABLE `sys_base_menus` (
-- ----------------------------
-- Records of sys_base_menus
-- ----------------------------
INSERT INTO `sys_base_menus` VALUES (1, '2019-09-19 22:05:18', '2020-04-07 21:48:04', NULL, 0, 0, 'dashboard', 'dashboard', 0, 'view/dashboard/index.vue', '仪表盘', 'setting', '仪表盘', 1);
INSERT INTO `sys_base_menus` VALUES (2, '2019-09-19 22:06:17', '2020-03-27 20:33:58', NULL, 0, 0, 'test', 'test', 0, 'view/test/index.vue', '测试菜单', 'info', '测试菜单', 2);
INSERT INTO `sys_base_menus` VALUES (3, '2019-09-19 22:06:38', '2019-12-12 16:51:31', NULL, 0, 0, 'admin', 'superAdmin', 0, 'view/superAdmin/index.vue', '超级管理员', 'user-solid', '超级管理员', 3);
INSERT INTO `sys_base_menus` VALUES (4, '2019-09-19 22:11:53', '2019-09-19 22:11:53', NULL, 0, 3, 'authority', 'authority', 0, 'view/superAdmin/authority/authority.vue', '角色管理', 's-custom', '角色管理', 1);
INSERT INTO `sys_base_menus` VALUES (5, '2019-09-19 22:13:18', '2019-12-12 16:57:20', NULL, 0, 3, 'menu', 'menu', 0, 'view/superAdmin/menu/menu.vue', '菜单管理', 's-order', '菜单管理', 2);
INSERT INTO `sys_base_menus` VALUES (6, '2019-09-19 22:13:36', '2019-12-12 16:57:30', NULL, 0, 3, 'api', 'api', 0, 'view/superAdmin/api/api.vue', 'api管理', 's-platform', 'api管理', 3);
INSERT INTO `sys_base_menus` VALUES (17, '2019-10-09 15:12:29', '2019-12-12 16:57:25', NULL, 0, 3, 'user', 'user', 0, 'view/superAdmin/user/user.vue', '用户管理', 'coordinate', '用户管理', 4);
INSERT INTO `sys_base_menus` VALUES (18, '2019-10-15 22:27:22', '2019-12-12 16:51:33', NULL, 0, 0, 'person', 'person', 1, 'view/person/person.vue', '个人信息', 'user-solid', '个人信息', 4);
INSERT INTO `sys_base_menus` VALUES (19, '2019-10-20 11:14:42', '2020-03-29 21:39:18', NULL, 0, 0, 'example', 'example', 0, 'view/example/index.vue', '示例文件', 's-management', '示例文件', 6);
INSERT INTO `sys_base_menus` VALUES (20, '2019-10-20 11:18:11', '2019-10-20 11:18:11', NULL, 0, 19, 'table', 'table', 0, 'view/example/table/table.vue', '表格示例', 's-order', '表格示例', 1);
INSERT INTO `sys_base_menus` VALUES (21, '2019-10-20 11:19:52', '2019-12-12 16:58:15', NULL, 0, 19, 'form', 'form', 0, 'view/example/form/form.vue', '表单示例', 'document', '表单示例', 2);
INSERT INTO `sys_base_menus` VALUES (22, '2019-10-20 11:22:19', '2019-12-12 16:58:20', NULL, 0, 19, 'rte', 'rte', 0, 'view/example/rte/rte.vue', '富文本编辑器', 'reading', '富文本编辑器', 3);
INSERT INTO `sys_base_menus` VALUES (23, '2019-10-20 11:23:39', '2019-12-12 16:58:23', NULL, 0, 19, 'excel', 'excel', 0, 'view/example/excel/excel.vue', 'excel导入导出', 's-marketing', 'excel导入导出', 4);
INSERT INTO `sys_base_menus` VALUES (26, '2019-10-20 11:27:02', '2019-12-12 16:58:27', NULL, 0, 19, 'upload', 'upload', 0, 'view/example/upload/upload.vue', '上传下载', 'upload', '上传下载', 5);
INSERT INTO `sys_base_menus` VALUES (33, '2020-02-17 16:20:47', '2020-02-24 19:45:40', NULL, 0, 19, 'breakpoint', 'breakpoint', 0, 'view/example/breakpoint/breakpoint.vue', '断点续传', 'upload', '断点续传', 6);
INSERT INTO `sys_base_menus` VALUES (34, '2020-02-24 19:48:37', '2020-03-27 20:10:02', NULL, 0, 19, 'customer', 'customer', 0, 'view/example/customer/customer.vue', '客户列表(资源示例)', 's-custom', '客户列表(资源示例)', 7);
INSERT INTO `sys_base_menus` VALUES (38, '2020-03-29 21:31:03', '2020-03-29 21:31:03', NULL, 0, 0, 'systemTools', 'systemTools', 0, 'view/systemTools/index.vue', '系统工具', 's-cooperation', '系统工具', 5);
INSERT INTO `sys_base_menus` VALUES (40, '2020-03-29 21:35:10', '2020-03-29 21:35:10', NULL, 0, 38, 'autoCode', 'autoCode', 0, 'view/systemTools/autoCode/index.vue', '代码生成器', 'cpu', '代码生成器', 1);
INSERT INTO `sys_base_menus` VALUES (41, '2020-03-29 21:36:26', '2020-03-29 21:36:26', NULL, 0, 38, 'formCreate', 'formCreate', 0, 'view/systemTools/formCreate/index.vue', '表单生成器', 'magic-stick', '表单生成器', 2);
INSERT INTO `sys_base_menus` VALUES (42, '2020-04-02 14:19:36', '2020-04-02 14:20:16', NULL, 0, 38, 'system', 'system', 0, 'view/systemTools/system/system.vue', '系统配置', 's-operation', '系统配置', 3);
INSERT INTO `sys_base_menus` VALUES (1, '2019-09-19 22:05:18', '2020-04-24 10:16:42', NULL, 0, 0, 'dashboard', 'dashboard', 0, 'view/dashboard/index.vue', '仪表盘', 'setting', '仪表盘', 1, 0, 0);
INSERT INTO `sys_base_menus` VALUES (2, '2019-09-19 22:06:17', '2020-04-24 10:16:43', NULL, 0, 0, 'test', 'test', 0, 'view/test/index.vue', '测试菜单', 'info', '测试菜单', 2, 0, 0);
INSERT INTO `sys_base_menus` VALUES (3, '2019-09-19 22:06:38', '2020-04-24 10:16:43', NULL, 0, 0, 'admin', 'superAdmin', 0, 'view/superAdmin/index.vue', '超级管理员', 'user-solid', '超级管理员', 3, 0, 0);
INSERT INTO `sys_base_menus` VALUES (4, '2019-09-19 22:11:53', '2020-04-24 10:16:42', NULL, 0, 3, 'authority', 'authority', 0, 'view/superAdmin/authority/authority.vue', '角色管理', 's-custom', '角色管理', 1, 0, 0);
INSERT INTO `sys_base_menus` VALUES (5, '2019-09-19 22:13:18', '2020-04-24 10:16:43', NULL, 0, 3, 'menu', 'menu', 0, 'view/superAdmin/menu/menu.vue', '菜单管理', 's-order', '菜单管理', 2, 0, 0);
INSERT INTO `sys_base_menus` VALUES (6, '2019-09-19 22:13:36', '2020-04-24 10:16:43', NULL, 0, 3, 'api', 'api', 0, 'view/superAdmin/api/api.vue', 'api管理', 's-platform', 'api管理', 3, 1, 0);
INSERT INTO `sys_base_menus` VALUES (17, '2019-10-09 15:12:29', '2020-04-24 10:16:43', NULL, 0, 3, 'user', 'user', 0, 'view/superAdmin/user/user.vue', '用户管理', 'coordinate', '用户管理', 4, 0, 0);
INSERT INTO `sys_base_menus` VALUES (18, '2019-10-15 22:27:22', '2020-04-24 10:16:43', NULL, 0, 0, 'person', 'person', 1, 'view/person/person.vue', '个人信息', 'user-solid', '个人信息', 4, 0, 0);
INSERT INTO `sys_base_menus` VALUES (19, '2019-10-20 11:14:42', '2020-04-24 10:16:43', NULL, 0, 0, 'example', 'example', 0, 'view/example/index.vue', '示例文件', 's-management', '示例文件', 6, 0, 0);
INSERT INTO `sys_base_menus` VALUES (20, '2019-10-20 11:18:11', '2020-04-24 10:16:42', NULL, 0, 19, 'table', 'table', 0, 'view/example/table/table.vue', '表格示例', 's-order', '表格示例', 1, 0, 0);
INSERT INTO `sys_base_menus` VALUES (21, '2019-10-20 11:19:52', '2020-04-24 10:16:43', NULL, 0, 19, 'form', 'form', 0, 'view/example/form/form.vue', '表单示例', 'document', '表单示例', 2, 0, 0);
INSERT INTO `sys_base_menus` VALUES (22, '2019-10-20 11:22:19', '2020-04-24 10:16:43', NULL, 0, 19, 'rte', 'rte', 0, 'view/example/rte/rte.vue', '富文本编辑器', 'reading', '富文本编辑器', 3, 0, 0);
INSERT INTO `sys_base_menus` VALUES (23, '2019-10-20 11:23:39', '2020-04-24 10:16:43', NULL, 0, 19, 'excel', 'excel', 0, 'view/example/excel/excel.vue', 'excel导入导出', 's-marketing', 'excel导入导出', 4, 0, 0);
INSERT INTO `sys_base_menus` VALUES (26, '2019-10-20 11:27:02', '2020-04-24 10:16:43', NULL, 0, 19, 'upload', 'upload', 0, 'view/example/upload/upload.vue', '上传下载', 'upload', '上传下载', 5, 0, 0);
INSERT INTO `sys_base_menus` VALUES (33, '2020-02-17 16:20:47', '2020-04-24 10:16:43', NULL, 0, 19, 'breakpoint', 'breakpoint', 0, 'view/example/breakpoint/breakpoint.vue', '断点续传', 'upload', '断点续传', 6, 0, 0);
INSERT INTO `sys_base_menus` VALUES (34, '2020-02-24 19:48:37', '2020-04-24 10:16:43', NULL, 0, 19, 'customer', 'customer', 0, 'view/example/customer/customer.vue', '客户列表(资源示例)', 's-custom', '客户列表(资源示例)', 7, 0, 0);
INSERT INTO `sys_base_menus` VALUES (38, '2020-03-29 21:31:03', '2020-04-24 10:16:43', NULL, 0, 0, 'systemTools', 'systemTools', 0, 'view/systemTools/index.vue', '系统工具', 's-cooperation', '系统工具', 5, 0, 0);
INSERT INTO `sys_base_menus` VALUES (40, '2020-03-29 21:35:10', '2020-04-24 10:16:43', NULL, 0, 38, 'autoCode', 'autoCode', 0, 'view/systemTools/autoCode/index.vue', '代码生成器', 'cpu', '代码生成器', 1, 0, 0);
INSERT INTO `sys_base_menus` VALUES (41, '2020-03-29 21:36:26', '2020-04-24 10:16:43', NULL, 0, 38, 'formCreate', 'formCreate', 0, 'view/systemTools/formCreate/index.vue', '表单生成器', 'magic-stick', '表单生成器', 2, 0, 0);
INSERT INTO `sys_base_menus` VALUES (42, '2020-04-02 14:19:36', '2020-04-24 10:16:43', NULL, 0, 38, 'system', 'system', 0, 'view/systemTools/system/system.vue', '系统配置', 's-operation', '系统配置', 3, 0, 0);
-- ----------------------------
-- Table structure for sys_data_authority_id
@@ -4126,6 +4136,12 @@ CREATE TABLE `sys_data_authority_id` (
INSERT INTO `sys_data_authority_id` VALUES ('888', '888');
INSERT INTO `sys_data_authority_id` VALUES ('888', '8881');
INSERT INTO `sys_data_authority_id` VALUES ('888', '9528');
INSERT INTO `sys_data_authority_id` VALUES ('888222', '888');
INSERT INTO `sys_data_authority_id` VALUES ('888222', '8881');
INSERT INTO `sys_data_authority_id` VALUES ('888222', '9528');
INSERT INTO `sys_data_authority_id` VALUES ('8883', '888');
INSERT INTO `sys_data_authority_id` VALUES ('8883', '8881');
INSERT INTO `sys_data_authority_id` VALUES ('8883', '9528');
INSERT INTO `sys_data_authority_id` VALUES ('9528', '8881');
INSERT INTO `sys_data_authority_id` VALUES ('9528', '9528');
@@ -4207,6 +4223,6 @@ INSERT INTO `sys_workflows` VALUES (8, '2019-12-09 15:20:21', '2019-12-09 15:20:
-- View structure for authority_menu
-- ----------------------------
DROP VIEW IF EXISTS `authority_menu`;
CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `authority_menu` AS select `sys_base_menus`.`id` AS `id`,`sys_base_menus`.`created_at` AS `created_at`,`sys_base_menus`.`updated_at` AS `updated_at`,`sys_base_menus`.`deleted_at` AS `deleted_at`,`sys_base_menus`.`menu_level` AS `menu_level`,`sys_base_menus`.`parent_id` AS `parent_id`,`sys_base_menus`.`path` AS `path`,`sys_base_menus`.`name` AS `name`,`sys_base_menus`.`hidden` AS `hidden`,`sys_base_menus`.`component` AS `component`,`sys_base_menus`.`title` AS `title`,`sys_base_menus`.`icon` AS `icon`,`sys_base_menus`.`nick_name` AS `nick_name`,`sys_base_menus`.`sort` AS `sort`,`sys_authority_menus`.`sys_authority_authority_id` AS `authority_id`,`sys_authority_menus`.`sys_base_menu_id` AS `menu_id` from (`sys_authority_menus` join `sys_base_menus` on((`sys_authority_menus`.`sys_base_menu_id` = `sys_base_menus`.`id`)));
CREATE ALGORITHM = UNDEFINED DEFINER = `root`@`localhost` SQL SECURITY DEFINER VIEW `authority_menu` AS select `sys_base_menus`.`id` AS `id`,`sys_base_menus`.`created_at` AS `created_at`,`sys_base_menus`.`updated_at` AS `updated_at`,`sys_base_menus`.`deleted_at` AS `deleted_at`,`sys_base_menus`.`menu_level` AS `menu_level`,`sys_base_menus`.`parent_id` AS `parent_id`,`sys_base_menus`.`path` AS `path`,`sys_base_menus`.`name` AS `name`,`sys_base_menus`.`hidden` AS `hidden`,`sys_base_menus`.`component` AS `component`,`sys_base_menus`.`title` AS `title`,`sys_base_menus`.`icon` AS `icon`,`sys_base_menus`.`nick_name` AS `nick_name`,`sys_base_menus`.`sort` AS `sort`,`sys_authority_menus`.`sys_authority_authority_id` AS `authority_id`,`sys_authority_menus`.`sys_base_menu_id` AS `menu_id`,`sys_base_menus`.`keep_alive` AS `keep_alive`,`sys_base_menus`.`default_menu` AS `default_menu` from (`sys_authority_menus` join `sys_base_menus` on((`sys_authority_menus`.`sys_base_menu_id` = `sys_base_menus`.`id`)));
SET FOREIGN_KEY_CHECKS = 1;
+284
View File
@@ -0,0 +1,284 @@
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/base/login','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/base/register','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/api/createApi','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/api/getApiList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/api/getApiById','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/api/deleteApi','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/api/updateApi','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/api/getAllApis','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/authority/createAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/authority/deleteAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/authority/getAuthorityList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/authority/setDataAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/menu/getMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/menu/getMenuList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/menu/addBaseMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/menu/getBaseMenuTree','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/menu/addMenuAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/menu/getMenuAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/menu/deleteBaseMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/menu/updateBaseMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/menu/getBaseMenuById','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/user/changePassword','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/user/uploadHeaderImg','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/user/getInfoList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/user/getUserList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/user/setUserAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/fileUploadAndDownload/upload','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/fileUploadAndDownload/getFileList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/fileUploadAndDownload/deleteFile','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/casbin/updateCasbin','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/casbin/getPolicyPathByAuthorityId','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/jwt/jsonInBlacklist','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/system/getSystemConfig','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/system/setSystemConfig','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/customer/customer','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/customer/customer','PUT','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/customer/customer','DELETE','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/customer/customer','GET','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/customer/customerList','GET','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/base/login','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/base/register','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/api/createApi','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/api/getApiList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/api/getApiById','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/api/deleteApi','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/api/updateApi','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/api/getAllApis','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/authority/createAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/authority/deleteAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/authority/getAuthorityList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/authority/setDataAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/menu/getMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/menu/getMenuList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/menu/addBaseMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/menu/getBaseMenuTree','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/menu/addMenuAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/menu/getMenuAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/menu/deleteBaseMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/menu/updateBaseMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/menu/getBaseMenuById','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/user/changePassword','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/user/uploadHeaderImg','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/user/getInfoList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/user/getUserList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/user/setUserAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/fileUploadAndDownload/upload','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/fileUploadAndDownload/getFileList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/fileUploadAndDownload/deleteFile','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/casbin/updateCasbin','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/casbin/getPolicyPathByAuthorityId','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/jwt/jsonInBlacklist','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/system/getSystemConfig','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/system/setSystemConfig','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/customer/customer','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/customer/customer','PUT','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/customer/customer','DELETE','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/customer/customer','GET','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/customer/customerList','GET','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/autoCode/createTemp','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/base/login','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/base/register','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/api/createApi','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/api/getApiList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/api/getApiById','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/api/deleteApi','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/api/updateApi','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/api/getAllApis','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/authority/createAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/authority/deleteAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/authority/getAuthorityList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/authority/setDataAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/menu/getMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/menu/getMenuList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/menu/addBaseMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/menu/getBaseMenuTree','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/menu/addMenuAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/menu/getMenuAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/menu/deleteBaseMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/menu/updateBaseMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/menu/getBaseMenuById','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/user/changePassword','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/user/uploadHeaderImg','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/user/getInfoList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/user/getUserList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/user/setUserAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/fileUploadAndDownload/upload','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/fileUploadAndDownload/getFileList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/fileUploadAndDownload/deleteFile','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/casbin/updateCasbin','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/casbin/getPolicyPathByAuthorityId','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/casbin/casbinTest/:pathParam','GET','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/jwt/jsonInBlacklist','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/system/getSystemConfig','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/system/setSystemConfig','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/customer/customer','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/customer/customer','PUT','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/customer/customer','DELETE','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/customer/customer','GET','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/customer/customerList','GET','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/autoCode/createTemp','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/base/login','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/base/register','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/api/createApi','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/api/getApiList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/api/getApiById','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/api/deleteApi','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/api/updateApi','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/api/getAllApis','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/api/createApi','GET','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/authority/createAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/authority/deleteAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/authority/getAuthorityList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/authority/setDataAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/menu/getMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/menu/getMenuList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/menu/addBaseMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/menu/getBaseMenuTree','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/menu/addMenuAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/menu/getMenuAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/menu/deleteBaseMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/menu/updateBaseMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/menu/getBaseMenuById','POST','','','');
+650
View File
@@ -0,0 +1,650 @@
INSERT INTO ch_cities (id,province,city,code) VALUES (
1,'北京市','北京市',110100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
2,'天津市','天津市',120100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
3,'河北省','石家庄市',130100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
4,'河北省','唐山市',130200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
5,'河北省','秦皇岛市',130300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
6,'河北省','邯郸市',130400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
7,'河北省','邢台市',130500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
8,'河北省','保定市',130600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
9,'河北省','张家口市',130700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
10,'河北省','承德市',130800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
11,'河北省','沧州市',130900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
12,'河北省','廊坊市',131000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
13,'河北省','衡水市',131100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
14,'山西省','太原市',140100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
15,'山西省','大同市',140200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
16,'山西省','阳泉市',140300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
17,'山西省','长治市',140400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
18,'山西省','晋城市',140500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
19,'山西省','朔州市',140600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
20,'山西省','晋中市',140700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
21,'山西省','运城市',140800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
22,'山西省','忻州市',140900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
23,'山西省','临汾市',141000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
24,'山西省','吕梁市',141100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
25,'内蒙古自治区','呼和浩特市',150100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
26,'内蒙古自治区','包头市',150200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
27,'内蒙古自治区','乌海市',150300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
28,'内蒙古自治区','赤峰市',150400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
29,'内蒙古自治区','通辽市',150500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
30,'内蒙古自治区','鄂尔多斯市',150600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
31,'内蒙古自治区','呼伦贝尔市',150700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
32,'内蒙古自治区','巴彦淖尔市',150800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
33,'内蒙古自治区','乌兰察布市',150900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
34,'内蒙古自治区','兴安盟',152200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
35,'内蒙古自治区','锡林郭勒盟',152500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
36,'内蒙古自治区','二连浩特市',152501);
INSERT INTO ch_cities (id,province,city,code) VALUES (
37,'内蒙古自治区','锡林浩特市',152502);
INSERT INTO ch_cities (id,province,city,code) VALUES (
38,'内蒙古自治区','阿拉善盟',152900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
39,'辽宁省','沈阳市',210100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
40,'辽宁省','大连市',210200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
41,'辽宁省','鞍山市',210300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
42,'辽宁省','抚顺市',210400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
43,'辽宁省','本溪市',210500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
44,'辽宁省','丹东市',210600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
45,'辽宁省','锦州市',210700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
46,'辽宁省','营口市',210800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
47,'辽宁省','阜新市',210900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
48,'辽宁省','辽阳市',211000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
49,'辽宁省','盘锦市',211100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
50,'辽宁省','铁岭市',211200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
51,'辽宁省','朝阳市',211300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
52,'辽宁省','葫芦岛市',211400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
53,'吉林省','长春市',220100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
54,'吉林省','吉林市',220200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
55,'吉林省','四平市',220300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
56,'吉林省','辽源市',220400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
57,'吉林省','通化市',220500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
58,'吉林省','白山市',220600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
59,'吉林省','松原市',220700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
60,'吉林省','白城市',220800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
61,'吉林省','延边朝鲜族自治州',222400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
62,'黑龙江省','哈尔滨市',230100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
63,'黑龙江省','齐齐哈尔市',230200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
64,'黑龙江省','鸡西市',230300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
65,'黑龙江省','鹤岗市',230400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
66,'黑龙江省','双鸭山市',230500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
67,'黑龙江省','大庆市',230600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
68,'黑龙江省','伊春市',230700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
69,'黑龙江省','佳木斯市',230800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
70,'黑龙江省','七台河市',230900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
71,'黑龙江省','牡丹江市',231000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
72,'黑龙江省','黑河市',231100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
73,'黑龙江省','绥化市',231200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
74,'黑龙江省','大兴安岭地区',232700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
75,'上海市','上海市',310100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
76,'江苏省','南京市',320100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
77,'江苏省','无锡市',320200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
78,'江苏省','徐州市',320300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
79,'江苏省','常州市',320400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
80,'江苏省','苏州市',320500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
81,'江苏省','昆山市',320583);
INSERT INTO ch_cities (id,province,city,code) VALUES (
82,'江苏省','南通市',320600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
83,'江苏省','连云港市',320700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
84,'江苏省','淮安市',320800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
85,'江苏省','盐城市',320900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
86,'江苏省','扬州市',321000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
87,'江苏省','镇江市',321100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
88,'江苏省','泰州市',321200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
89,'江苏省','宿迁市',321300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
90,'浙江省','杭州市',330100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
91,'浙江省','宁波市',330200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
92,'浙江省','温州市',330300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
93,'浙江省','嘉兴市',330400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
94,'浙江省','湖州市',330500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
95,'浙江省','绍兴市',330600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
96,'浙江省','金华市',330700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
97,'浙江省','衢州市',330800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
98,'浙江省','舟山市',330900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
99,'浙江省','台州市',331000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
100,'浙江省','丽水市',331100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
101,'安徽省','合肥市',340100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
102,'安徽省','芜湖市',340200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
103,'安徽省','蚌埠市',340300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
104,'安徽省','淮南市',340400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
105,'安徽省','马鞍山市',340500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
106,'安徽省','淮北市',340600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
107,'安徽省','铜陵市',340700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
108,'安徽省','安庆市',340800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
109,'安徽省','黄山市',341000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
110,'安徽省','滁州市',341100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
111,'安徽省','阜阳市',341200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
112,'安徽省','宿州市',341300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
113,'安徽省','六安市',341500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
114,'安徽省','亳州市',341600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
115,'安徽省','池州市',341700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
116,'安徽省','宣城市',341800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
117,'福建省','福州市',350100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
118,'福建省','厦门市',350200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
119,'福建省','莆田市',350300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
120,'福建省','三明市',350400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
121,'福建省','泉州市',350500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
122,'福建省','漳州市',350600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
123,'福建省','南平市',350700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
124,'福建省','龙岩市',350800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
125,'福建省','宁德市',350900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
126,'江西省','南昌市',360100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
127,'江西省','景德镇市',360200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
128,'江西省','萍乡市',360300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
129,'江西省','九江市',360400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
130,'江西省','新余市',360500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
131,'江西省','鹰潭市',360600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
132,'江西省','赣州市',360700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
133,'江西省','吉安市',360800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
134,'江西省','宜春市',360900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
135,'江西省','抚州市',361000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
136,'江西省','上饶市',361100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
137,'山东省','济南市',370100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
138,'山东省','青岛市',370200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
139,'山东省','淄博市',370300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
140,'山东省','枣庄市',370400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
141,'山东省','滕州市',370481);
INSERT INTO ch_cities (id,province,city,code) VALUES (
142,'山东省','东营市',370500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
143,'山东省','烟台市',370600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
144,'山东省','潍坊市',370700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
145,'山东省','济宁市',370800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
146,'山东省','泰安市',370900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
147,'山东省','威海市',371000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
148,'山东省','日照市',371100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
149,'山东省','莱芜市',371200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
150,'山东省','临沂市',371300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
151,'山东省','德州市',371400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
152,'山东省','聊城市',371500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
153,'山东省','滨州市',371600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
154,'山东省','菏泽市',371700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
155,'河南省','郑州市',410100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
156,'河南省','开封市',410200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
157,'河南省','洛阳市',410300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
158,'河南省','平顶山市',410400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
159,'河南省','安阳市',410500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
160,'河南省','鹤壁市',410600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
161,'河南省','新乡市',410700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
162,'河南省','焦作市',410800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
163,'河南省','濮阳市',410900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
164,'河南省','许昌市',411000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
165,'河南省','漯河市',411100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
166,'河南省','三门峡市',411200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
167,'河南省','南阳市',411300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
168,'河南省','商丘市',411400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
169,'河南省','信阳市',411500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
170,'河南省','周口市',411600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
171,'河南省','驻马店市',411700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
172,'河南省','济源市',419001);
INSERT INTO ch_cities (id,province,city,code) VALUES (
173,'湖北省','武汉市',420100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
174,'湖北省','黄石市',420200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
175,'湖北省','十堰市',420300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
176,'湖北省','宜昌市',420500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
177,'湖北省','襄阳市',420600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
178,'湖北省','鄂州市',420700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
179,'湖北省','荆门市',420800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
180,'湖北省','孝感市',420900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
181,'湖北省','荆州市',421000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
182,'湖北省','黄冈市',421100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
183,'湖北省','咸宁市',421200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
184,'湖北省','随州市',421300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
185,'湖北省','恩施土家族苗族自治州',422800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
186,'湖北省','潜江市',429005);
INSERT INTO ch_cities (id,province,city,code) VALUES (
187,'湖南省','长沙市',430100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
188,'湖南省','株洲市',430200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
189,'湖南省','湘潭市',430300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
190,'湖南省','衡阳市',430400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
191,'湖南省','邵阳市',430500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
192,'湖南省','岳阳市',430600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
193,'湖南省','常德市',430700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
194,'湖南省','张家界市',430800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
195,'湖南省','益阳市',430900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
196,'湖南省','郴州市',431000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
197,'湖南省','永州市',431100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
198,'湖南省','怀化市',431200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
199,'湖南省','娄底市',431300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
200,'湖南省','湘西土家族苗族自治州',433100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
201,'广东省','广州市',440100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
202,'广东省','韶关市',440200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
203,'广东省','深圳市',440300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
204,'广东省','珠海市',440400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
205,'广东省','汕头市',440500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
206,'广东省','佛山市',440600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
207,'广东省','江门市',440700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
208,'广东省','湛江市',440800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
209,'广东省','茂名市',440900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
210,'广东省','肇庆市',441200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
211,'广东省','惠州市',441300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
212,'广东省','梅州市',441400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
213,'广东省','汕尾市',441500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
214,'广东省','河源市',441600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
215,'广东省','阳江市',441700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
216,'广东省','清远市',441800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
217,'广东省','东莞市',441900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
218,'广东省','中山市',442000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
219,'广东省','潮州市',445100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
220,'广东省','揭阳市',445200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
221,'广东省','云浮市',445300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
222,'广西壮族自治区','南宁市',450100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
223,'广西壮族自治区','柳州市',450200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
224,'广西壮族自治区','桂林市',450300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
225,'广西壮族自治区','梧州市',450400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
226,'广西壮族自治区','北海市',450500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
227,'广西壮族自治区','防城港市',450600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
228,'广西壮族自治区','钦州市',450700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
229,'广西壮族自治区','贵港市',450800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
230,'广西壮族自治区','玉林市',450900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
231,'广西壮族自治区','百色市',451000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
232,'广西壮族自治区','贺州市',451100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
233,'广西壮族自治区','河池市',451200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
234,'广西壮族自治区','来宾市',451300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
235,'广西壮族自治区','崇左市',451400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
236,'海南省','海口市',460100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
237,'海南省','三亚市',460200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
238,'海南省','儋州市',460400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
239,'重庆市','重庆市',500100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
240,'四川省','成都市',510100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
241,'四川省','自贡市',510300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
242,'四川省','攀枝花市',510400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
243,'四川省','泸州市',510500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
244,'四川省','德阳市',510600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
245,'四川省','绵阳市',510700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
246,'四川省','广元市',510800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
247,'四川省','遂宁市',510900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
248,'四川省','内江市',511000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
249,'四川省','乐山市',511100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
250,'四川省','南充市',511300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
251,'四川省','眉山市',511400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
252,'四川省','宜宾市',511500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
253,'四川省','广安市',511600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
254,'四川省','达州市',511700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
255,'四川省','雅安市',511800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
256,'四川省','巴中市',511900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
257,'四川省','资阳市',512000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
258,'四川省','阿坝藏族羌族自治州',513200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
259,'四川省','甘孜藏族自治州',513300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
260,'四川省','凉山彝族自治州',513400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
261,'贵州省','贵阳市',520100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
262,'贵州省','六盘水市',520200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
263,'贵州省','遵义市',520300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
264,'贵州省','安顺市',520400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
265,'贵州省','毕节市',520500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
266,'贵州省','铜仁市',520600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
267,'贵州省','黔西南布依族苗族自治州',522300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
268,'贵州省','黔东南苗族侗族自治州',522600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
269,'贵州省','黔南布依族苗族自治州',522700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
270,'云南省','昆明市',530100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
271,'云南省','曲靖市',530300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
272,'云南省','玉溪市',530400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
273,'云南省','保山市',530500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
274,'云南省','昭通市',530600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
275,'云南省','丽江市',530700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
276,'云南省','普洱市',530800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
277,'云南省','临沧市',530900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
278,'云南省','楚雄彝族自治州',532300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
279,'云南省','红河哈尼族彝族自治州',532500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
280,'云南省','文山壮族苗族自治州',532600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
281,'云南省','西双版纳傣族自治州',532800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
282,'云南省','大理白族自治州',532900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
283,'云南省','德宏傣族景颇族自治州',533100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
284,'云南省','怒江傈僳族自治州',533300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
285,'云南省','迪庆藏族自治州',533400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
286,'西藏自治区','拉萨市',540100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
287,'西藏自治区','日喀则市',540200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
288,'陕西省','西安市',610100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
289,'陕西省','铜川市',610200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
290,'陕西省','宝鸡市',610300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
291,'陕西省','咸阳市',610400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
292,'陕西省','渭南市',610500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
293,'陕西省','延安市',610600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
294,'陕西省','汉中市',610700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
295,'陕西省','榆林市',610800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
296,'陕西省','安康市',610900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
297,'陕西省','商洛市',611000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
298,'甘肃省','兰州市',620100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
299,'甘肃省','嘉峪关市',620200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
300,'甘肃省','金昌市',620300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
301,'甘肃省','白银市',620400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
302,'甘肃省','天水市',620500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
303,'甘肃省','武威市',620600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
304,'甘肃省','张掖市',620700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
305,'甘肃省','平凉市',620800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
306,'甘肃省','酒泉市',620900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
307,'甘肃省','庆阳市',621000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
308,'甘肃省','定西市',621100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
309,'甘肃省','陇南市',621200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
310,'甘肃省','临夏回族自治州',622900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
311,'甘肃省','甘南藏族自治州',623000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
312,'青海省','西宁市',630100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
313,'青海省','海东市',630200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
314,'青海省','海西蒙古族藏族自治州',632800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
315,'宁夏回族自治区','银川市',640100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
316,'宁夏回族自治区','石嘴山市',640200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
317,'宁夏回族自治区','吴忠市',640300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
318,'新疆维吾尔自治区','乌鲁木齐市',650100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
319,'新疆维吾尔自治区','克拉玛依市',650200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
320,'新疆维吾尔自治区','哈密市',650500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
321,'新疆维吾尔自治区','昌吉回族自治州',652300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
322,'新疆维吾尔自治区','巴音郭楞蒙古自治州',652800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
323,'新疆维吾尔自治区','阿克苏地区',652900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
324,'新疆维吾尔自治区','喀什地区',653100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
325,'新疆维吾尔自治区','伊犁哈萨克自治州',654000);
+62
View File
@@ -0,0 +1,62 @@
INSERT INTO ch_provinces (id,province) VALUES (
1,'北京市');
INSERT INTO ch_provinces (id,province) VALUES (
2,'天津市');
INSERT INTO ch_provinces (id,province) VALUES (
3,'河北省');
INSERT INTO ch_provinces (id,province) VALUES (
4,'山西省');
INSERT INTO ch_provinces (id,province) VALUES (
5,'内蒙古自治区');
INSERT INTO ch_provinces (id,province) VALUES (
6,'辽宁省');
INSERT INTO ch_provinces (id,province) VALUES (
7,'吉林省');
INSERT INTO ch_provinces (id,province) VALUES (
8,'黑龙江省');
INSERT INTO ch_provinces (id,province) VALUES (
9,'上海市');
INSERT INTO ch_provinces (id,province) VALUES (
10,'江苏省');
INSERT INTO ch_provinces (id,province) VALUES (
11,'浙江省');
INSERT INTO ch_provinces (id,province) VALUES (
12,'安徽省');
INSERT INTO ch_provinces (id,province) VALUES (
13,'福建省');
INSERT INTO ch_provinces (id,province) VALUES (
14,'江西省');
INSERT INTO ch_provinces (id,province) VALUES (
15,'山东省');
INSERT INTO ch_provinces (id,province) VALUES (
16,'河南省');
INSERT INTO ch_provinces (id,province) VALUES (
17,'湖北省');
INSERT INTO ch_provinces (id,province) VALUES (
18,'湖南省');
INSERT INTO ch_provinces (id,province) VALUES (
19,'广东省');
INSERT INTO ch_provinces (id,province) VALUES (
20,'广西壮族自治区');
INSERT INTO ch_provinces (id,province) VALUES (
21,'海南省');
INSERT INTO ch_provinces (id,province) VALUES (
22,'重庆市');
INSERT INTO ch_provinces (id,province) VALUES (
23,'四川省');
INSERT INTO ch_provinces (id,province) VALUES (
24,'贵州省');
INSERT INTO ch_provinces (id,province) VALUES (
25,'云南省');
INSERT INTO ch_provinces (id,province) VALUES (
26,'西藏自治区');
INSERT INTO ch_provinces (id,province) VALUES (
27,'陕西省');
INSERT INTO ch_provinces (id,province) VALUES (
28,'甘肃省');
INSERT INTO ch_provinces (id,province) VALUES (
29,'青海省');
INSERT INTO ch_provinces (id,province) VALUES (
30,'宁夏回族自治区');
INSERT INTO ch_provinces (id,province) VALUES (
31,'新疆维吾尔自治区');
File diff suppressed because it is too large Load Diff
+8
View File
@@ -0,0 +1,8 @@
INSERT INTO exa_customers (id,created_at,updated_at,deleted_at,customer_name,customer_phone_data,sys_user_id,sys_user_authority_id) VALUES (
1,1582624908000,1586492969000,NULL,'测试客户','1761111111',10,'888');
INSERT INTO exa_customers (id,created_at,updated_at,deleted_at,customer_name,customer_phone_data,sys_user_id,sys_user_authority_id) VALUES (
2,1586492753000,1586492753000,1586497436000,'test','123123123',10,'888');
INSERT INTO exa_customers (id,created_at,updated_at,deleted_at,customer_name,customer_phone_data,sys_user_id,sys_user_authority_id) VALUES (
3,1586497452000,1586497452000,1586497453000,'123123','123123',10,'888');
INSERT INTO exa_customers (id,created_at,updated_at,deleted_at,customer_name,customer_phone_data,sys_user_id,sys_user_authority_id) VALUES (
4,1586497630000,1586497630000,1586497632000,'22222222','222222222222222',10,'888');
@@ -0,0 +1,10 @@
INSERT INTO exa_file_upload_and_downloads (id,created_at,updated_at,deleted_at,name,url,tag,"key") VALUES (
7,1572101192000,1572101192000,NULL,'logo.png','http://qmplusimg.henrongyi.top/1572101191logo.png','png','1572101191logo.png');
INSERT INTO exa_file_upload_and_downloads (id,created_at,updated_at,deleted_at,name,url,tag,"key") VALUES (
10,1572102644000,1572102644000,NULL,'logo.png','http://qmplusimg.henrongyi.top/1572102643logo.png','png','1572102643logo.png');
INSERT INTO exa_file_upload_and_downloads (id,created_at,updated_at,deleted_at,name,url,tag,"key") VALUES (
12,1572102848000,1572102848000,NULL,'logo.png','http://qmplusimg.henrongyi.top/1572102846logo.png','png','1572102846logo.png');
INSERT INTO exa_file_upload_and_downloads (id,created_at,updated_at,deleted_at,name,url,tag,"key") VALUES (
13,1572103097000,1572103097000,NULL,'logo.png','http://qmplusimg.henrongyi.top/1572103096logo.png','png','1572103096logo.png');
INSERT INTO exa_file_upload_and_downloads (id,created_at,updated_at,deleted_at,name,url,tag,"key") VALUES (
15,1576391460000,1576391460000,NULL,'logo.png','http://qmplusimg.henrongyi.top/1576391451logo.png','png','1576391451logo.png');
View File
+72
View File
@@ -0,0 +1,72 @@
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
3,1577528945000,1577528945000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MTMzNzM2LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc1Mjc5MzZ9.T7ikGw-lgAAQlfMne7zPIF-PlfQMg37uBCYJ24Y_B38');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
4,1577529062000,1577529062000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MTMzODUzLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc1MjgwNTN9.tDzUm4KNFeJCErNfZGfuF2tcuolga2f_2dE0nTl_UZU');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
5,1577529085000,1577529085000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MTMzODcwLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc1MjgwNzB9.mspXy9sqQO_5PusPReLalodo_ybWRKxb3Ownf2r2HxE');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
6,1577686810000,1577686810000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkxNTc2LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODU3NzZ9.AR2KYShboFKsHTjwohxEkA3lytttfZqRH849sl2fNdw');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
7,1577686874000,1577686874000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkxNjE2LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODU4MTZ9.h8zbDVHM_QbBI-ejGXeQpw0S9oYHJyP4U-TwsVFus9Q');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
8,1577686917000,1577686917000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkxNjgxLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODU4ODF9.CSjolDGVpU0g7YG6TaPAlWAMdhtvnBhAi-XYYWZ6RLo');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
9,1577687101000,1577687101000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkxODIyLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODYwMjJ9.Y_s22Vh5J2ah6Kh1nZQQ8XIQspbT4I7tzc_YJqWrRWM');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
10,1577687366000,1577687366000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkyMTU0LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODYzNTR9.4HJdx-sfYE5TUUefdwi3yZ6dY_jG7WwEC_55WuGawY8');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
11,1577688223000,1577688223000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkyMTcwLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODYzNzB9.YEhupQVwjMVBB2eAcAoGG-vJczoxuUyn6KR-tDWU86I');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
12,1577688913000,1577688913000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkzMDI3LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODcyMjd9.r_sE_Z31cFdS2nCf3iyQjuiZe0Z3HPR07wKBGlUHsnk');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
13,1577689111000,1577689111000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkzNzY2LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODc5NjZ9.dYFlmyIKQZjzTCKu56wCmxXiW6zOayN_YgygCcvCyLk');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
14,1577689118000,1577689118000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkzOTEwLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODgxMTB9.pPmzsHU4UceZuPFT_G-SDdxe6FD3MuL47HkovpI-_0c');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
15,1577689138000,1577689138000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkzOTE4LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODgxMTh9.irf98R0belbXtb8x9SxsvuhiYsbHMPbHbFDxaaH0z6Q');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
16,1578299551000,1578299551000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTAzMjk5LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTc0OTl9.jgLfjvek7sQyuZ2TABQvLOyu_ifNw_KYzfY3VTLL4fw');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
17,1578299588000,1578299588000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA0MzU4LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTg1NTh9.89r6xHZUBDjfmNpmF02RjQXYTBGUiJvOEDP8pydNt-A');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
18,1578299598000,1578299598000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA0MzkyLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTg1OTJ9.6Yv9ZYhN-TH9H4SoZEAkjevKVX0vLHL1lVQGFpfBr2U');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
19,1578299766000,1578299766000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA0NDA5LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTg2MDl9._9zRRK76XH_KgrW1X9P5GTLW9dwfIixB4QUsC7M3RHA');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
20,1578300246000,1578300246000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA0NTcxLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTg3NzF9.5ki0TZooCorK81xWpYa-OO3RR-Bpp5am_uNCNPh4250');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
21,1578300350000,1578300350000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1MDUwLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTkyNTB9.A0n5faE0X0TyRb_1RvAQBLooY-peapPTD0LnJD03Ul0');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
22,1578300384000,1578300384000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1MTU0LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTkzNTR9.VtqTOJ-MQY2K3w4tM7HgT0z73CEOd3CDqmYqKCjXxnc');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
23,1578300440000,1578300440000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1MTg3LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTkzODd9.fwL1QakF30SHSaGDkPo3weIg0l7kiAGwNq_fKsFxquc');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
24,1578300477000,1578300477000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1MjQ0LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk0NDR9.VoKdA0-brmUlQ5bYufIdMWrS-cCQ2ARm7_jeVtfvCpc');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
25,1578300548000,1578300548000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1Mjg1LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk0ODV9.a8-zmyIlJJGdonhXAzNvNH9C-nMa-Voq4bhTbiVKJzE');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
26,1578300572000,1578300572000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1MzUyLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk1NTJ9.l4e3rjtrDgRsqnQwizJ-ZXVUVM8ywSJcNJkkEVYbdzU');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
27,1578300598000,1578300598000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1Mzc3LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk1Nzd9.mXUPYvmXbntrdywpBNM0j9sP991cwfhc9b0KvUM4dG4');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
28,1578300656000,1578300656000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1NDExLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk2MTF9.Z21e8nWHKV5XvYg61CZCz3nMK25m_FmlxncxGMpMS0k');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
29,1578300723000,1578300723000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1NDY0LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk2NjR9.qzptIyCcL_SPm6TGwXML8Rih3qYqj9GLUpWzTpSPPuI');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
30,1578300756000,1578300756000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1NTI3LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk3Mjd9.D9e8qbx44CLX0ZInwNlIqTGS_sSE069TRIDkQAk7tVY');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
31,1578300875000,1578300875000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1NTY1LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk3NjV9.D4EZmVAJ96kxcyIfWkT_LA81t1JCuQZcYmQkkoNhtPo');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
32,1578300940000,1578300940000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1NjgzLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk4ODN9.SJL2fFMbe5VL2YWBzMlrhxbBIJhIHTUeodkEpgH1Xgo');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
33,1578301048000,1578301048000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1NzU4LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk5NTh9.6y12UkOeW7vz7gGTcYaN3Y-2Ut2QmjgU9WEuy_pneGM');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
34,1578301142000,1578301142000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1ODU1LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgzMDAwNTV9.G0q9X7Ld3cN_BO-K219b7tFAHgtpiAwqLPoxVNKsEl8');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
35,1578301166000,1578301166000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1OTQ2LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgzMDAxNDZ9.cmBgWiztsnh7zF3OUNIDQKv8wzGJF7fllUv-4LlYxu8');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
36,1584773174000,1584773174000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg1Mzc3ODY3LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODQ3NzIwNjd9.DLhWhD1FdcWLyFLcXQynKJnenbVHrSiKhlDGFRzgo5k');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
37,1585635875000,1585635875000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg2MTM4MTA4LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODU1MzIzMDh9.Ro2F2dZLfOk2Z_OPRbweOuCpchr6HlHfQIF5qjfc8y4');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
38,1585728477000,1585728477000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg2MjQwNzQyLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODU2MzQ5NDJ9.9qaOFu7D5cq4vxTfLi4pyO_JGcKjVAEJIcoStJWJlYg');
+82
View File
@@ -0,0 +1,82 @@
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
1,1569641029000,1569661576000,NULL,NULL,'/base/login','用户登录','base','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
2,1569641566000,1569661571000,NULL,NULL,'/base/register','用户注册','base','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
3,1569641621000,1576054301000,NULL,NULL,'/api/createApi','创建api','api','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
4,1569650944000,1569661559000,NULL,NULL,'/api/getApiList','获取api列表','api','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
5,1569651350000,1569661553000,NULL,NULL,'/api/getApiById','获取api详细信息','api','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
7,1569651566000,1569661544000,NULL,NULL,'/api/deleteApi','删除Api','api','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
8,1569651588000,1569661539000,NULL,NULL,'/api/updateApi','更新Api','api','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
10,1569827138000,1569827138000,NULL,NULL,'/api/getAllApis','获取所有api','api','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
11,1569828189000,1569828189000,NULL,NULL,'/authority/createAuthority','创建角色','authority','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
12,1569828213000,1569828213000,NULL,NULL,'/authority/deleteAuthority','删除角色','authority','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
13,1569828237000,1569828237000,NULL,NULL,'/authority/getAuthorityList','获取角色列表','authority','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
14,1569828260000,1569828260000,NULL,NULL,'/menu/getMenu','获取菜单树','menu','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
15,1569828290000,1569828290000,NULL,NULL,'/menu/getMenuList','分页获取基础menu列表','menu','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
16,1569828307000,1569828307000,NULL,NULL,'/menu/addBaseMenu','新增菜单','menu','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
17,1569828325000,1569828325000,NULL,NULL,'/menu/getBaseMenuTree','获取用户动态路由','menu','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
18,1569828353000,1569828353000,NULL,NULL,'/menu/addMenuAuthority','增加menu和角色关联关系','menu','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
19,1569828380000,1569828380000,NULL,NULL,'/menu/getMenuAuthority','获取指定角色menu','menu','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
20,1569828403000,1569828403000,NULL,NULL,'/menu/deleteBaseMenu','删除菜单','menu','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
21,1569828485000,1569828485000,NULL,NULL,'/menu/updateBaseMenu','更新菜单','menu','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
22,1569828501000,1569828501000,NULL,NULL,'/menu/getBaseMenuById','根据id获取菜单','menu','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
23,1569828559000,1569828559000,NULL,NULL,'/user/changePassword','修改密码','user','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
24,1569828573000,1569828573000,NULL,NULL,'/user/uploadHeaderImg','上传头像','user','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
25,1569828600000,1569828600000,NULL,NULL,'/user/getInfoList','分页获取用户列表','user','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
28,1570605317000,1570605427000,NULL,NULL,'/user/getUserList','获取用户列表','user','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
29,1570633300000,1570633300000,NULL,NULL,'/user/setUserAuthority','修改用户角色','user','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
30,1572092078000,1572092078000,NULL,NULL,'/fileUploadAndDownload/upload','文件上传示例','fileUploadAndDownload','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
31,1572092099000,1572092099000,NULL,NULL,'/fileUploadAndDownload/getFileList','获取上传文件列表','fileUploadAndDownload','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
32,1576128527000,1576128527000,NULL,NULL,'/casbin/updateCasbin','更改角色api权限','casbin','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
33,1576128539000,1576128539000,NULL,NULL,'/casbin/getPolicyPathByAuthorityId','获取权限列表','casbin','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
34,1576141335000,1576141335000,NULL,NULL,'/fileUploadAndDownload/deleteFile','删除文件','fileUploadAndDownload','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
35,1577528287000,1577528287000,NULL,NULL,'/jwt/jsonInBlacklist','jwt加入黑名单','jwt','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
36,1578304596000,1578304596000,NULL,NULL,'/authority/setDataAuthority','设置角色资源权限','authority','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
37,1578895445000,1578895445000,NULL,NULL,'/system/getSystemConfig','获取配置文件内容','system','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
38,1578898926000,1578898926000,NULL,NULL,'/system/setSystemConfig','设置配置文件内容','system','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
39,1582615959000,1582615959000,NULL,NULL,'/customer/customer','创建客户','customer','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
40,1582615971000,1582616096000,NULL,NULL,'/customer/customer','更新客户','customer','PUT');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
41,1582616037000,1582616037000,NULL,NULL,'/customer/customer','删除客户','customer','DELETE');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
42,1582616208000,1582616236000,NULL,NULL,'/customer/customer','获取单一客户','customer','GET');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
43,1582616226000,1582616226000,NULL,NULL,'/customer/customerList','获取客户列表','customer','GET');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
44,1583995014000,1583996210000,NULL,NULL,'/casbin/casbinTest/:pathParam','RESTFUL模式测试','casbin','GET');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
45,1585494088000,1585494088000,NULL,NULL,'/autoCode/createTemp','自动化代码','autoCode','POST');
+6
View File
@@ -0,0 +1,6 @@
INSERT INTO sys_authorities (authority_id,authority_name,parent_id,created_at,updated_at,deleted_at) VALUES (
'888','普通用户','0',1585971896000,NULL,NULL);
INSERT INTO sys_authorities (authority_id,authority_name,parent_id,created_at,updated_at,deleted_at) VALUES (
'8881','普通用户子角色','888',1585971896000,NULL,NULL);
INSERT INTO sys_authorities (authority_id,authority_name,parent_id,created_at,updated_at,deleted_at) VALUES (
'9528','测试角色','0',1585971896000,NULL,NULL);
+94
View File
@@ -0,0 +1,94 @@
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',1);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',2);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',3);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',4);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',5);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',6);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',17);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',18);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',19);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',20);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',21);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',22);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',23);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',26);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',33);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',34);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',38);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',40);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',41);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',42);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'8881',1);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'8881',2);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'8881',18);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'8881',38);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'8881',40);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'8881',41);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'8881',42);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',1);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',2);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',3);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',4);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',5);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',6);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',17);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',18);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',19);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',20);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',21);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',22);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',23);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',26);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',33);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',34);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',38);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',40);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',41);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',42);
+40
View File
@@ -0,0 +1,40 @@
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
1,1568901918000,1586267284000,NULL,0,0,'dashboard','dashboard',0,'view/dashboard/index.vue','仪表盘','setting','仪表盘',1);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
2,1568901977000,1585312438000,NULL,0,0,'test','test',0,'view/test/index.vue','测试菜单','info','测试菜单',2);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
3,1568901998000,1576140691000,NULL,0,0,'admin','superAdmin',0,'view/superAdmin/index.vue','超级管理员','user-solid','超级管理员',3);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
4,1568902313000,1568902313000,NULL,0,3,'authority','authority',0,'view/superAdmin/authority/authority.vue','角色管理','s-custom','角色管理',1);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
5,1568902398000,1576141040000,NULL,0,3,'menu','menu',0,'view/superAdmin/menu/menu.vue','菜单管理','s-order','菜单管理',2);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
6,1568902416000,1576141050000,NULL,0,3,'api','api',0,'view/superAdmin/api/api.vue','api管理','s-platform','api管理',3);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
17,1570605149000,1576141045000,NULL,0,3,'user','user',0,'view/superAdmin/user/user.vue','用户管理','coordinate','用户管理',4);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
18,1571149642000,1576140693000,NULL,0,0,'person','person',1,'view/person/person.vue','个人信息','user-solid','个人信息',4);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
19,1571541282000,1585489158000,NULL,0,0,'example','example',0,'view/example/index.vue','示例文件','s-management','示例文件',6);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
20,1571541491000,1571541491000,NULL,0,19,'table','table',0,'view/example/table/table.vue','表格示例','s-order','表格示例',1);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
21,1571541592000,1576141095000,NULL,0,19,'form','form',0,'view/example/form/form.vue','表单示例','document','表单示例',2);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
22,1571541739000,1576141100000,NULL,0,19,'rte','rte',0,'view/example/rte/rte.vue','富文本编辑器','reading','富文本编辑器',3);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
23,1571541819000,1576141103000,NULL,0,19,'excel','excel',0,'view/example/excel/excel.vue','excel导入导出','s-marketing','excel导入导出',4);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
26,1571542022000,1576141107000,NULL,0,19,'upload','upload',0,'view/example/upload/upload.vue','上传下载','upload','上传下载',5);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
33,1581927647000,1582544740000,NULL,0,19,'breakpoint','breakpoint',0,'view/example/breakpoint/breakpoint.vue','断点续传','upload','断点续传',6);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
34,1582544917000,1585311002000,NULL,0,19,'customer','customer',0,'view/example/customer/customer.vue','客户列表(资源示例)','s-custom','客户列表(资源示例)',7);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
38,1585488663000,1585488663000,NULL,0,0,'systemTools','systemTools',0,'view/systemTools/index.vue','系统工具','s-cooperation','系统工具',5);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
40,1585488910000,1585488910000,NULL,0,38,'autoCode','autoCode',0,'view/systemTools/autoCode/index.vue','代码生成器','cpu','代码生成器',1);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
41,1585488986000,1585488986000,NULL,0,38,'formCreate','formCreate',0,'view/systemTools/formCreate/index.vue','表单生成器','magic-stick','表单生成器',2);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
42,1585808376000,1585808416000,NULL,0,38,'system','system',0,'view/systemTools/system/system.vue','系统配置','s-operation','系统配置',3);
@@ -0,0 +1,10 @@
INSERT INTO sys_data_authority_id (sys_authority_authority_id,data_authority_id) VALUES (
'888','888');
INSERT INTO sys_data_authority_id (sys_authority_authority_id,data_authority_id) VALUES (
'888','8881');
INSERT INTO sys_data_authority_id (sys_authority_authority_id,data_authority_id) VALUES (
'888','9528');
INSERT INTO sys_data_authority_id (sys_authority_authority_id,data_authority_id) VALUES (
'9528','8881');
INSERT INTO sys_data_authority_id (sys_authority_authority_id,data_authority_id) VALUES (
'9528','9528');
+106
View File
@@ -0,0 +1,106 @@
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
231,1568901918000,1576140685000,NULL,0,999,'dashbord','dashbord',0,'view/dashbord/index.vue','仪表盘','setting',0,'1','仪表盘','1');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
232,1568901977000,1585312438000,NULL,0,999,'test','test',0,'view/test/index.vue','测试菜单','info',0,'2','测试菜单','2');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
451,1568901918000,1576140685000,NULL,0,8881,'dashbord','dashbord',0,'view/dashbord/index.vue','仪表盘','setting',0,'1','仪表盘','1');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
452,1568901998000,1576140691000,NULL,0,8881,'admin','superAdmin',0,'view/superAdmin/index.vue','超级管理员','user-solid',0,'3','超级管理员','3');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
453,1568902313000,1568902313000,NULL,0,8881,'authority','authority',0,'view/superAdmin/authority/authority.vue','角色管理','s-custom',3,'4','角色管理','1');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
454,1568902398000,1576141040000,NULL,0,8881,'menu','menu',0,'view/superAdmin/menu/menu.vue','菜单管理','s-order',3,'5','菜单管理','2');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
455,1568902416000,1576141050000,NULL,0,8881,'api','api',0,'view/superAdmin/api/api.vue','api管理','s-platform',3,'6','api管理','3');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
456,1570605149000,1576141045000,NULL,0,8881,'user','user',0,'view/superAdmin/user/user.vue','用户管理','coordinate',3,'17','用户管理','4');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
458,1571149642000,1576140693000,NULL,0,8881,'person','person',1,'view/person/person.vue','个人信息','user-solid',0,'18','个人信息','4');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
459,1571541282000,1585489158000,NULL,0,8881,'example','example',0,'view/example/index.vue','示例文件','s-management',0,'19','示例文件','6');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
460,1571541491000,1571541491000,NULL,0,8881,'table','table',0,'view/example/table/table.vue','表格示例','s-order',19,'20','表格示例','1');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
461,1571541592000,1576141095000,NULL,0,8881,'form','form',0,'view/example/form/form.vue','表单示例','document',19,'21','表单示例','2');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
462,1571541739000,1576141100000,NULL,0,8881,'rte','rte',0,'view/example/rte/rte.vue','富文本编辑器','reading',19,'22','富文本编辑器','3');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
463,1571541819000,1576141103000,NULL,0,8881,'excel','excel',0,'view/example/excel/excel.vue','excel导入导出','s-marketing',19,'23','excel导入导出','4');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
464,1571542022000,1576141107000,NULL,0,8881,'upload','upload',0,'view/example/upload/upload.vue','上传下载','upload',19,'26','上传下载','5');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
465,1581927647000,1582544740000,NULL,0,8881,'breakpoint','breakpoint',0,'view/example/breakpoint/breakpoint.vue','断点续传','upload',19,'33','断点续传','6');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
466,1582544917000,1585310739000,NULL,0,8881,'customer','customer',0,'view/example/customer/customer.vue','客户列表(资源示例)','s-custom',19,'34','客户列表(资源示例)','7');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
503,1568901918000,1576140685000,NULL,0,9528,'dashbord','dashbord',0,'view/dashbord/index.vue','仪表盘','setting',0,'1','仪表盘','1');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
504,1568901977000,1585312438000,NULL,0,9528,'test','test',0,'view/test/index.vue','测试菜单','info',0,'2','测试菜单','2');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
505,1568901998000,1576140691000,NULL,0,9528,'admin','superAdmin',0,'view/superAdmin/index.vue','超级管理员','user-solid',0,'3','超级管理员','3');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
506,1568902313000,1568902313000,NULL,0,9528,'authority','authority',0,'view/superAdmin/authority/authority.vue','角色管理','s-custom',3,'4','角色管理','1');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
507,1568902398000,1576141040000,NULL,0,9528,'menu','menu',0,'view/superAdmin/menu/menu.vue','菜单管理','s-order',3,'5','菜单管理','2');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
508,1568902416000,1576141050000,NULL,0,9528,'api','api',0,'view/superAdmin/api/api.vue','api管理','s-platform',3,'6','api管理','3');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
509,1570605149000,1576141045000,NULL,0,9528,'user','user',0,'view/superAdmin/user/user.vue','用户管理','coordinate',3,'17','用户管理','4');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
512,1571149642000,1576140693000,NULL,0,9528,'person','person',1,'view/person/person.vue','个人信息','user-solid',0,'18','个人信息','4');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
513,1571541282000,1585489158000,NULL,0,9528,'example','example',0,'view/example/index.vue','示例文件','s-management',0,'19','示例文件','6');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
514,1571541491000,1571541491000,NULL,0,9528,'table','table',0,'view/example/table/table.vue','表格示例','s-order',19,'20','表格示例','1');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
515,1571541592000,1576141095000,NULL,0,9528,'form','form',0,'view/example/form/form.vue','表单示例','document',19,'21','表单示例','2');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
516,1571541739000,1576141100000,NULL,0,9528,'rte','rte',0,'view/example/rte/rte.vue','富文本编辑器','reading',19,'22','富文本编辑器','3');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
517,1571541819000,1576141103000,NULL,0,9528,'excel','excel',0,'view/example/excel/excel.vue','excel导入导出','s-marketing',19,'23','excel导入导出','4');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
518,1571542022000,1576141107000,NULL,0,9528,'upload','upload',0,'view/example/upload/upload.vue','上传下载','upload',19,'26','上传下载','5');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
519,1581927647000,1582544740000,NULL,0,9528,'breakpoint','breakpoint',0,'view/example/breakpoint/breakpoint.vue','断点续传','upload',19,'33','断点续传','6');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
520,1582544917000,1585310738000,NULL,0,9528,'customer','customer',0,'view/example/customer/customer.vue','客户列表(资源示例)','s-custom',19,'34','客户列表(资源示例)','7');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
560,1568901918000,1576140685000,NULL,0,888,'dashbord','dashbord',0,'view/dashbord/index.vue','仪表盘','setting',0,'1','仪表盘','1');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
561,1568901977000,1585312438000,NULL,0,888,'test','test',0,'view/test/index.vue','测试菜单','info',0,'2','测试菜单','2');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
562,1568901998000,1576140691000,NULL,0,888,'admin','superAdmin',0,'view/superAdmin/index.vue','超级管理员','user-solid',0,'3','超级管理员','3');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
563,1568902313000,1568902313000,NULL,0,888,'authority','authority',0,'view/superAdmin/authority/authority.vue','角色管理','s-custom',3,'4','角色管理','1');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
564,1568902398000,1576141040000,NULL,0,888,'menu','menu',0,'view/superAdmin/menu/menu.vue','菜单管理','s-order',3,'5','菜单管理','2');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
565,1568902416000,1576141050000,NULL,0,888,'api','api',0,'view/superAdmin/api/api.vue','api管理','s-platform',3,'6','api管理','3');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
566,1570605149000,1576141045000,NULL,0,888,'user','user',0,'view/superAdmin/user/user.vue','用户管理','coordinate',3,'17','用户管理','4');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
567,1571149642000,1576140693000,NULL,0,888,'person','person',1,'view/person/person.vue','个人信息','user-solid',0,'18','个人信息','4');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
568,1585488663000,1585488663000,NULL,0,888,'systemTools','systemTools',0,'view/systemTools/index.vue','系统工具','s-cooperation',0,'38','系统工具','5');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
569,1585488910000,1585488910000,NULL,0,888,'autoCode','autoCode',0,'view/systemTools/autoCode/index.vue','代码生成器','cpu',38,'40','代码生成器','1');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
570,1585488986000,1585488986000,NULL,0,888,'formCreate','formCreate',0,'view/systemTools/formCreate/index.vue','表单生成器','magic-stick',38,'41','表单生成器','2');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
571,1585808376000,1585808416000,NULL,0,888,'system','system',0,'view/systemTools/system/system.vue','系统配置','s-operation',38,'42','系统配置','3');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
572,1571541282000,1585489158000,NULL,0,888,'example','example',0,'view/example/index.vue','示例文件','s-management',0,'19','示例文件','6');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
573,1571541491000,1571541491000,NULL,0,888,'table','table',0,'view/example/table/table.vue','表格示例','s-order',19,'20','表格示例','1');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
574,1571541592000,1576141095000,NULL,0,888,'form','form',0,'view/example/form/form.vue','表单示例','document',19,'21','表单示例','2');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
575,1571541739000,1576141100000,NULL,0,888,'rte','rte',0,'view/example/rte/rte.vue','富文本编辑器','reading',19,'22','富文本编辑器','3');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
576,1571541819000,1576141103000,NULL,0,888,'excel','excel',0,'view/example/excel/excel.vue','excel导入导出','s-marketing',19,'23','excel导入导出','4');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
577,1571542022000,1576141107000,NULL,0,888,'upload','upload',0,'view/example/upload/upload.vue','上传下载','upload',19,'26','上传下载','5');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
578,1581927647000,1582544740000,NULL,0,888,'breakpoint','breakpoint',0,'view/example/breakpoint/breakpoint.vue','断点续传','upload',19,'33','断点续传','6');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
579,1582544917000,1585311002000,NULL,0,888,'customer','customer',0,'view/example/customer/customer.vue','客户列表(资源示例)','s-custom',19,'34','客户列表(资源示例)','7');
+4
View File
@@ -0,0 +1,4 @@
INSERT INTO sys_users (id,created_at,updated_at,deleted_at,uuid,user_name,pass_word,nick_name,header_img,authority_id,authority_name,username,password,phone_data,manager) VALUES (
10,1568366626000,1571627763000,NULL,NULL,NULL,NULL,'超级管理员','http://qmplusimg.henrongyi.top/1571627762timg.jpg',888,NULL,'admin','e10adc3949ba59abbe56e057f20f883e',NULL,NULL);
INSERT INTO sys_users (id,created_at,updated_at,deleted_at,uuid,user_name,pass_word,nick_name,header_img,authority_id,authority_name,username,password,phone_data,manager) VALUES (
11,1568366849000,1568366849000,NULL,NULL,NULL,NULL,'QMPlusUser','http://qmplusimg.henrongyi.top/1572075907logo.png',9528,NULL,'a303176530','3ec063004a6f31642261936a379fde3d',NULL,NULL);
+2
View File
@@ -0,0 +1,2 @@
INSERT INTO sys_workflows (id,created_at,updated_at,deleted_at,workflow_nick_name,workflow_name,workflow_description) VALUES (
8,1575876021000,1575876021000,NULL,'测试改版1','test','123123');
+254
View File
@@ -0,0 +1,254 @@
-- casbin_rule definition
CREATE TABLE casbin_rule(
p_type varchar(100),
v0 varchar(100),
v1 varchar(100),
v2 varchar(100),
v3 varchar(100),
v4 varchar(100),
v5 varchar(100));
-- ch_cities definition
CREATE TABLE ch_cities(
id int,
province varchar(255),
city varchar(255),
code int);
-- ch_provinces definition
CREATE TABLE ch_provinces(
id int,
province varchar(255));
-- ch_t_d_areainfo definition
CREATE TABLE ch_t_d_areainfo(
id int NOT NULL,
name varchar(48) NOT NULL,
arealevel tinyint NOT NULL,
parent_id int,
PRIMARY KEY (id)
);
-- exa_customers definition
CREATE TABLE exa_customers(
id int NOT NULL,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
customer_name varchar(255),
customer_phone_data varchar(255),
sys_user_id int,
sys_user_authority_id varchar(255),
PRIMARY KEY (id)
);
-- exa_file_chunks definition
CREATE TABLE exa_file_chunks(
id int NOT NULL,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
exa_file_id int,
file_chunk_path varchar(255),
file_chunk_number int,
PRIMARY KEY (id)
);
-- exa_file_upload_and_downloads definition
CREATE TABLE exa_file_upload_and_downloads(
id int NOT NULL,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
name varchar(255),
url varchar(255),
tag varchar(255),
"key" varchar(255),
PRIMARY KEY (id)
);
-- exa_files definition
CREATE TABLE exa_files(
id int NOT NULL,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
file_name varchar(255),
file_md5 varchar(255),
file_path varchar(255),
chunk_total int,
is_finish tinyint,
PRIMARY KEY (id)
);
-- jwt_blacklists definition
CREATE TABLE jwt_blacklists(
id int NOT NULL,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
jwt text(65535),
PRIMARY KEY (id)
);
-- sys_apis definition
CREATE TABLE sys_apis(
id int NOT NULL,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
authority_id int,
"path" varchar(255),
description varchar(255),
api_group varchar(255),
"method" varchar(255),
PRIMARY KEY (id)
);
-- sys_authorities definition
CREATE TABLE sys_authorities(
authority_id varchar(255) NOT NULL,
authority_name varchar(255),
parent_id varchar(255),
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
PRIMARY KEY (authority_id)
);
-- sys_authority_menus definition
CREATE TABLE sys_authority_menus(
sys_authority_authority_id varchar(255) NOT NULL,
sys_base_menu_id int NOT NULL,
PRIMARY KEY (sys_authority_authority_id,sys_base_menu_id)
);
-- sys_base_menus definition
CREATE TABLE sys_base_menus(
id int NOT NULL,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
menu_level int,
parent_id int,
"path" varchar(255),
name varchar(255),
hidden tinyint,
component varchar(255),
title varchar(255),
icon varchar(255),
nick_name varchar(255),
sort int,
PRIMARY KEY (id)
);
-- sys_data_authority_id definition
CREATE TABLE sys_data_authority_id(
sys_authority_authority_id varchar(255) NOT NULL,
data_authority_id varchar(255) NOT NULL,
PRIMARY KEY (sys_authority_authority_id,data_authority_id)
);
-- sys_menus definition
CREATE TABLE sys_menus(
id int NOT NULL,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
menu_level int,
authority_id int,
"path" varchar(255),
name varchar(255),
hidden tinyint,
component varchar(255),
title varchar(255),
icon varchar(255),
parent_id int,
menu_id varchar(255),
nick_name varchar(255),
sort varchar(255),
PRIMARY KEY (id)
);
-- sys_users definition
CREATE TABLE sys_users(
id int NOT NULL,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
uuid BLOB,
user_name varchar(255),
pass_word varchar(255),
nick_name varchar(255),
header_img varchar(255),
authority_id double,
authority_name varchar(255),
username varchar(255),
password varchar(255),
phone_data varchar(255),
manager varchar(255),
PRIMARY KEY (id)
);
-- sys_workflow_step_infos definition
CREATE TABLE sys_workflow_step_infos(
id int NOT NULL,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
workflow_id int,
is_strat tinyint,
step_name varchar(255),
step_no double,
step_authority_id varchar(255),
is_end tinyint,
sys_workflow_id int,
PRIMARY KEY (id)
);
-- sys_workflows definition
CREATE TABLE sys_workflows(
id int NOT NULL,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
workflow_nick_name varchar(255),
workflow_name varchar(255),
workflow_description varchar(255),
PRIMARY KEY (id)
);
+638 -311
View File
File diff suppressed because it is too large Load Diff
+637 -310
View File
File diff suppressed because it is too large Load Diff
+415 -206
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -28,7 +28,7 @@ require (
github.com/onsi/gomega v1.4.3 // indirect
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
github.com/pelletier/go-toml v1.6.0 // indirect
github.com/pkg/errors v0.9.1
github.com/pkg/errors v0.9.1 // indirect
github.com/qiniu/api.v7 v7.2.5+incompatible
github.com/qiniu/x v7.0.8+incompatible // indirect
github.com/satori/go.uuid v1.2.0
+1
View File
@@ -11,6 +11,7 @@ import (
)
//初始化总路由
func Routers() *gin.Engine {
var Router = gin.Default()
+23
View File
@@ -0,0 +1,23 @@
package initialize
// sqlite需要gcc支持 windows用户需要自行安装gcc 如需使用打开注释即可
// 感谢 sqlitet提供者 [rikugun] 作者github: https://github.com/rikugun
//import (
// "fmt"
// "gin-vue-admin/global"
// "github.com/jinzhu/gorm"
// _ "github.com/jinzhu/gorm/dialects/sqlite"
//)
//
////初始化数据库并产生数据库全局变量
//func Sqlite() {
// admin := global.GVA_CONFIG.Sqlite
// if db, err := gorm.Open("sqlite3", fmt.Sprintf("%s?%s", admin.Path,admin.Config)); err != nil {
// global.GVA_LOG.Error("DEFAULTDB数据库启动异常", err)
// } else {
// global.GVA_DB = db
// global.GVA_DB.LogMode(admin.LogMode)
// }
//}
+15 -1
View File
@@ -7,8 +7,22 @@ import (
//"runtime"
)
// @title Swagger Example API
// @version 0.0.1
// @description This is a sample Server pets
// @securityDefinitions.apikey ApiKeyAuth
// @in header
// @name x-token
// @BasePath /
func main() {
initialize.Mysql()
switch global.GVA_CONFIG.System.DbType {
case "mysql":
initialize.Mysql()
//case "sqlite":
// initialize.Sqlite() // sqlite需要gcc支持 windows用户需要自行安装gcc 如需使用打开注释即可
default:
initialize.Mysql()
}
initialize.DBTables()
// 程序结束前关闭数据库链接
defer global.GVA_DB.Close()
+2 -1
View File
@@ -1,6 +1,7 @@
package middleware
import (
"gin-vue-admin/global"
"gin-vue-admin/global/response"
"gin-vue-admin/model/request"
"gin-vue-admin/service"
@@ -20,7 +21,7 @@ func CasbinHandler() gin.HandlerFunc {
sub := waitUse.AuthorityId
e := service.Casbin()
//判断策略中是否存在
if e.Enforce(sub, obj, act) {
if global.GVA_CONFIG.System.Env == "develop" || e.Enforce(sub, obj, act) {
c.Next()
} else {
response.Result(response.ERROR, gin.H{}, "权限不足", c)
+2 -4
View File
@@ -26,7 +26,7 @@ func JWTAuth() gin.HandlerFunc {
c.Abort()
return
}
if service.IsBlacklist(token,modelToken) {
if service.IsBlacklist(token, modelToken) {
response.Result(response.ERROR, gin.H{
"reload": true,
}, "您的帐户异地登陆或令牌失效", c)
@@ -66,8 +66,6 @@ var (
TokenInvalid error = errors.New("Couldn't handle this token:")
)
func NewJWT() *JWT {
return &JWT{
[]byte(global.GVA_CONFIG.JWT.SigningKey),
@@ -75,7 +73,7 @@ func NewJWT() *JWT {
}
//创建一个token
func (j *JWT) CreateToken(claims request. CustomClaims) (string, error) {
func (j *JWT) CreateToken(claims request.CustomClaims) (string, error) {
token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims)
return token.SignedString(j.SigningKey)
}
+5 -5
View File
@@ -6,9 +6,9 @@ import (
type ExaCustomer struct {
gorm.Model
CustomerName string `json:"customerName"`
CustomerPhoneData string `json:"customerPhoneData"`
SysUserID uint `json:"sysUserId"`
SysUserAuthorityID string `json:"sysUserAuthorityID"`
SysUser SysUser `json:"sysUser"`
CustomerName string `json:"customerName" form:"customerName"`
CustomerPhoneData string `json:"customerPhoneData" form:"customerPhoneData"`
SysUserID uint `json:"sysUserId" form:"sysUserId"`
SysUserAuthorityID string `json:"sysUserAuthorityID" form:"sysUserAuthorityID"`
SysUser SysUser `json:"sysUser" form:"sysUser"`
}
+3 -3
View File
@@ -2,11 +2,11 @@ package request
// Paging common input parameter structure
type PageInfo struct {
Page int `json:"page"`
PageSize int `json:"pageSize"`
Page int `json:"page" form:"page"`
PageSize int `json:"pageSize" form:"pageSize"`
}
// Find by id structure
type GetById struct {
Id float64 `json:"id"`
Id float64 `json:"id" form:"id"`
}
+5
View File
@@ -5,3 +5,8 @@ import "gin-vue-admin/model"
type SysAuthorityResponse struct {
Authority model.SysAuthority `json:"authority"`
}
type SysAuthorityCopyResponse struct {
Authority model.SysAuthority `json:"authority"`
OldAuthorityId string `json:"oldAuthorityId"`
}
+3 -1
View File
@@ -1,5 +1,7 @@
package response
import "gin-vue-admin/model/request"
type PolicyPathResponse struct {
Paths []string `json:"paths"`
Paths []request.CasbinInfo `json:"paths"`
}
+5 -3
View File
@@ -19,6 +19,8 @@ type SysBaseMenu struct {
}
type Meta struct {
Title string `json:"title"`
Icon string `json:"icon"`
}
KeepAlive bool `json:"keepAlive"`
DefaultMenu bool `json:"defaultMenu"`
Title string `json:"title"`
Icon string `json:"icon"`
}
+1 -1
View File
@@ -11,4 +11,4 @@ g = _, _
e = some(where (p.eft == allow))
[matchers]
m = r.sub == p.sub && r.obj == p.obj && r.act == p.act
m = r.sub == p.sub && ParamsMatch(r.obj,p.obj) && r.act == p.act
+1 -1
View File
@@ -72,7 +72,7 @@ export const create{{.StructName}} = (data) => {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.PageInfo true "分页获取{{.StructName}}列表"
// @Param data body request.PageInfo true "分页获取{{.StructName}}列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /{{.Abbreviation}}/get{{.StructName}}List [post]
export const get{{.StructName}}List = (data) => {
+2 -2
View File
@@ -97,11 +97,11 @@ func Find{{.StructName}}(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.PageInfo true "分页获取{{.StructName}}列表"
// @Param data body request.PageInfo true "分页获取{{.StructName}}列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /{{.Abbreviation}}/get{{.StructName}}List [post]
func Get{{.StructName}}List(c *gin.Context) {
var pageInfo model.PageInfo
var pageInfo request.PageInfo
_ = c.ShouldBindJSON(&pageInfo)
err, list, total := new({{.PackageName}}.{{.StructName}}).GetInfoList(pageInfo)
if err != nil {
+5 -5
View File
@@ -9,10 +9,10 @@ import (
func InitCustomerRouter(Router *gin.RouterGroup) {
ApiRouter := Router.Group("customer").Use(middleware.JWTAuth()).Use(middleware.CasbinHandler())
{
ApiRouter.POST("createExaCustomer", v1.CreateExaCustomer) // 创建客户
ApiRouter.POST("updateExaCustomer", v1.UpdateExaCustomer) // 更新客户
ApiRouter.POST("deleteExaCustomer", v1.DeleteExaCustomer) // 删除客户
ApiRouter.POST("getExaCustomer", v1.GetExaCustomer) // 获取单一客户信息
ApiRouter.POST("getExaCustomerList", v1.GetExaCustomerList) // 获取客户列表
ApiRouter.POST("customer", v1.CreateExaCustomer) // 创建客户
ApiRouter.PUT("customer", v1.UpdateExaCustomer) // 更新客户
ApiRouter.DELETE("customer", v1.DeleteExaCustomer) // 删除客户
ApiRouter.GET("customer", v1.GetExaCustomer) // 获取单一客户信息
ApiRouter.GET("customerList", v1.GetExaCustomerList) // 获取客户列表
}
}
+2
View File
@@ -11,6 +11,8 @@ func InitAuthorityRouter(Router *gin.RouterGroup) {
{
AuthorityRouter.POST("createAuthority", v1.CreateAuthority) //创建角色
AuthorityRouter.POST("deleteAuthority", v1.DeleteAuthority) //删除角色
AuthorityRouter.PUT("updateAuthority", v1.UpdateAuthority) //更新角色
AuthorityRouter.POST("copyAuthority", v1.CopyAuthority) //更新角色
AuthorityRouter.POST("getAuthorityList", v1.GetAuthorityList) //获取角色列表
AuthorityRouter.POST("setDataAuthority", v1.SetDataAuthority) //设置角色资源权限
}
+1
View File
@@ -13,5 +13,6 @@ func InitUserRouter(Router *gin.RouterGroup) {
UserRouter.POST("uploadHeaderImg", v1.UploadHeaderImg) //上传头像
UserRouter.POST("getUserList", v1.GetUserList) // 分页获取用户列表
UserRouter.POST("setUserAuthority", v1.SetUserAuthority) //设置用户权限
UserRouter.DELETE("deleteUser", v1.DeleteUser) //删除用户
}
}
+29 -25
View File
@@ -8,20 +8,21 @@ import (
// @title FindOrCreateFile
// @description Check your file if it does not exist, or return current slice of the file
// 上传文件时检测当前文件属性,如果没有文件则创建,有则返回文件的当前切片
// @auth (2020/04/05 20:22 )
// @param FileMd5 string
// @param FileName string
// @param ChunkTotal int
// @auth (2020/04/05 20:22)
// @param fileMd5 string
// @param fileName string
// @param chunkTotal int
// @return err error
// @return file ExaFile
func FindOrCreateFile(FileMd5 string, FileName string, ChunkTotal int) (err error, file model.ExaFile) {
func FindOrCreateFile(fileMd5 string, fileName string, chunkTotal int) (err error, file model.ExaFile) {
var cfile model.ExaFile
cfile.FileMd5 = FileMd5
cfile.FileName = FileName
cfile.ChunkTotal = ChunkTotal
notHaveSameMd5Finish := global.GVA_DB.Where("file_md5 = ? AND is_finish = ?", FileMd5, true).First(&file).RecordNotFound()
cfile.FileMd5 = fileMd5
cfile.FileName = fileName
cfile.ChunkTotal = chunkTotal
notHaveSameMd5Finish := global.GVA_DB.Where("file_md5 = ? AND is_finish = ?", fileMd5, true).First(&file).RecordNotFound()
if notHaveSameMd5Finish {
err = global.GVA_DB.Where("file_md5 = ? AND file_name = ?", FileMd5, FileName).Preload("ExaFileChunk").FirstOrCreate(&file, cfile).Error
err = global.GVA_DB.Where("file_md5 = ? AND file_name = ?", fileMd5, fileName).Preload("ExaFileChunk").FirstOrCreate(&file, cfile).Error
return err, file
} else {
cfile.IsFinish = true
@@ -31,45 +32,48 @@ func FindOrCreateFile(FileMd5 string, FileName string, ChunkTotal int) (err err
}
}
// @title CreateFileChunk
// @description create a chunk of the file, 创建文件切片记录
// @auth (2020/04/05 20:22 )
// @param FileChunkPath string
// @param FileChunkNumber int
// @auth (2020/04/05 20:22)
// @param id unit
// @param fileChunkPath string
// @param fileChunkNumber int
// @return error
func CreateFileChunk(id uint, FileChunkPath string, FileChunkNumber int) error {
func CreateFileChunk(id uint, fileChunkPath string, fileChunkNumber int) error {
var chunk model.ExaFileChunk
chunk.FileChunkPath = FileChunkPath
chunk.FileChunkPath = fileChunkPath
chunk.ExaFileId = id
chunk.FileChunkNumber = FileChunkNumber
chunk.FileChunkNumber = fileChunkNumber
err := global.GVA_DB.Create(&chunk).Error
return err
}
// @title FileCreateComplete
// @description file creation, 文件合成完成
// @auth (2020/04/05 20:22 )
// @param FileMd5 string
// @param FileName string
// @param FilePath string
// @auth (2020/04/05 20:22)
// @param fileMd5 string
// @param fileName string
// @param filePath string
// @return error
func FileCreateComplete(FileMd5 string, FileName string, FilePath string) error {
func FileCreateComplete(fileMd5 string, fileName string, filePath string) error {
var file model.ExaFile
upDateFile := make(map[string]interface{})
upDateFile["FilePath"] = FilePath
upDateFile["FilePath"] = filePath
upDateFile["IsFinish"] = true
err := global.GVA_DB.Where("file_md5 = ? AND file_name = ?", FileMd5, FileName).First(&file).Updates(upDateFile).Error
err := global.GVA_DB.Where("file_md5 = ? AND file_name = ?", fileMd5, fileName).First(&file).Updates(upDateFile).Error
return err
}
// @title DeleteFileChunk
// @description delete a chuck of the file, 删除文件切片记录
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param FileMd5 string
// @param FileName string
// @param FilePath string
// @return error
func DeleteFileChunk(fileMd5 string, fileName string, filePath string) error {
var chunks []model.ExaFileChunk
var file model.ExaFile
+33 -27
View File
@@ -8,26 +8,32 @@ import (
// @title CreateExaCustomer
// @description create a customer, 创建用户
// @auth (2020/04/05 20:22 )
// @param e model.ExaCustomer
// @auth (2020/04/05 20:22)
// @return err error
func CreateExaCustomer(e model.ExaCustomer) (err error) {
err = global.GVA_DB.Create(e).Error
err = global.GVA_DB.Create(&e).Error
return err
}
// @title DeleteFileChunk
// @description delete a customer, 删除用户
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param e *model.ExaCustomer
// @return error
func DeleteExaCustomer(e model.ExaCustomer) (err error) {
func DeleteExaCustomer(e model.ExaCustomer) (err error) {
err = global.GVA_DB.Delete(e).Error
return err
}
// @title UpdateExaCustomer
// @description update a customer, 更新用户
// @auth (2020/04/05 20:22 )
// @param e *model.ExaCustomer
// @auth (2020/04/05 20:22)
// @return error
func UpdateExaCustomer(e *model.ExaCustomer) (err error) {
err = global.GVA_DB.Save(e).Error
return err
@@ -35,40 +41,40 @@ func UpdateExaCustomer(e *model.ExaCustomer) (err error) {
// @title GetExaCustomer
// @description get the info of a costumer , 获取用户信息
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param id uint
// @return error
// @return customer ExaCustomer
func GetExaCustomer(id uint) (err error, customer model.ExaCustomer) {
err = global.GVA_DB.Where("id = ?",id).First(&customer).Error
err = global.GVA_DB.Where("id = ?", id).First(&customer).Error
return
}
// @title GetCustomerInfoList
// @description get customer list by pagination, 分页获取用户列表
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param sysUserAuthorityID string
// @param info PageInfo
// @return error
func GetCustomerInfoList(sysUserAuthorityID string, info request.PageInfo) (err error, list interface{}, total int) {
func GetCustomerInfoList(sysUserAuthorityID string, info request.PageInfo) (err error, list interface{}, total int) {
limit := info.PageSize
offset := info.PageSize * (info.Page - 1)
db := global.GVA_DB
if err != nil {
return
} else {
var a model.SysAuthority
a.AuthorityId = sysUserAuthorityID
err, auth :=GetAuthorityInfo(a)
var dataId []string
for _, v := range auth.DataAuthorityId {
dataId = append(dataId, v.AuthorityId)
}
var CustomerList []model.ExaCustomer
err = db.Where("sys_user_authority_id in (?)", dataId).Find(&CustomerList).Count(&total).Error
if err != nil {
return err, CustomerList, total
} else {
err = db.Limit(limit).Offset(offset).Preload("SysUser").Where("sys_user_authority_id in (?)", dataId).Find(&CustomerList).Error
}
return err, CustomerList, total
var a model.SysAuthority
a.AuthorityId = sysUserAuthorityID
err, auth := GetAuthorityInfo(a)
var dataId []string
for _, v := range auth.DataAuthorityId {
dataId = append(dataId, v.AuthorityId)
}
var CustomerList []model.ExaCustomer
err = db.Where("sys_user_authority_id in (?)", dataId).Find(&CustomerList).Count(&total).Error
if err != nil {
return err, CustomerList, total
} else {
err = db.Limit(limit).Offset(offset).Preload("SysUser").Where("sys_user_authority_id in (?)", dataId).Find(&CustomerList).Error
}
return err, CustomerList, total
}
+19 -15
View File
@@ -8,17 +8,21 @@ import (
// @title Upload
// @description 创建文件上传记录
// @auth (2020/04/05 20:22 )
// @param file model.ExaFileUploadAndDownload
// @auth (2020/04/05 20:22)
// @return error
func Upload(f model.ExaFileUploadAndDownload) error {
err := global.GVA_DB.Create(f).Error
func Upload(file model.ExaFileUploadAndDownload) error {
err := global.GVA_DB.Create(&file).Error
return err
}
// @title FindFile
// @description 删除文件切片记录
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param id uint
// @return error
func FindFile(id uint) (error, model.ExaFileUploadAndDownload) {
var file model.ExaFileUploadAndDownload
err := global.GVA_DB.Where("id = ?", id).First(&file).Error
@@ -27,29 +31,29 @@ func FindFile(id uint) (error, model.ExaFileUploadAndDownload) {
// @title DeleteFile
// @description 删除文件记录
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param file model.ExaFileUploadAndDownload
// @return error
func DeleteFile(f model.ExaFileUploadAndDownload) error {
err := global.GVA_DB.Where("id = ?", f.ID).Unscoped().Delete(f).Error
func DeleteFile(file model.ExaFileUploadAndDownload) error {
err := global.GVA_DB.Where("id = ?", file.ID).Unscoped().Delete(file).Error
return err
}
// @title GetFileRecordInfoList
// @description 分页获取数据
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param info PageInfo
// @return err error
// @return list error
// @return total error
func GetFileRecordInfoList(info request.PageInfo) (err error, list interface{}, total int) {
limit := info.PageSize
offset := info.PageSize * (info.Page - 1)
db := global.GVA_DB
if err != nil {
return
} else {
var fileLists []model.ExaFileUploadAndDownload
err = db.Limit(limit).Offset(offset).Order("updated_at desc").Find(&fileLists).Error
return err, fileLists, total
}
var fileLists []model.ExaFileUploadAndDownload
err = db.Find(&fileLists).Count(&total).Error
err = db.Limit(limit).Offset(offset).Order("updated_at desc").Find(&fileLists).Error
return err, fileLists, total
}
+23 -16
View File
@@ -7,40 +7,47 @@ import (
// @title JsonInBlacklist
// @description create jwt blacklist
// @auth (2020/04/05 20:22 )
// @param jwtList model.JwtBlacklist
// @auth (2020/04/05 20:22)
// @return err error
func JsonInBlacklist(j *model.JwtBlacklist) (err error) {
err = global.GVA_DB.Create(j).Error
func JsonInBlacklist(jwtList model.JwtBlacklist) (err error) {
err = global.GVA_DB.Create(&jwtList).Error
return
}
// @title IsBlacklist
// @description check if the Jwt is in the blacklist or not, 判断JWT是否在黑名单内部
// @auth (2020/04/05 20:22 )
// @param newPassword string
// @auth (2020/04/05 20:22)
// @param jwt string
// @param jwtList model.JwtBlacklist
// @return err error
func IsBlacklist(Jwt string, j model.JwtBlacklist) bool {
isNotFound := global.GVA_DB.Where("jwt = ?", Jwt).First(j).RecordNotFound()
func IsBlacklist(jwt string, jwtList model.JwtBlacklist) bool {
isNotFound := global.GVA_DB.Where("jwt = ?", jwt).First(&jwtList).RecordNotFound()
return !isNotFound
}
// @title GetRedisJWT
// @description Get user info in redis
// @auth (2020/04/05 20:22 )
// @param newPassword string
// @auth (2020/04/05 20:22)
// @param userName string
// @return err error
func GetRedisJWT(userName string) (err error, RedisJWT string) {
RedisJWT, err = global.GVA_REDIS.Get(userName).Result()
return err, RedisJWT
// @return redisJWT string
func GetRedisJWT(userName string) (err error, redisJWT string) {
redisJWT, err = global.GVA_REDIS.Get(userName).Result()
return err, redisJWT
}
// @title SetRedisJWT
// @description set jwt into the Redis
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param jwtList model.JwtBlacklist
// @param userName string
// @return err error
func SetRedisJWT(j model.JwtBlacklist, userName string) (err error) {
err = global.GVA_REDIS.Set(userName, j.Jwt, 1000*1000*1000*60*60*24*7).Err()
func SetRedisJWT(jwtList model.JwtBlacklist, userName string) (err error) {
err = global.GVA_REDIS.Set(userName, jwtList.Jwt, 1000*1000*1000*60*60*24*7).Err()
return err
}
+72 -59
View File
@@ -9,87 +9,92 @@ import (
// @title CreateApi
// @description create base apis, 新增基础api
// @auth (2020/04/05 20:22 )
// @param FileMd5 string
// @param FileName string
// @param FilePath string
// @auth (2020/04/05 20:22)
// @param api model.SysApi
// @return error
func CreateApi(a model.SysApi) (err error) {
findOne := global.GVA_DB.Where("path = ?", a.Path).Find(&model.SysApi{}).Error
func CreateApi(api model.SysApi) (err error) {
findOne := global.GVA_DB.Where("path = ? AND method = ?", api.Path, api.Method).Find(&model.SysApi{}).Error
if findOne == nil {
return errors.New("存在相同api")
} else {
err = global.GVA_DB.Create(a).Error
err = global.GVA_DB.Create(&api).Error
}
return err
}
// @title DeleteApi
// @description delete base apis, 删除基础api
// @auth (2020/04/05 20:22 )
// @description delete a base api, 删除基础api
// @param api model.SysApi
// @auth (2020/04/05 20:22)
// @return error
func DeleteApi(a model.SysApi) (err error) {
err = global.GVA_DB.Delete(a).Error
ClearCasbin(1, a.Path)
func DeleteApi(api model.SysApi) (err error) {
err = global.GVA_DB.Delete(api).Error
ClearCasbin(1, api.Path, api.Method)
return err
}
// @title GetInfoList
// @description get apis by pagination, 分页获取数据
// @auth (2020/04/05 20:22 )
// @param info PageInfo
// @auth (2020/04/05 20:22)
// @param api model.SysApi
// @param info request.PageInfo
// @param order string
// @param desc bool
// @return err error
// @return list interface{}
// @return total int
func GetAPIInfoList(a model.SysApi, info request.PageInfo, Order string, Desc bool) (err error, list interface{}, total int) {
func GetAPIInfoList(api model.SysApi, info request.PageInfo, order string, desc bool) (err error, list interface{}, total int) {
limit := info.PageSize
offset := info.PageSize * (info.Page - 1)
db := global.GVA_DB
var apiList []model.SysApi
if api.Path != "" {
db = db.Where("path LIKE ?", "%"+api.Path+"%")
}
if api.Description != "" {
db = db.Where("description LIKE ?", "%"+api.Description+"%")
}
if api.Method != "" {
db = db.Where("method = ?", api.Method)
}
if api.ApiGroup != "" {
db = db.Where("api_group = ?", api.ApiGroup)
}
err = db.Find(&apiList).Count(&total).Error
if err != nil {
return
} else {
var apiList []model.SysApi
if a.Path != "" {
db = db.Where("path LIKE ?", "%"+a.Path+"%")
}
if a.Description != "" {
db = db.Where("description LIKE ?", "%"+a.Description+"%")
}
if a.Method != "" {
db = db.Where("method = ?", a.Method)
}
err = db.Find(&apiList).Count(&total).Error
if err != nil {
return err, apiList, total
} else {
db = db.Limit(limit).Offset(offset)
if Order != "" {
var OrderStr string
if Desc {
OrderStr = Order + " desc"
} else {
OrderStr = Order
}
err = db.Order(OrderStr, true).Find(&apiList).Error
} else {
err = db.Order("api_group", true).Find(&apiList).Error
}
}
return err, apiList, total
} else {
db = db.Limit(limit).Offset(offset)
if order != "" {
var OrderStr string
if desc {
OrderStr = order + " desc"
} else {
OrderStr = order
}
err = db.Order(OrderStr, true).Find(&apiList).Error
} else {
err = db.Order("api_group", true).Find(&apiList).Error
}
}
return err, apiList, total
}
// @title GetAllApis
// @description get all apis, 获取所有的api
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @return err error
// @return apis []SysApi
func GetAllApis() (err error, apis []model.SysApi) {
err = global.GVA_DB.Find(&apis).Error
return
@@ -97,9 +102,11 @@ func GetAllApis() (err error, apis []model.SysApi) {
// @title GetApiById
// @description 根据id获取api
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param api model.SysApi
// @param id float64
// @return error
func GetApiById(id float64) (err error, api model.SysApi) {
err = global.GVA_DB.Where("id = ?", id).First(&api).Error
return
@@ -107,23 +114,29 @@ func GetApiById(id float64) (err error, api model.SysApi) {
// @title UpdateApi
// @description update a base api, update api
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param api model.SysApi
// @return error
func UpdateApi(a model.SysApi) (err error) {
func UpdateApi(api model.SysApi) (err error) {
var oldA model.SysApi
flag := global.GVA_DB.Where("path = ?", a.Path).Find(&model.SysApi{}).RecordNotFound()
if !flag {
return errors.New("存在相同api路径")
err = global.GVA_DB.Where("id = ?", api.ID).First(&oldA).Error
if oldA.Path != api.Path || oldA.Method != api.Method {
flag := global.GVA_DB.Where("path = ? AND method = ?", api.Path, api.Method).Find(&model.SysApi{}).RecordNotFound()
if !flag {
return errors.New("存在相同api路径")
}
}
err = global.GVA_DB.Where("id = ?", a.ID).First(&oldA).Error
if err != nil {
return err
} else {
err = UpdateCasbinApi(oldA.Path, a.Path)
err = UpdateCasbinApi(oldA.Path, api.Path, oldA.Method, api.Method)
if err != nil {
return err
} else {
err = global.GVA_DB.Save(a).Error
err = global.GVA_DB.Save(&api).Error
}
}
return err
+98 -57
View File
@@ -5,123 +5,164 @@ import (
"gin-vue-admin/global"
"gin-vue-admin/model"
"gin-vue-admin/model/request"
"gin-vue-admin/model/response"
"strconv"
)
// @title CreateAuthority
// @description 创建一个角色
// @auth (2020/04/05 20:22 )
// @param FileMd5 string
// @param FileName string
// @param FilePath string
// @auth (2020/04/05 20:22)
// @param auth model.SysAuthority
// @return error
func CreateAuthority(a *model.SysAuthority) (err error, authority *model.SysAuthority) {
err = global.GVA_DB.Create(a).Error
return err, a
// @return authority model.SysAuthority
func CreateAuthority(auth model.SysAuthority) (err error, authority model.SysAuthority) {
var authorityBox model.SysAuthority
notHas := global.GVA_DB.Where("authority_id = ?", auth.AuthorityId).Find(&authorityBox).RecordNotFound()
if !notHas {
return errors.New("存在相同角色id"), auth
}
err = global.GVA_DB.Create(&auth).Error
return err, auth
}
// @title CopyAuthority
// @description 复制一个角色
// @auth (2020/04/05 20:22)
// @param copyInfo response.SysAuthorityCopyResponse
// @return error
// @return authority model.SysAuthority
func CopyAuthority(copyInfo response.SysAuthorityCopyResponse) (err error, authority model.SysAuthority) {
var authorityBox model.SysAuthority
notHas := global.GVA_DB.Where("authority_id = ?", copyInfo.Authority.AuthorityId).Find(&authorityBox).RecordNotFound()
if !notHas {
return errors.New("存在相同角色id"), authority
}
copyInfo.Authority.Children = []model.SysAuthority{}
err, menus := GetMenuAuthority(copyInfo.OldAuthorityId)
var baseMenu []model.SysBaseMenu
for _, v := range menus {
intNum, _ := strconv.Atoi(v.MenuId)
v.SysBaseMenu.ID = uint(intNum)
baseMenu = append(baseMenu, v.SysBaseMenu)
}
copyInfo.Authority.SysBaseMenus = baseMenu
err = global.GVA_DB.Create(&copyInfo.Authority).Error
paths := GetPolicyPathByAuthorityId(copyInfo.OldAuthorityId)
err = UpdateCasbin(copyInfo.Authority.AuthorityId, paths)
if err != nil {
_ = DeleteAuthority(&copyInfo.Authority)
}
return err, copyInfo.Authority
}
// @title UpdateAuthority
// @description 更改一个角色
// @auth (2020/04/05 20:22)
// @param auth model.SysAuthority
// @return error
// @return authority model.SysAuthority
func UpdateAuthority(auth model.SysAuthority) (err error, authority model.SysAuthority) {
err = global.GVA_DB.Where("authority_id = ?", auth.AuthorityId).First(&model.SysAuthority{}).Updates(&auth).Error
return err, auth
}
// @title DeleteAuthority
// @description 删除角色
// @auth (2020/04/05 20:22 )
// @param FileMd5 string
// @param FileName string
// @param FilePath string
// @auth (2020/04/05 20:22)
// @param auth model.SysAuthority
// @return error
// 删除角色
func DeleteAuthority(a model.SysAuthority) (err error) {
err = global.GVA_DB.Where("authority_id = ?", a.AuthorityId).Find(&model.SysUser{}).Error
func DeleteAuthority(auth *model.SysAuthority) (err error) {
err = global.GVA_DB.Where("authority_id = ?", auth.AuthorityId).Find(&model.SysUser{}).Error
if err == nil {
err = errors.New("此角色有用户正在使用禁止删除")
return
}
err = global.GVA_DB.Where("parent_id = ?", a.AuthorityId).Find(&model.SysAuthority{}).Error
err = global.GVA_DB.Where("parent_id = ?", auth.AuthorityId).Find(&model.SysAuthority{}).Error
if err == nil {
err = errors.New("此角色存在子角色不允许删除")
return
}
db := global.GVA_DB.Preload("SysBaseMenus").Where("authority_id = ?", a.AuthorityId).First(a).Unscoped().Delete(a)
if len(a.SysBaseMenus) > 0 {
err = db.Association("SysBaseMenus").Delete(a.SysBaseMenus).Error
db := global.GVA_DB.Preload("SysBaseMenus").Where("authority_id = ?", auth.AuthorityId).First(auth).Unscoped().Delete(auth)
if len(auth.SysBaseMenus) > 0 {
err = db.Association("SysBaseMenus").Delete(auth.SysBaseMenus).Error
} else {
err = db.Error
}
ClearCasbin(0, a.AuthorityId)
ClearCasbin(0, auth.AuthorityId)
return err
}
// @title GetInfoList
// @description 删除文件切片记录
// @auth (2020/04/05 20:22 )
// @param FileMd5 string
// @param FileName string
// @param FilePath string
// @auth (2020/04/05 20:22)
// @param info request.PaveInfo
// @return error
// 分页获取数据
func GetAuthorityInfoList(info request.PageInfo) (err error, list interface{}, total int) {
limit := info.PageSize
offset := info.PageSize * (info.Page - 1)
db := global.GVA_DB
if err != nil {
return
} else {
var authority []model.SysAuthority
err = db.Limit(limit).Offset(offset).Preload("DataAuthorityId").Where("parent_id = 0").Find(&authority).Error
if len(authority) > 0 {
for k, _ := range authority {
err = findChildrenAuthority(&authority[k])
}
var authority []model.SysAuthority
err = db.Limit(limit).Offset(offset).Preload("DataAuthorityId").Where("parent_id = 0").Find(&authority).Error
if len(authority) > 0 {
for k, _ := range authority {
err = findChildrenAuthority(&authority[k])
}
return err, authority, total
}
return err, authority, total
}
// @title GetAuthorityInfo
// @description 获取所有角色信息
// @auth (2020/04/05 20:22 )
// @param FileMd5 string
// @param FileName string
// @param FilePath string
// @auth (2020/04/05 20:22)
// @param auth model.SysAuthority
// @return error
func GetAuthorityInfo(a model.SysAuthority) (err error, sa model.SysAuthority) {
err = global.GVA_DB.Preload("DataAuthorityId").Where("authority_id = ?", a.AuthorityId).First(&sa).Error
// @param authority model.SysAuthority
func GetAuthorityInfo(auth model.SysAuthority) (err error, sa model.SysAuthority) {
err = global.GVA_DB.Preload("DataAuthorityId").Where("authority_id = ?", auth.AuthorityId).First(&sa).Error
return err, sa
}
// @title SetDataAuthority
// @description 设置角色资源权限
// @auth (2020/04/05 20:22 )
// @param FileMd5 string
// @param FileName string
// @param FilePath string
// @auth (2020/04/05 20:22)
// @param auth model.SysAuthority
// @return error
func SetDataAuthority(a model.SysAuthority) error {
func SetDataAuthority(auth model.SysAuthority) error {
var s model.SysAuthority
global.GVA_DB.Preload("DataAuthorityId").First(&s, "authority_id = ?", a.AuthorityId)
err := global.GVA_DB.Model(&s).Association("DataAuthorityId").Replace(&a.DataAuthorityId).Error
global.GVA_DB.Preload("DataAuthorityId").First(&s, "authority_id = ?", auth.AuthorityId)
err := global.GVA_DB.Model(&s).Association("DataAuthorityId").Replace(&auth.DataAuthorityId).Error
return err
}
// @title SetMenuAuthority
// @description 菜单与角色绑定
// @auth (2020/04/05 20:22 )
// @param FileMd5 string
// @param FileName string
// @param FilePath string
// @auth (2020/04/05 20:22)
// @param auth *model.SysAuthority
// @return error
func SetMenuAuthority(a *model.SysAuthority) error {
func SetMenuAuthority(auth *model.SysAuthority) error {
var s model.SysAuthority
global.GVA_DB.Preload("SysBaseMenus").First(&s, "authority_id = ?", a.AuthorityId)
err := global.GVA_DB.Model(&s).Association("SysBaseMenus").Replace(&a.SysBaseMenus).Error
global.GVA_DB.Preload("SysBaseMenus").First(&s, "authority_id = ?", auth.AuthorityId)
err := global.GVA_DB.Model(&s).Association("SysBaseMenus").Replace(&auth.SysBaseMenus).Error
return err
}
// @title findChildrenAuthority
// @description 查询子角色
// @auth (2020/04/05 20:22 )
// @param FileMd5 string
// @param FileName string
// @param FilePath string
// @auth (2020/04/05 20:22)
// @param auth *model.SysAuthority
// @return error
func findChildrenAuthority(authority *model.SysAuthority) (err error) {
err = global.GVA_DB.Preload("DataAuthorityId").Where("parent_id = ?", authority.AuthorityId).Find(&authority.Children).Error
if len(authority.Children) > 0 {
+23 -21
View File
@@ -9,9 +9,11 @@ import (
// @title CreateTemp
// @description 函数的详细描述
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param autoCode model.AutoCodeStruct
// @return err error
func CreateTemp(a model.AutoCodeStruct) (err error) {
func CreateTemp(autoCode model.AutoCodeStruct) (err error) {
basePath := "./resource/template"
modelTmpl, err := template.ParseFiles(basePath + "/te/model.go.tpl")
if err != nil {
@@ -37,31 +39,31 @@ func CreateTemp(a model.AutoCodeStruct) (err error) {
_autoCode := "./autoCode/"
//自动化后台代码目录
_te := "./autoCode/te/"
_dir := _te + a.PackageName
_modeldir := _te + a.PackageName + "/model"
_apidir := _te + a.PackageName + "/api"
_routerdir := _te + a.PackageName + "/router"
_dir := _te + autoCode.PackageName
_modeldir := _te + autoCode.PackageName + "/model"
_apidir := _te + autoCode.PackageName + "/api"
_routerdir := _te + autoCode.PackageName + "/router"
//自动化前台代码目录
_fe := "./autoCode/fe/"
_fe_dir := _fe + a.PackageName
_fe_apidir := _fe + a.PackageName + "/api"
_fe_dir := _fe + autoCode.PackageName
_fe_apidir := _fe + autoCode.PackageName + "/api"
err = utils.CreateDir(_autoCode, _te, _dir, _modeldir, _apidir, _routerdir, _fe, _fe_dir, _fe_apidir)
if err != nil {
return err
}
model, err := os.OpenFile(_te+a.PackageName+"/model/model.go", os.O_CREATE|os.O_WRONLY, 0755)
model, err := os.OpenFile(_te+autoCode.PackageName+"/model/model.go", os.O_CREATE|os.O_WRONLY, 0755)
if err != nil {
return err
}
api, err := os.OpenFile(_te+a.PackageName+"/api/api.go", os.O_CREATE|os.O_WRONLY, 0755)
api, err := os.OpenFile(_te+autoCode.PackageName+"/api/api.go", os.O_CREATE|os.O_WRONLY, 0755)
if err != nil {
return err
}
router, err := os.OpenFile(_te+a.PackageName+"/router/router.go", os.O_CREATE|os.O_WRONLY, 0755)
router, err := os.OpenFile(_te+autoCode.PackageName+"/router/router.go", os.O_CREATE|os.O_WRONLY, 0755)
if err != nil {
return err
}
feapi, err := os.OpenFile(_fe+a.PackageName+"/api/api.js", os.O_CREATE|os.O_WRONLY, 0755)
feapi, err := os.OpenFile(_fe+autoCode.PackageName+"/api/api.js", os.O_CREATE|os.O_WRONLY, 0755)
if err != nil {
return err
}
@@ -71,23 +73,23 @@ func CreateTemp(a model.AutoCodeStruct) (err error) {
}
// 生成代码
{
err = modelTmpl.Execute(model, a)
err = modelTmpl.Execute(model, autoCode)
if err != nil {
return err
}
err = apiTmpl.Execute(api, a)
err = apiTmpl.Execute(api, autoCode)
if err != nil {
return err
}
err = routerTmpl.Execute(router, a)
err = routerTmpl.Execute(router, autoCode)
if err != nil {
return err
}
err = feapiTmpl.Execute(feapi, a)
err = feapiTmpl.Execute(feapi, autoCode)
if err != nil {
return err
}
err = readmeTmpl.Execute(readme, a)
err = readmeTmpl.Execute(readme, autoCode)
if err != nil {
return err
}
@@ -98,10 +100,10 @@ func CreateTemp(a model.AutoCodeStruct) (err error) {
_ = feapi.Close()
_ = readme.Close()
fileList := []string{
_te + a.PackageName + "/model/model.go",
_te + a.PackageName + "/api/api.go",
_te + a.PackageName + "/router/router.go",
_fe + a.PackageName + "/api/api.js",
_te + autoCode.PackageName + "/model/model.go",
_te + autoCode.PackageName + "/api/api.go",
_te + autoCode.PackageName + "/router/router.go",
_fe + autoCode.PackageName + "/api/api.js",
_autoCode + "readme.txt",
}
err = utils.ZipFiles("./ginvueadmin.zip", fileList, ".", ".")
+24 -10
View File
@@ -8,10 +8,11 @@ import (
// @title DeleteBaseMenu
// @description 删除基础路由
// @auth (2020/04/05 20:22 )
// @param newPassword string
// @auth (2020/04/05 20:22)
// @param id float64
// @return err error
func DeleteBaseMenu(id float64) (err error) {
func DeleteBaseMenu(id float64) (err error) {
err = global.GVA_DB.Where("parent_id = ?", id).First(&model.SysBaseMenu{}).Error
if err != nil {
var menu model.SysBaseMenu
@@ -29,11 +30,15 @@ func DeleteBaseMenu(id float64) (err error) {
// @title UpdateBaseMenu
// @description 更新路由
// @auth (2020/04/05 20:22 )
// @param newPassword string
// @return err error
func UpdateBaseMenu(menu model.SysBaseMenu) (err error) {
// @auth (2020/04/05 20:22)
// @param menu model.SysBaseMenu
// @return err errorgetMenu
func UpdateBaseMenu(menu model.SysBaseMenu) (err error) {
var oldMenu model.SysBaseMenu
upDateMap := make(map[string]interface{})
upDateMap["keep_alive"] = menu.KeepAlive
upDateMap["default_menu"] = menu.DefaultMenu
upDateMap["parent_id"] = menu.ParentId
upDateMap["path"] = menu.Path
upDateMap["name"] = menu.Name
@@ -42,16 +47,25 @@ func UpdateBaseMenu(menu model.SysBaseMenu) (err error) {
upDateMap["title"] = menu.Title
upDateMap["icon"] = menu.Icon
upDateMap["sort"] = menu.Sort
err = global.GVA_DB.Where("id = ?", menu.ID).Find(&model.SysBaseMenu{}).Updates(upDateMap).Error
db := global.GVA_DB.Where("id = ?", menu.ID).Find(&oldMenu)
if oldMenu.Name != menu.Name {
notSame := global.GVA_DB.Where("id <> ? AND name = ?", menu.ID, menu.Name).First(&model.SysBaseMenu{}).RecordNotFound()
if !notSame {
global.GVA_LOG.Debug("存在相同name修改失败")
return errors.New("存在相同name修改失败")
}
}
err = db.Updates(upDateMap).Error
global.GVA_LOG.Debug("菜单修改时候,关联菜单err:%v", err)
return err
}
// @title GetBaseMenuById
// @description get current menus, 返回当前选中menu
// @auth (2020/04/05 20:22 )
// @param newPassword string
// @auth (2020/04/05 20:22)
// @param id float64
// @return err error
func GetBaseMenuById(id float64) (err error, menu model.SysBaseMenu) {
err = global.GVA_DB.Where("id = ?", id).First(&menu).Error
return
+35 -20
View File
@@ -13,11 +13,12 @@ import (
// @title UpdateCasbin
// @description update casbin authority, 更新casbin权限
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param authorityId string
// @param casbinInfos []CasbinInfo
// @return error
func UpdateCasbin(authorityId string, casbinInfos []request.CasbinInfo) error {
func UpdateCasbin(authorityId string, casbinInfos []request.CasbinInfo) error {
ClearCasbin(0, authorityId)
for _, v := range casbinInfos {
cm := model.CasbinModel{
@@ -37,56 +38,68 @@ func UpdateCasbin(authorityId string, casbinInfos []request.CasbinInfo) error {
// @title AddCasbin
// @description add casbin authority, 添加权限
// @auth (2020/04/05 20:22 )
// @param cm CasbinModel
// @auth (2020/04/05 20:22)
// @param cm model.CasbinModel
// @return bool
func AddCasbin(cm model.CasbinModel) bool {
func AddCasbin(cm model.CasbinModel) bool {
e := Casbin()
return e.AddPolicy(cm.AuthorityId, cm.Path, cm.Method)
}
// @title UpdateCasbinApi
// @description update casbin apis, API更新随动
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param oldPath string
// @param newPath string
// @param oldMethod string
// @param newMethod string
// @return error
func UpdateCasbinApi(oldPath string, newPath string) error {
func UpdateCasbinApi(oldPath string, newPath string, oldMethod string, newMethod string) error {
var cs []model.CasbinModel
err := global.GVA_DB.Table("casbin_rule").Where("v1 = ?", oldPath).Find(&cs).Update("v1", newPath).Error
err := global.GVA_DB.Table("casbin_rule").Where("v1 = ? AND v2 = ?", oldPath, oldMethod).Find(&cs).Updates(map[string]string{
"v1": newPath,
"v2": newMethod,
}).Error
return err
}
// @title GetPolicyPathByAuthorityId
// @description get policy path by authorityId, 获取权限列表
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param authorityId string
// @return []string
func GetPolicyPathByAuthorityId(authorityId string) []string {
func GetPolicyPathByAuthorityId(authorityId string) (pathMaps []request.CasbinInfo) {
e := Casbin()
var pathList []string
list := e.GetFilteredPolicy(0, authorityId)
for _, v := range list {
pathList = append(pathList, v[1])
pathMaps = append(pathMaps, request.CasbinInfo{
Path: v[1],
Method: v[2],
})
}
return pathList
return pathMaps
}
// @title ClearCasbin
// @description 清除匹配的权限
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param v int
// @param p string
// @return bool
func ClearCasbin(v int, p string) bool {
func ClearCasbin(v int, p ...string) bool {
e := Casbin()
return e.RemoveFilteredPolicy(v, p)
return e.RemoveFilteredPolicy(v, p...)
}
// @title Casbin
// @description store to DB, 持久化到数据库 引入自定义规则
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
func Casbin() *casbin.Enforcer {
a := gormadapter.NewAdapterByDB(global.GVA_DB)
e := casbin.NewEnforcer(global.GVA_CONFIG.Casbin.ModelPath, a)
@@ -97,10 +110,11 @@ func Casbin() *casbin.Enforcer {
// @title ParamsMatch
// @description customized rule, 自定义规则函数
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param fullNameKey1 string
// @param key2 string
// @return bool
func ParamsMatch(fullNameKey1 string, key2 string) bool {
key1 := strings.Split(fullNameKey1, "?")[0]
//剥离路径后再使用casbin的keyMatch2
@@ -109,13 +123,14 @@ func ParamsMatch(fullNameKey1 string, key2 string) bool {
// @title ParamsMatchFunc
// @description customized function, 自定义规则函数
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param args ...interface{}
// @return interface{}
// @return error
func ParamsMatchFunc(args ...interface{}) (interface{}, error) {
name1 := args[0].(string)
name2 := args[1].(string)
return (bool)(ParamsMatch(name1, name2)), nil
}
}
+38 -35
View File
@@ -9,13 +9,13 @@ import (
// @title GetMenuTree
// @description 获取动态菜单树
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param authorityId string
// @return err error
// @return menus []SysMenu
func GetMenuTree(authorityId string) (err error, menus []model.SysMenu) {
sql := "SELECT authority_menu.created_at,authority_menu.updated_at,authority_menu.deleted_at,authority_menu.menu_level,authority_menu.parent_id,authority_menu.path,authority_menu.`name`,authority_menu.hidden,authority_menu.component,authority_menu.title,authority_menu.icon,authority_menu.sort,authority_menu.menu_id,authority_menu.authority_id FROM authority_menu WHERE authority_menu.authority_id = ? AND authority_menu.parent_id = ?"
// @return menus []model.SysMenu
func GetMenuTree(authorityId string) (err error, menus []model.SysMenu) {
sql := "SELECT authority_menu.keep_alive,authority_menu.default_menu,authority_menu.created_at,authority_menu.updated_at,authority_menu.deleted_at,authority_menu.menu_level,authority_menu.parent_id,authority_menu.path,authority_menu.`name`,authority_menu.hidden,authority_menu.component,authority_menu.title,authority_menu.icon,authority_menu.sort,authority_menu.menu_id,authority_menu.authority_id FROM authority_menu WHERE authority_menu.authority_id = ? AND authority_menu.parent_id = ? ORDER BY authority_menu.sort ASC"
err = global.GVA_DB.Raw(sql, authorityId, 0).Scan(&menus).Error
for i := 0; i < len(menus); i++ {
err = getChildrenList(&menus[i], sql)
@@ -25,10 +25,11 @@ func GetMenuTree(authorityId string) (err error, menus []model.SysMenu) {
// @title getChildrenList
// @description 获取子菜单
// @auth (2020/04/05 20:22 )
// @param menu *SysMenu
// @param SQLstatement string
// @auth (2020/04/05 20:22)
// @param menu *model.SysMenu
// @param sql string
// @return err error
func getChildrenList(menu *model.SysMenu, sql string) (err error) {
err = global.GVA_DB.Raw(sql, menu.AuthorityId, menu.MenuId).Scan(&menu.Children).Error
for i := 0; i < len(menu.Children); i++ {
@@ -39,30 +40,30 @@ func getChildrenList(menu *model.SysMenu, sql string) (err error) {
// @title GetInfoList
// @description 获取路由分页
// @auth (2020/04/05 20:22 )
// @param newPassword string
// @auth (2020/04/05 20:22)
// @param info request.PageInfo
// @return err error
// @return list interface{}
// @return total int
func GetInfoList(info request.PageInfo) (err error, list interface{}, total int) {
limit := info.PageSize
offset := info.PageSize * (info.Page - 1)
db := global.GVA_DB
if err != nil {
return
} else {
var menuList []model.SysBaseMenu
err = db.Limit(limit).Offset(offset).Where("parent_id = 0").Order("sort", true).Find(&menuList).Error
for i := 0; i < len(menuList); i++ {
err = getBaseChildrenList(&menuList[i])
}
return err, menuList, total
var menuList []model.SysBaseMenu
err = db.Limit(limit).Offset(offset).Where("parent_id = 0").Order("sort", true).Find(&menuList).Error
for i := 0; i < len(menuList); i++ {
err = getBaseChildrenList(&menuList[i])
}
return err, menuList, total
}
// @title getBaseChildrenList
// @description get children of menu, 获取菜单的子菜单
// @auth (2020/04/05 20:22 )
// @param menu *SysBaseMenu
// @auth (2020/04/05 20:22)
// @param menu *model.SysBaseMenu
// @return err error
func getBaseChildrenList(menu *model.SysBaseMenu) (err error) {
err = global.GVA_DB.Where("parent_id = ?", menu.ID).Order("sort", true).Find(&menu.Children).Error
for i := 0; i < len(menu.Children); i++ {
@@ -73,27 +74,28 @@ func getBaseChildrenList(menu *model.SysBaseMenu) (err error) {
// @title AddBaseMenu
// @description 函数的详细描述
// @auth (2020/04/05 20:22 )
// @param newPassword string
// @auth (2020/04/05 20:22)
// @param menu *model.SysBaseMenu
// @return err error
//增加基础路由
func AddBaseMenu(menu model.SysBaseMenu) (err error) {
func AddBaseMenu(menu model.SysBaseMenu) (err error) {
findOne := global.GVA_DB.Where("name = ?", menu.Name).Find(&model.SysBaseMenu{}).Error
if findOne != nil {
err = global.GVA_DB.Create(menu).Error
err = global.GVA_DB.Create(&menu).Error
} else {
err = errors.New("存在重复name,请修改name")
}
return err
}
// @title GetBaseMenuTree
// @description 获取基础路由树
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @return err error
// @return menus []SysBaseMenu
func GetBaseMenuTree() (err error, menus []model.SysBaseMenu) {
func GetBaseMenuTree() (err error, menus []model.SysBaseMenu) {
err = global.GVA_DB.Where(" parent_id = ?", 0).Order("sort", true).Find(&menus).Error
for i := 0; i < len(menus); i++ {
err = getBaseChildrenList(&menus[i])
@@ -103,11 +105,12 @@ func GetBaseMenuTree() (err error, menus []model.SysBaseMenu) {
// @title AddMenuAuthority
// @description 为角色增加menu树
// @auth (2020/04/05 20:22 )
// @param menus []SysBaseMenu
// @auth (2020/04/05 20:22)
// @param menus []model.SysBaseMenu
// @param authorityId string
// @return error
func AddMenuAuthority(menus []model.SysBaseMenu, authorityId string) (err error) {
func AddMenuAuthority(menus []model.SysBaseMenu, authorityId string) (err error) {
var auth model.SysAuthority
auth.AuthorityId = authorityId
auth.SysBaseMenus = menus
@@ -115,15 +118,15 @@ func AddMenuAuthority(menus []model.SysBaseMenu, authorityId string) (err error
return err
}
// @title GetMenuAuthority
// @description 查看当前角色树
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param authorityId string
// @return err error
// @return menus []SysBaseMenu
func GetMenuAuthority(authorityId string) (err error, menus []model.SysMenu) {
sql := "SELECT authority_menu.created_at,authority_menu.updated_at,authority_menu.deleted_at,authority_menu.menu_level,authority_menu.parent_id,authority_menu.path,authority_menu.`name`,authority_menu.hidden,authority_menu.component,authority_menu.title,authority_menu.icon,authority_menu.sort,authority_menu.menu_id,authority_menu.authority_id FROM authority_menu WHERE authority_menu.authority_id = ?"
func GetMenuAuthority(authorityId string) (err error, menus []model.SysMenu) {
sql := "SELECT authority_menu.keep_alive,authority_menu.default_menu,authority_menu.created_at,authority_menu.updated_at,authority_menu.deleted_at,authority_menu.menu_level,authority_menu.parent_id,authority_menu.path,authority_menu.`name`,authority_menu.hidden,authority_menu.component,authority_menu.title,authority_menu.icon,authority_menu.sort,authority_menu.menu_id,authority_menu.authority_id FROM authority_menu WHERE authority_menu.authority_id = ? ORDER BY authority_menu.sort ASC"
err = global.GVA_DB.Raw(sql, authorityId).Scan(&menus).Error
return err, menus
}
}
+8 -6
View File
@@ -9,23 +9,25 @@ import (
// @title GetSystemConfig
// @description 读取配置文件
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @return err error
// @return conf Server
func GetSystemConfig() (err error, conf config.Server) {
return nil, global.GVA_CONFIG
}
// @title SetSystemConfig
// @description set system config, 设置配置文件
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param system model.System
// @return err error
func SetSystemConfig(s model.System) (err error) {
cs := utils.StructToMap(s.Config)
func SetSystemConfig(system model.System) (err error) {
cs := utils.StructToMap(system.Config)
for k, v := range cs {
global.GVA_VP.Set(k, v)
}
err = global.GVA_VP.WriteConfig()
return err
}
}
+38 -20
View File
@@ -11,30 +11,34 @@ import (
// @title Register
// @description register, 用户注册
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param u model.SysUser
// @return err error
// @return userInter *SysUser
func Register(u *model.SysUser) (err error, userInter *model.SysUser) {
func Register(u model.SysUser) (err error, userInter model.SysUser) {
var user model.SysUser
//判断用户名是否注册
notRegister := global.GVA_DB.Where("username = ?", u.Username).First(&user).RecordNotFound()
//notRegister为false表明读取到了 不能注册
if !notRegister {
return errors.New("用户名已注册"), nil
return errors.New("用户名已注册"), userInter
} else {
// 否则 附加uuid 密码md5简单加密 注册
u.Password = utils.MD5V([]byte(u.Password))
u.UUID = uuid.NewV4()
err = global.GVA_DB.Create(u).Error
err = global.GVA_DB.Create(&u).Error
}
return err, u
}
// @title Login
// @description login, 用户登录
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param u *model.SysUser
// @return err error
// @return userInter *SysUser
func Login(u *model.SysUser) (err error, userInter *model.SysUser) {
var user model.SysUser
u.Password = utils.MD5V([]byte(u.Password))
@@ -48,11 +52,13 @@ func Login(u *model.SysUser) (err error, userInter *model.SysUser) {
// @title ChangePassword
// @description change the password of a certain user, 修改用户密码
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param u *model.SysUser
// @param newPassword string
// @return err error
// @return userInter *SysUser
func ChangePassword(u *model.SysUser, newPassword string) (err error, userInter *model.SysUser) {
func ChangePassword(u *model.SysUser, newPassword string) (err error, userInter *model.SysUser) {
var user model.SysUser
//后期修改jwt+password模式
u.Password = utils.MD5V([]byte(u.Password))
@@ -62,45 +68,57 @@ func ChangePassword(u *model.SysUser, newPassword string) (err error, userInter
// @title GetInfoList
// @description get user list by pagination, 分页获取数据
// @auth (2020/04/05 20:22 )
// @param PageInfo int
// @auth (2020/04/05 20:22)
// @param info request.PageInfo
// @return err error
// @return list interface{}
// @return total int
func GetUserInfoList(info request.PageInfo) (err error, list interface{}, total int) {
limit := info.PageSize
offset := info.PageSize * (info.Page - 1)
db := global.GVA_DB
if err != nil {
return
} else {
var userList []model.SysUser
err = db.Limit(limit).Offset(offset).Preload("Authority").Find(&userList).Error
return err, userList, total
}
var userList []model.SysUser
err = db.Find(&userList).Count(&total).Error
err = db.Limit(limit).Offset(offset).Preload("Authority").Find(&userList).Error
return err, userList, total
}
// @title SetUserAuthority
// @description set the authority of a certain user, 设置一个用户的权限
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param uuid UUID
// @param authorityId string
// @return err error
func SetUserAuthority(uuid uuid.UUID, authorityId string) (err error) {
func SetUserAuthority(uuid uuid.UUID, authorityId string) (err error) {
err = global.GVA_DB.Where("uuid = ?", uuid).First(&model.SysUser{}).Update("authority_id", authorityId).Error
return err
}
// @title SetUserAuthority
// @description set the authority of a certain user, 设置一个用户的权限
// @auth (2020/04/05 20:22)
// @param uuid UUID
// @param authorityId string
// @return err error
func DeleteUser(id float64) (err error) {
var user model.SysUser
err = global.GVA_DB.Where("id = ?", id).Delete(&user).Error
return err
}
// @title UploadHeaderImg
// @description upload avatar, 用户头像上传更新地址
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param uuid UUID
// @param filePath string
// @return err error
// @return userInter *SysUser
func UploadHeaderImg(uuid uuid.UUID, filePath string) (err error, userInter *model.SysUser) {
var user model.SysUser
err = global.GVA_DB.Where("uuid = ?", uuid).First(&user).Update("header_img", filePath).First(&user).Error
return err, &user
}
+3 -1
View File
@@ -7,8 +7,10 @@ import (
// @title Create
// @description create a workflow, 创建工作流
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param wk model.SysWorkflow
// @return error
func Create(wk model.SysWorkflow) error {
err := global.GVA_DB.Create(&wk).Error
return err
+20 -3
View File
@@ -1,12 +1,16 @@
package utils
import "os"
import (
"os"
"path/filepath"
)
// @title PathExists
// @description 文件目录是否存在
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param path string
// @return err error
func PathExists(path string) (bool, error) {
_, err := os.Stat(path)
if err == nil {
@@ -20,9 +24,10 @@ func PathExists(path string) (bool, error) {
// @title createDir
// @description 批量创建文件夹
// @auth (2020/04/05 20:22 )
// @auth (2020/04/05 20:22)
// @param dirs string
// @return err error
func CreateDir(dirs ...string) (err error) {
for _, v := range dirs {
exist, err := PathExists(v)
@@ -45,3 +50,15 @@ func CreateDir(dirs ...string) (err error) {
}
return err
}
// @title cwd
// @description 获取当前工作目录
// @return string
func CWD() string {
path, err := os.Executable()
if err != nil {
return ""
}
return filepath.Dir(path)
}