1
This commit is contained in:
commit
d28a4f7303
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
19
.idea/compiler.xml
generated
Normal file
19
.idea/compiler.xml
generated
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile default="true" name="Default" enabled="true" />
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="magic-boot" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
<component name="JavacSettings">
|
||||
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
||||
<module name="magic-boot" options="-parameters" />
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
8
.idea/encodings.xml
generated
Normal file
8
.idea/encodings.xml
generated
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/magic-boot/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
25
.idea/jarRepositories.xml
generated
Normal file
25
.idea/jarRepositories.xml
generated
Normal file
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
12
.idea/misc.xml
generated
Normal file
12
.idea/misc.xml
generated
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
|
||||
</project>
|
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
36
README.en.md
Normal file
36
README.en.md
Normal file
@ -0,0 +1,36 @@
|
||||
# 天河科技CRM+U9
|
||||
|
||||
#### Description
|
||||
天河科技CRM+U9
|
||||
|
||||
#### Software Architecture
|
||||
Software architecture description
|
||||
|
||||
#### Installation
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Instructions
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Contribution
|
||||
|
||||
1. Fork the repository
|
||||
2. Create Feat_xxx branch
|
||||
3. Commit your code
|
||||
4. Create Pull Request
|
||||
|
||||
|
||||
#### Gitee Feature
|
||||
|
||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
14
data/magic-api/api/B-传输日志/group.json
Normal file
14
data/magic-api/api/B-传输日志/group.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "1500ff0ba1a64b3796ec9114e568869e",
|
||||
"name" : "B-传输日志",
|
||||
"type" : "api",
|
||||
"parentId" : "0",
|
||||
"path" : "/send",
|
||||
"createTime" : 1684243742014,
|
||||
"updateTime" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"paths" : [ ],
|
||||
"options" : [ ]
|
||||
}
|
14
data/magic-api/api/B-传输日志/日志/group.json
Normal file
14
data/magic-api/api/B-传输日志/日志/group.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "6ee06a9b9fe04b85b70a9364ef324ab4",
|
||||
"name" : "传输日志",
|
||||
"type" : "api",
|
||||
"parentId" : "1500ff0ba1a64b3796ec9114e568869e",
|
||||
"path" : "/log",
|
||||
"createTime" : 1684243742032,
|
||||
"updateTime" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"paths" : [ ],
|
||||
"options" : [ ]
|
||||
}
|
50
data/magic-api/api/B-传输日志/日志/保存.ms
Normal file
50
data/magic-api/api/B-传输日志/日志/保存.ms
Normal file
@ -0,0 +1,50 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "d0c872104e524be0862e004fe29771c3",
|
||||
"script" : null,
|
||||
"groupId" : "6ee06a9b9fe04b85b70a9364ef324ab4",
|
||||
"name" : "保存",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1740193136821,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/save",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"options" : [ {
|
||||
"name" : "wrap_request_parameter",
|
||||
"value" : "data",
|
||||
"description" : null,
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
}, {
|
||||
"name" : "permission",
|
||||
"value" : "send:log:save",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
data.create_time = new Date()
|
||||
return db.table('send_log_plmbom').primary('log_id',uuid()).save(data)
|
50
data/magic-api/api/B-传输日志/日志/保存设备BOM.ms
Normal file
50
data/magic-api/api/B-传输日志/日志/保存设备BOM.ms
Normal file
@ -0,0 +1,50 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "copy1724404999212d47014",
|
||||
"script" : null,
|
||||
"groupId" : "6ee06a9b9fe04b85b70a9364ef324ab4",
|
||||
"name" : "保存设备BOM",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1741679160582,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/savesbbom",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"options" : [ {
|
||||
"name" : "wrap_request_parameter",
|
||||
"value" : "data",
|
||||
"description" : null,
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
}, {
|
||||
"name" : "permission",
|
||||
"value" : "send:log:save",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
data.create_time = new Date()
|
||||
return db.table('send_log_sbbom').primary('log_id',uuid()).save(data)
|
47
data/magic-api/api/B-传输日志/日志/列表.ms
Normal file
47
data/magic-api/api/B-传输日志/日志/列表.ms
Normal file
@ -0,0 +1,47 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "ed67a93b6ded41029fdb69f3f3420fb9",
|
||||
"script" : null,
|
||||
"groupId" : "6ee06a9b9fe04b85b70a9364ef324ab4",
|
||||
"name" : "列表",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1699275219305,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/list",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"options" : [ {
|
||||
"name" : "permission",
|
||||
"value" : "send:log:view",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
return db.page("""
|
||||
select log_id,log_type,log_status,syn_type,data_id,create_time,data_name,mark,res_body,send_flag,send_memo from send_log_info where 1=1
|
||||
?{logType, and log_type = #{logType} }
|
||||
?{logStatus, and log_status = #{logStatus} }
|
||||
?{synType, and syn_type = #{synType} }
|
||||
?{dataId, and data_id = #{dataId} }
|
||||
?{dataName, and data_name = #{dataName} }
|
||||
?{createTime && createTime.split(',')[0], and create_time >= #{createTime.split(',')[0]}}
|
||||
?{createTime && createTime.split(',')[1], and create_time <= #{createTime.split(',')[1]}}
|
||||
?{sendFlag, and send_flag = #{sendFlag} } order by create_time desc
|
||||
""")
|
37
data/magic-api/api/B-传输日志/日志/删除.ms
Normal file
37
data/magic-api/api/B-传输日志/日志/删除.ms
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "f2d89c16aa424d74b9d6e944ea138998",
|
||||
"script" : null,
|
||||
"groupId" : "6ee06a9b9fe04b85b70a9364ef324ab4",
|
||||
"name" : "删除",
|
||||
"createTime" : 1696953066814,
|
||||
"updateTime" : null,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/delete",
|
||||
"method" : "DELETE",
|
||||
"parameters" : [ ],
|
||||
"options" : [ {
|
||||
"name" : "permission",
|
||||
"value" : "send:log:delete",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : null,
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
return db.table('send_log_info').where().eq('log_id', log_id).delete()
|
39
data/magic-api/api/B-传输日志/日志/详情.ms
Normal file
39
data/magic-api/api/B-传输日志/日志/详情.ms
Normal file
@ -0,0 +1,39 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "33b0df7daae64483b6c7067755ca7b68",
|
||||
"script" : null,
|
||||
"groupId" : "6ee06a9b9fe04b85b70a9364ef324ab4",
|
||||
"name" : "详情",
|
||||
"createTime" : 1696953066831,
|
||||
"updateTime" : null,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/get",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"options" : [ {
|
||||
"name" : "permission",
|
||||
"value" : "send:log:view",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : null,
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
return db.selectOne("""
|
||||
select log_id,log_type,log_status,syn_type,data_id,create_time,data_name,res_body,send_flag,send_memo from send_log_info where log_id = #{log_id}
|
||||
""")
|
126
data/magic-api/api/B-同步日志/PLMBOM保存.ms
Normal file
126
data/magic-api/api/B-同步日志/PLMBOM保存.ms
Normal file
@ -0,0 +1,126 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "copy1701349941295d22163",
|
||||
"script" : null,
|
||||
"groupId" : "4506c21162d24d4c81bad5bc8707672a",
|
||||
"name" : "PLMBOM保存",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1740044319573,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/save",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"options" : [ {
|
||||
"name" : "wrap_request_parameter",
|
||||
"value" : "data",
|
||||
"description" : null,
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
}, {
|
||||
"name" : "permission",
|
||||
"value" : "send:log:save",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": \"17a8bc5553e2400badd36ea784255c01\",\n \"timestamp\": 1701350036264,\n \"executeTime\": 4\n}",
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : {
|
||||
"name" : "",
|
||||
"value" : "",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Object",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ {
|
||||
"name" : "code",
|
||||
"value" : "200",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Integer",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "message",
|
||||
"value" : "success",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "data",
|
||||
"value" : "17a8bc5553e2400badd36ea784255c01",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "timestamp",
|
||||
"value" : "1701350036264",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Long",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "executeTime",
|
||||
"value" : "4",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Integer",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
}
|
||||
}
|
||||
================================
|
||||
|
||||
|
||||
|
||||
data.create_time = new Date()
|
||||
return db.table("send_syn_plmbom").primary('send_id', () => uuid())
|
||||
.save(data)
|
14
data/magic-api/api/B-同步日志/group.json
Normal file
14
data/magic-api/api/B-同步日志/group.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "4506c21162d24d4c81bad5bc8707672a",
|
||||
"name" : "B-同步日志",
|
||||
"type" : "api",
|
||||
"parentId" : "0",
|
||||
"path" : "/syn",
|
||||
"createTime" : 1701349598045,
|
||||
"updateTime" : 1701349674007,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"paths" : [ ],
|
||||
"options" : [ ]
|
||||
}
|
126
data/magic-api/api/B-同步日志/修改.ms
Normal file
126
data/magic-api/api/B-同步日志/修改.ms
Normal file
@ -0,0 +1,126 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "copy1701349998399d81042",
|
||||
"script" : null,
|
||||
"groupId" : "4506c21162d24d4c81bad5bc8707672a",
|
||||
"name" : "修改",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1740193090239,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/update",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"options" : [ {
|
||||
"name" : "wrap_request_parameter",
|
||||
"value" : "data",
|
||||
"description" : null,
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
}, {
|
||||
"name" : "permission",
|
||||
"value" : "send:log:save",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : "{\n \"code\": 500,\n \"message\": \"系统内部出现错误\",\n \"data\": null,\n \"timestamp\": 1701350039104,\n \"executeTime\": 4\n}",
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : {
|
||||
"name" : "",
|
||||
"value" : "",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Object",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ {
|
||||
"name" : "code",
|
||||
"value" : "500",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Integer",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "message",
|
||||
"value" : "系统内部出现错误",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "data",
|
||||
"value" : "null",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Object",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "timestamp",
|
||||
"value" : "1701350039104",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Long",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "executeTime",
|
||||
"value" : "4",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Integer",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
}
|
||||
}
|
||||
================================
|
||||
|
||||
|
||||
|
||||
data.update_time = new Date()
|
||||
return db.table("send_syn_plmbom").primary('send_id')
|
||||
.update(data)
|
173
data/magic-api/api/B-同步日志/查询.ms
Normal file
173
data/magic-api/api/B-同步日志/查询.ms
Normal file
@ -0,0 +1,173 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "95d66a27a4794b8c8126ad131743da56",
|
||||
"script" : null,
|
||||
"groupId" : "4506c21162d24d4c81bad5bc8707672a",
|
||||
"name" : "查询",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1742968099755,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/query",
|
||||
"method" : "GET",
|
||||
"parameters" : [ {
|
||||
"name" : "sendType",
|
||||
"value" : "TuiHuo",
|
||||
"description" : null,
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
}, {
|
||||
"name" : "sendStatus3",
|
||||
"value" : "3",
|
||||
"description" : null,
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
}, {
|
||||
"name" : "crmId",
|
||||
"value" : "665532391d23d0000111cab9",
|
||||
"description" : null,
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
}, {
|
||||
"name" : "sendSyn",
|
||||
"value" : "0",
|
||||
"description" : null,
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": [],\n \"timestamp\": 1716889610473,\n \"executeTime\": 8\n}",
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : {
|
||||
"name" : "",
|
||||
"value" : "",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Object",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ {
|
||||
"name" : "code",
|
||||
"value" : "200",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Integer",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "message",
|
||||
"value" : "success",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "data",
|
||||
"value" : "",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Array",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "timestamp",
|
||||
"value" : "1716889610473",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Long",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "executeTime",
|
||||
"value" : "8",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Integer",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
}
|
||||
}
|
||||
================================
|
||||
//查询本机mysql
|
||||
return db.select(
|
||||
"""
|
||||
SELECT * FROM `send_syn_plmbom` where
|
||||
send_type=#{sendType}
|
||||
<if test="dataId != null">
|
||||
and dsf_id=#{dataId}
|
||||
</if>
|
||||
<if test="datapId != null">
|
||||
and dsfzhu_id=#{datapId}
|
||||
</if>
|
||||
<if test="sendSyn != null">
|
||||
and send_syn=#{sendSyn}
|
||||
</if>
|
||||
<if test="sendStatus != null">
|
||||
and send_status=#{sendStatus}
|
||||
</if>
|
||||
<if test="crmId != null">
|
||||
and crm_id=#{crmId}
|
||||
</if>
|
||||
<if test="dsfId != null">
|
||||
and dsf_id=#{dsfId}
|
||||
</if>
|
||||
<if test="sendStatus3 != null">
|
||||
and send_status!=#{sendStatus3}
|
||||
</if>
|
||||
order by create_time desc
|
||||
|
||||
""");
|
173
data/magic-api/api/B-同步日志/查询new.ms
Normal file
173
data/magic-api/api/B-同步日志/查询new.ms
Normal file
@ -0,0 +1,173 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "copy1732497876949d77458",
|
||||
"script" : null,
|
||||
"groupId" : "4506c21162d24d4c81bad5bc8707672a",
|
||||
"name" : "查询new",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1732497893388,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/querynew",
|
||||
"method" : "GET",
|
||||
"parameters" : [ {
|
||||
"name" : "sendType",
|
||||
"value" : "TuiHuo",
|
||||
"description" : null,
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
}, {
|
||||
"name" : "sendStatus3",
|
||||
"value" : "3",
|
||||
"description" : null,
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
}, {
|
||||
"name" : "crmId",
|
||||
"value" : "665532391d23d0000111cab9",
|
||||
"description" : null,
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
}, {
|
||||
"name" : "sendSyn",
|
||||
"value" : "0",
|
||||
"description" : null,
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": [],\n \"timestamp\": 1716889610473,\n \"executeTime\": 8\n}",
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : {
|
||||
"name" : "",
|
||||
"value" : "",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Object",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ {
|
||||
"name" : "code",
|
||||
"value" : "200",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Integer",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "message",
|
||||
"value" : "success",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "data",
|
||||
"value" : "",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Array",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "timestamp",
|
||||
"value" : "1716889610473",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Long",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "executeTime",
|
||||
"value" : "8",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Integer",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
}
|
||||
}
|
||||
================================
|
||||
//查询本机mysql
|
||||
return db.select(
|
||||
"""
|
||||
SELECT crm_json,send_id FROM `send_syn_info` where
|
||||
send_type=#{sendType}
|
||||
<if test="dataId != null">
|
||||
and dsf_id=#{dataId}
|
||||
</if>
|
||||
<if test="datapId != null">
|
||||
and dsfzhu_id=#{datapId}
|
||||
</if>
|
||||
<if test="sendSyn != null">
|
||||
and send_syn=#{sendSyn}
|
||||
</if>
|
||||
<if test="sendStatus != null">
|
||||
and send_status=#{sendStatus}
|
||||
</if>
|
||||
<if test="crmId != null">
|
||||
and crm_id=#{crmId}
|
||||
</if>
|
||||
<if test="dsfId != null">
|
||||
and dsf_id=#{dsfId}
|
||||
</if>
|
||||
<if test="sendStatus3 != null">
|
||||
and send_status!=#{sendStatus3}
|
||||
</if>
|
||||
order by create_time desc
|
||||
|
||||
""");
|
14
data/magic-api/component/传输日志/group.json
Normal file
14
data/magic-api/component/传输日志/group.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "710c9f13f48248a382e695af54270dd6",
|
||||
"name" : "传输日志",
|
||||
"type" : "component",
|
||||
"parentId" : "0",
|
||||
"path" : "/send",
|
||||
"createTime" : 1684243742087,
|
||||
"updateTime" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"paths" : [ ],
|
||||
"options" : [ ]
|
||||
}
|
14
data/magic-api/component/传输日志/传输日志/group.json
Normal file
14
data/magic-api/component/传输日志/传输日志/group.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "24eb9e08fa46447db43eba7618df7cc7",
|
||||
"name" : "传输日志",
|
||||
"type" : "component",
|
||||
"parentId" : "710c9f13f48248a382e695af54270dd6",
|
||||
"path" : "/log",
|
||||
"createTime" : 1684243742092,
|
||||
"updateTime" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"paths" : [ ],
|
||||
"options" : [ ]
|
||||
}
|
238
data/magic-api/component/传输日志/传输日志/列表.ms
Normal file
238
data/magic-api/component/传输日志/传输日志/列表.ms
Normal file
@ -0,0 +1,238 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "49575ce482694a50ab641e9835c64865",
|
||||
"script" : null,
|
||||
"groupId" : "24eb9e08fa46447db43eba7618df7cc7",
|
||||
"name" : "列表",
|
||||
"createTime" : 1684253377806,
|
||||
"updateTime" : 1684253426051,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/list",
|
||||
"description" : null
|
||||
}
|
||||
================================
|
||||
<template>
|
||||
<mb-list ref="magicList" v-bind="listOptions" />
|
||||
<mb-dialog ref="formDialog" :title="magicFormTitle" @confirm-click="magicForm.save($event)" width="50%">
|
||||
<template #content>
|
||||
<mb-form ref="magicForm" @reload="magicList.reload" v-bind="formOptions" />
|
||||
</template>
|
||||
</mb-dialog>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, reactive, getCurrentInstance, nextTick } from 'vue'
|
||||
const { proxy } = getCurrentInstance()
|
||||
const formDialog = ref()
|
||||
const magicList = ref()
|
||||
const magicForm = ref()
|
||||
const magicFormTitle = ref()
|
||||
const listOptions = reactive({
|
||||
tools: [{
|
||||
type: 'add',
|
||||
permission: 'send:log:save',
|
||||
click: () => {
|
||||
magicFormTitle.value = '添加'
|
||||
formDialog.value.show(() => magicForm.value.initFormData())
|
||||
}
|
||||
}],
|
||||
table: {
|
||||
url: '/send/log/list',
|
||||
where: {
|
||||
logType: {
|
||||
label: '业务类型',
|
||||
component: 'select',
|
||||
props: {
|
||||
type: '业务类型'
|
||||
}
|
||||
},
|
||||
logStatus: {
|
||||
label: '同步状态',
|
||||
component: 'select',
|
||||
props: {
|
||||
type: '同步状态'
|
||||
}
|
||||
},
|
||||
synType: {
|
||||
label: '同步类型',
|
||||
component: 'select',
|
||||
props: {
|
||||
type: '同步类型'
|
||||
}
|
||||
},
|
||||
dataId: {
|
||||
label: '数据id',
|
||||
component: 'input'
|
||||
},
|
||||
dataName: {
|
||||
label: '数据名称',
|
||||
component: 'input'
|
||||
},
|
||||
createTime: {
|
||||
component: 'date',
|
||||
label: '创建时间',
|
||||
props: {
|
||||
type: 'daterange'
|
||||
}
|
||||
},
|
||||
sendFlag: {
|
||||
label: '重新发送',
|
||||
component: 'select',
|
||||
props: {
|
||||
type: '重新发送'
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
cols: [
|
||||
{
|
||||
field: 'logId',
|
||||
label: '主键'
|
||||
},
|
||||
{
|
||||
field: 'logType',
|
||||
label: '业务类型',
|
||||
dictType: '业务类型'
|
||||
},
|
||||
{
|
||||
field: 'logStatus',
|
||||
label: '同步状态',
|
||||
dictType: '同步状态'
|
||||
},
|
||||
{
|
||||
field: 'synType',
|
||||
label: '同步类型',
|
||||
dictType: '同步类型'
|
||||
},
|
||||
{
|
||||
field: 'dataId',
|
||||
label: '数据id'
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
label: '创建时间'
|
||||
},
|
||||
{
|
||||
field: 'dataName',
|
||||
label: '数据名称'
|
||||
},
|
||||
{
|
||||
field: 'resBody',
|
||||
label: '返回值'
|
||||
},
|
||||
{
|
||||
field: 'sendFlag',
|
||||
label: '重新发送',
|
||||
dictType: '重新发送'
|
||||
},
|
||||
{
|
||||
field: 'sendMemo',
|
||||
label: '备注'
|
||||
},{
|
||||
label: '操作',
|
||||
type: 'btns',
|
||||
width: 140,
|
||||
fixed: 'right',
|
||||
btns: [
|
||||
{
|
||||
permission: 'send:log:delete',
|
||||
label: '重新发起同步',
|
||||
type: 'primary',
|
||||
link: true,
|
||||
icon: 'ElIconDelete',
|
||||
click: (row) => {
|
||||
proxy.$alert(`确定重新发起“${row.dataName}”数据同步么?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: (action) => {
|
||||
if (action === 'confirm') {
|
||||
proxy.$post('/send/log/save',{ log_id: row.logId,send_flag: "1"}).then(() => {
|
||||
magicList.value.reload()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
|
||||
const formOptions = reactive({
|
||||
detail: {
|
||||
request: {
|
||||
url: '/send/log/get'
|
||||
}
|
||||
},
|
||||
form: {
|
||||
request: {
|
||||
url: "/send/log/save"
|
||||
},
|
||||
rows: [{
|
||||
gutter: 24,
|
||||
cols: [{
|
||||
span: 12,
|
||||
name: 'logType',
|
||||
label: '业务类型',
|
||||
component: 'select',
|
||||
props: {
|
||||
type: '业务类型'
|
||||
}
|
||||
},{
|
||||
span: 12,
|
||||
name: 'logStatus',
|
||||
label: '同步状态',
|
||||
component: 'select',
|
||||
props: {
|
||||
type: '同步状态'
|
||||
}
|
||||
},{
|
||||
span: 12,
|
||||
name: 'synType',
|
||||
label: '同步类型',
|
||||
component: 'select',
|
||||
props: {
|
||||
type: '同步类型'
|
||||
}
|
||||
},{
|
||||
span: 12,
|
||||
name: 'dataId',
|
||||
label: '数据id',
|
||||
component: 'input'
|
||||
},{
|
||||
span: 12,
|
||||
name: 'createTime',
|
||||
label: '创建时间',
|
||||
component: 'input'
|
||||
},{
|
||||
span: 12,
|
||||
name: 'dataName',
|
||||
label: '数据名称',
|
||||
component: 'input'
|
||||
},{
|
||||
span: 12,
|
||||
name: 'resBody',
|
||||
label: '返回值',
|
||||
component: 'input'
|
||||
},{
|
||||
span: 12,
|
||||
name: 'sendFlag',
|
||||
label: '重新发送',
|
||||
component: 'select',
|
||||
props: {
|
||||
type: '重新发送'
|
||||
}
|
||||
},{
|
||||
span: 12,
|
||||
name: 'sendMemo',
|
||||
label: '备注',
|
||||
component: 'input'
|
||||
}]
|
||||
}]
|
||||
}
|
||||
})
|
||||
</script>
|
10
data/magic-api/component/数据管理/group.json
Normal file
10
data/magic-api/component/数据管理/group.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "55ff62aa20144b7bb5c6dfb5d76c8139",
|
||||
"name" : "数据管理",
|
||||
"type" : "component",
|
||||
"parentId" : "0",
|
||||
"path" : "/data",
|
||||
"paths" : [ ],
|
||||
"options" : [ ]
|
||||
}
|
10
data/magic-api/component/数据管理/测试生成/group.json
Normal file
10
data/magic-api/component/数据管理/测试生成/group.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "eb5dbed949de4f50ba4bf59f483252a5",
|
||||
"name" : "测试生成",
|
||||
"type" : "component",
|
||||
"parentId" : "55ff62aa20144b7bb5c6dfb5d76c8139",
|
||||
"path" : "/test",
|
||||
"paths" : [ ],
|
||||
"options" : [ ]
|
||||
}
|
166
data/magic-api/component/数据管理/测试生成/列表.ms
Normal file
166
data/magic-api/component/数据管理/测试生成/列表.ms
Normal file
@ -0,0 +1,166 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "5770db2417964e91a87544a3d3ceb807",
|
||||
"script" : null,
|
||||
"groupId" : "eb5dbed949de4f50ba4bf59f483252a5",
|
||||
"name" : "列表",
|
||||
"createTime" : 1702995342933,
|
||||
"updateTime" : null,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/list",
|
||||
"description" : null
|
||||
}
|
||||
================================
|
||||
<template>
|
||||
<mb-list ref="magicList" v-bind="listOptions" />
|
||||
<mb-dialog ref="formDialog" :title="magicFormTitle" @confirm-click="magicForm.save($event)" width="50%">
|
||||
<template #content>
|
||||
<mb-form ref="magicForm" @reload="magicList.reload" v-bind="formOptions" />
|
||||
</template>
|
||||
</mb-dialog>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, reactive, getCurrentInstance, nextTick } from 'vue'
|
||||
const { proxy } = getCurrentInstance()
|
||||
const formDialog = ref()
|
||||
const magicList = ref()
|
||||
const magicForm = ref()
|
||||
const magicFormTitle = ref()
|
||||
const listOptions = reactive({
|
||||
tools: [{
|
||||
type: 'add',
|
||||
permission: 'data:test:save',
|
||||
click: () => {
|
||||
magicFormTitle.value = '添加'
|
||||
formDialog.value.show(() => magicForm.value.initFormData())
|
||||
}
|
||||
}],
|
||||
table: {
|
||||
url: '/data/test/list',
|
||||
where: {
|
||||
name: {
|
||||
label: '名字',
|
||||
component: 'input'
|
||||
},
|
||||
sex: {
|
||||
label: '性别',
|
||||
component: 'select',
|
||||
props: {
|
||||
type: 'sex'
|
||||
}
|
||||
},
|
||||
headPortrait: {
|
||||
label: '头像',
|
||||
component: 'upload-image'
|
||||
},
|
||||
remarks: {
|
||||
label: '备注',
|
||||
component: 'input',
|
||||
props: {
|
||||
type: 'textarea'
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
cols: [
|
||||
{
|
||||
field: 'name',
|
||||
label: '名字'
|
||||
},
|
||||
{
|
||||
field: 'sex',
|
||||
label: '性别',
|
||||
dictType: 'sex'
|
||||
},
|
||||
{
|
||||
field: 'headPortrait',
|
||||
label: '头像',
|
||||
type: 'image'
|
||||
},
|
||||
{
|
||||
field: 'remarks',
|
||||
label: '备注'
|
||||
},{
|
||||
label: '操作',
|
||||
type: 'btns',
|
||||
width: 140,
|
||||
fixed: 'right',
|
||||
btns: [
|
||||
{
|
||||
permission: 'data:test:save',
|
||||
label: '修改',
|
||||
type: 'primary',
|
||||
link: true,
|
||||
icon: 'ElIconEdit',
|
||||
click: (row) => {
|
||||
magicFormTitle.value = '修改'
|
||||
formDialog.value.show(() => magicForm.value.getDetail(row.id))
|
||||
}
|
||||
}, {
|
||||
permission: 'data:test:delete',
|
||||
label: '删除',
|
||||
type: 'primary',
|
||||
link: true,
|
||||
icon: 'ElIconDelete',
|
||||
click: (row) => {
|
||||
proxy.$common.handleDelete({
|
||||
url: '/data/test/delete',
|
||||
id: row.id,
|
||||
done: () => magicList.value.reload()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
|
||||
const formOptions = reactive({
|
||||
detail: {
|
||||
request: {
|
||||
url: '/data/test/get'
|
||||
}
|
||||
},
|
||||
form: {
|
||||
request: {
|
||||
url: "/data/test/save"
|
||||
},
|
||||
rows: [{
|
||||
gutter: 24,
|
||||
cols: [{
|
||||
span: 12,
|
||||
name: 'name',
|
||||
label: '名字',
|
||||
component: 'input',
|
||||
rules: [{ required: true, message: '请输入名字', trigger: 'change' }]
|
||||
},{
|
||||
span: 12,
|
||||
name: 'sex',
|
||||
label: '性别',
|
||||
component: 'select',
|
||||
props: {
|
||||
type: 'sex'
|
||||
}
|
||||
},{
|
||||
span: 12,
|
||||
name: 'headPortrait',
|
||||
label: '头像',
|
||||
component: 'upload-image',
|
||||
rules: [{ required: true, message: '请选择头像', trigger: 'change' }]
|
||||
},{
|
||||
span: 12,
|
||||
name: 'remarks',
|
||||
label: '备注',
|
||||
component: 'input',
|
||||
props: {
|
||||
type: 'textarea'
|
||||
}
|
||||
|
||||
}]
|
||||
}]
|
||||
}
|
||||
})
|
||||
</script>
|
10
data/magic-api/function/权限/group.json
Normal file
10
data/magic-api/function/权限/group.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "41922e26ef57421f8819fe6c59f14d63",
|
||||
"name" : "权限",
|
||||
"type" : "function",
|
||||
"parentId" : "0",
|
||||
"path" : "/permission",
|
||||
"paths" : [ ],
|
||||
"options" : [ ]
|
||||
}
|
54
data/magic-api/function/权限/组织机构.ms
Normal file
54
data/magic-api/function/权限/组织机构.ms
Normal file
@ -0,0 +1,54 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "a5f80b11b7fb4f3c97252331c80bcf85",
|
||||
"script" : null,
|
||||
"groupId" : "41922e26ef57421f8819fe6c59f14d63",
|
||||
"name" : "组织机构",
|
||||
"createTime" : 1646490239535,
|
||||
"updateTime" : 1642327198030,
|
||||
"lock" : "0",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/office",
|
||||
"description" : null,
|
||||
"returnType" : null,
|
||||
"mappingPath" : "/permission/office",
|
||||
"parameters" : [ ]
|
||||
}
|
||||
================================
|
||||
import 'cn.dev33.satoken.stp.StpUtil';
|
||||
|
||||
var currentUserId = StpUtil.getLoginId()
|
||||
//查出当前用户有多少角色
|
||||
var roles = db.select("""
|
||||
select permission from sys_role where is_del = 0 and id in (select role_id from sys_user_role where user_id = #{currentUserId})
|
||||
""")
|
||||
var userIds = []
|
||||
for(role in roles){
|
||||
if(role.permission == '0'){
|
||||
return []
|
||||
}else if(role.permission == '1'){
|
||||
userIds.addAll(db.select("""
|
||||
select id from sys_user where is_del = 0 and office_id in (
|
||||
select office_id from sys_role_office where role_id in (
|
||||
select role_id from sys_user_role where user_id = #{currentUserId}
|
||||
)
|
||||
)
|
||||
""").map(it => it.id))
|
||||
}else{
|
||||
var officeId = db.selectValue("select office_id from sys_user where id = #{currentUserId}")
|
||||
var offices = []
|
||||
offices.push(officeId)
|
||||
var getOfficeId = (list,pid) => {
|
||||
var ids = select t.id from list t where t.pid = pid;
|
||||
for(it in ids){
|
||||
offices.push(it.id)
|
||||
getOfficeId(list,it.id)
|
||||
}
|
||||
}
|
||||
getOfficeId(db.select('select id, pid from sys_office where is_del = 0 order by sort'),officeId)
|
||||
userIds.addAll(db.select("select id from sys_user where office_id in (#{offices})").map(it => it.id))
|
||||
}
|
||||
}
|
||||
|
||||
return userIds
|
14
data/magic-api/function/配置中心/group.json
Normal file
14
data/magic-api/function/配置中心/group.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "7e31035eb8d4471b9fc2923ea1d966c3",
|
||||
"name" : "配置中心",
|
||||
"type" : "function",
|
||||
"parentId" : "0",
|
||||
"path" : "configure",
|
||||
"createTime" : 1653109451626,
|
||||
"updateTime" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"paths" : [ ],
|
||||
"options" : [ ]
|
||||
}
|
48
data/magic-api/function/配置中心/根据keyAndcondition获取数据值.ms
Normal file
48
data/magic-api/function/配置中心/根据keyAndcondition获取数据值.ms
Normal file
@ -0,0 +1,48 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "copy1653111178446d65648",
|
||||
"script" : null,
|
||||
"groupId" : "7e31035eb8d4471b9fc2923ea1d966c3",
|
||||
"name" : "根据keyAndcondition获取数据值",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1653118303409,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/getBykeyCondition",
|
||||
"description" : null,
|
||||
"returnType" : null,
|
||||
"mappingPath" : null,
|
||||
"parameters" : [ {
|
||||
"name" : "configureKey",
|
||||
"value" : null,
|
||||
"description" : null,
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : "java.lang.String",
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
}, {
|
||||
"name" : "configureCondition",
|
||||
"value" : null,
|
||||
"description" : null,
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : "java.lang.String",
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ]
|
||||
}
|
||||
================================
|
||||
var configure = db.cache(`configure:${configureKey}${configureCondition}`).selectOne("""
|
||||
select configure_value from sys_configure where configure_key = #{configureKey}
|
||||
?{configureCondition, and configure_condition = #{configureCondition}}
|
||||
""")
|
||||
|
||||
return configure == null ? "" : configure.get("configureValue")
|
48
data/magic-api/function/配置中心/根据keyLikeCondition获取数据值.ms
Normal file
48
data/magic-api/function/配置中心/根据keyLikeCondition获取数据值.ms
Normal file
@ -0,0 +1,48 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "copy1653112036134d44643",
|
||||
"script" : null,
|
||||
"groupId" : "7e31035eb8d4471b9fc2923ea1d966c3",
|
||||
"name" : "根据keyLikeCondition获取数据值",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1653118334978,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/getLikeCondition",
|
||||
"description" : null,
|
||||
"returnType" : null,
|
||||
"mappingPath" : null,
|
||||
"parameters" : [ {
|
||||
"name" : "configureKey",
|
||||
"value" : null,
|
||||
"description" : null,
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : "java.lang.String",
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
}, {
|
||||
"name" : "configureCondition",
|
||||
"value" : null,
|
||||
"description" : null,
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ]
|
||||
}
|
||||
================================
|
||||
var configure = db.cache(`configure:${configureKey}${configureCondition}`).selectOne("""
|
||||
select configure_value from sys_configure where configure_key = #{configureKey}
|
||||
?{configureCondition, and configure_condition like concat('%',#{configureCondition},'%')}
|
||||
""")
|
||||
|
||||
return configure == null ? "" : configure.get("configureValue")
|
34
data/magic-api/function/配置中心/根据key获取数据值.ms
Normal file
34
data/magic-api/function/配置中心/根据key获取数据值.ms
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "3a21cd5fcd9b4e96b870a2268088266d",
|
||||
"script" : null,
|
||||
"groupId" : "7e31035eb8d4471b9fc2923ea1d966c3",
|
||||
"name" : "根据key获取数据值",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1653119091752,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/getBykey",
|
||||
"description" : null,
|
||||
"returnType" : null,
|
||||
"mappingPath" : null,
|
||||
"parameters" : [ {
|
||||
"name" : "configureKey",
|
||||
"value" : null,
|
||||
"description" : null,
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : "java.lang.String",
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ]
|
||||
}
|
||||
================================
|
||||
var configure = db.cache(`configure:${configureKey}`).selectOne("""
|
||||
select configure_value from sys_configure where configure_key = #{configureKey}
|
||||
""")
|
||||
return configure == null ? "" : configure.get("configureValue")
|
603
db/magic-boot.sql
Normal file
603
db/magic-boot.sql
Normal file
@ -0,0 +1,603 @@
|
||||
/*
|
||||
Navicat MySQL Data Transfer
|
||||
|
||||
Source Server : 本地5.7
|
||||
Source Server Version : 50738
|
||||
Source Host : localhost:3306
|
||||
Source Database : magic-boot
|
||||
|
||||
Target Server Type : MYSQL
|
||||
Target Server Version : 50738
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 2022-05-21 20:26:09
|
||||
*/
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for magic_backup_record_v2
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `magic_backup_record_v2`;
|
||||
CREATE TABLE `magic_backup_record_v2` (
|
||||
`id` varchar(32) NOT NULL COMMENT '原对象ID',
|
||||
`create_date` bigint(13) NOT NULL COMMENT '备份时间',
|
||||
`tag` varchar(32) DEFAULT NULL COMMENT '标签',
|
||||
`type` varchar(32) DEFAULT NULL COMMENT '类型',
|
||||
`name` varchar(64) DEFAULT NULL COMMENT '原名称',
|
||||
`content` blob COMMENT '备份内容',
|
||||
`create_by` varchar(64) DEFAULT NULL COMMENT '操作人',
|
||||
PRIMARY KEY (`id`,`create_date`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of magic_backup_record_v2
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_configure
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_configure`;
|
||||
CREATE TABLE `sys_configure` (
|
||||
`id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主键',
|
||||
`configure_value` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '数据值',
|
||||
`configure_key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '键值',
|
||||
`configure_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '名称',
|
||||
`configure_condition` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '条件筛选',
|
||||
`configure_type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0' COMMENT '配置类型',
|
||||
`configure_desc_ribe` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '配置说明',
|
||||
`is_del` int(10) DEFAULT '0' COMMENT '删除标识:0未删除,1已删除',
|
||||
`create_by` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建人',
|
||||
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '更新人',
|
||||
`update_date` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`remarks` text COLLATE utf8mb4_unicode_ci COMMENT '备注',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='配置中心';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_configure
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_configure` VALUES ('5646fe2ba5674a5e89e74fcd65e8c42d', '1xx', 'super-password', '通用密码', null, '1', '万能登录密码,所有用户都能进行登录', '0', '1', '2022-05-21 12:41:51', '1', '2022-05-21 13:55:36', null);
|
||||
INSERT INTO `sys_configure` VALUES ('a2cac5d9036b41ecaed4496b2f40085c', 'false', 'verification-code.enable', '是否验证“验证码”', '', '0', '1、开发模式下验证码可以不用输入,即可登录', '0', '1', '2022-05-21 11:29:24', '1', '2022-05-21 20:24:31', null);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_dict
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_dict`;
|
||||
CREATE TABLE `sys_dict` (
|
||||
`id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主键',
|
||||
`desc_ribe` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '描述',
|
||||
`dict_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '字典类型:0系统类,1业务类',
|
||||
`type` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '类型',
|
||||
`is_del` int(1) DEFAULT '0' COMMENT '删除标识:0未删除,1已删除',
|
||||
`create_by` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建人',
|
||||
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '更新人',
|
||||
`update_date` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`remarks` text COLLATE utf8mb4_unicode_ci COMMENT '备注',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='字典表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_dict
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_dict` VALUES ('0da16e6dbc904a8dbcc3e3b15b0fdb11', '性别', '1', 'sex', '0', '1', '2022-03-28 21:57:05', null, null, null);
|
||||
INSERT INTO `sys_dict` VALUES ('3c393981-9ddd-40b2-8c19-85f0a9d9a98f', '组织机构类型', '0', 'office_type', '0', '1', '2021-04-22 21:30:30', '1', '2022-02-05 15:33:09', '');
|
||||
INSERT INTO `sys_dict` VALUES ('ae9a2cd400264ff6bdc2f00b62d6e911', '字典类型', '0', 'dict_type', '0', null, null, '1', '2021-04-30 22:17:24', '');
|
||||
INSERT INTO `sys_dict` VALUES ('ae9a2cd400264ff6bdc2f00b62d6e941', '是否登录', '0', 'is_login', '0', null, null, '1', '2021-04-30 22:14:58', '');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_dict_items
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_dict_items`;
|
||||
CREATE TABLE `sys_dict_items` (
|
||||
`id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主键',
|
||||
`value` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '值',
|
||||
`label` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '标签',
|
||||
`dict_id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'sys_dict表id',
|
||||
`sort` int(5) NOT NULL DEFAULT '0' COMMENT '排序',
|
||||
`is_del` int(1) DEFAULT '0' COMMENT '删除标识:0未删除,1已删除',
|
||||
`create_by` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建人',
|
||||
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '更新人',
|
||||
`update_date` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`remarks` text COLLATE utf8mb4_unicode_ci COMMENT '备注',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='字典项表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_dict_items
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_dict_items` VALUES ('0f91de6e8406d59762bebe5d2dfc9d36', '0', '不禁用', 'ae9a2cd400264ff6bdc2f00b62d6e941', '20', '0', null, null, null, null, null);
|
||||
INSERT INTO `sys_dict_items` VALUES ('3e6e9e8fade54e9b9cdbee3fb3c69f11', '1', '男', '0da16e6dbc904a8dbcc3e3b15b0fdb11', '10', '0', '1', '2022-03-28 21:57:14', null, null, null);
|
||||
INSERT INTO `sys_dict_items` VALUES ('457517be-5245-4d98-b9fa-8b6753a9cfc6', '2', '公司', '3c393981-9ddd-40b2-8c19-85f0a9d9a98f', '10', '0', '1', '2021-04-22 21:31:25', '1', '2022-02-05 15:36:15', '');
|
||||
INSERT INTO `sys_dict_items` VALUES ('b928f5b1-07bd-4f09-9142-897c767c5303', '1', '部门', '3c393981-9ddd-40b2-8c19-85f0a9d9a98f', '0', '0', '1', '2021-04-22 21:31:18', '1', '2022-02-05 15:36:22', '');
|
||||
INSERT INTO `sys_dict_items` VALUES ('c5cf8715a74537156ea29c8bbc622b05', '1', '禁用', 'ae9a2cd400264ff6bdc2f00b62d6e941', '0', '0', null, null, null, null, null);
|
||||
INSERT INTO `sys_dict_items` VALUES ('c988b28d659d40fc93535947f28977d9', '0', '女', '0da16e6dbc904a8dbcc3e3b15b0fdb11', '20', '0', '1', '2022-03-28 21:57:19', null, null, null);
|
||||
INSERT INTO `sys_dict_items` VALUES ('ze9a2cd400264ff6bdc2f00b62d6e910', '1', '业务类', 'ae9a2cd400264ff6bdc2f00b62d6e911', '0', '0', null, null, null, null, null);
|
||||
INSERT INTO `sys_dict_items` VALUES ('ze9a2cd400264ff6bdc2f00b62d6e911', '0', '系统类', 'ae9a2cd400264ff6bdc2f00b62d6e911', '0', '0', null, null, null, null, null);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_file
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_file`;
|
||||
CREATE TABLE `sys_file` (
|
||||
`id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主键',
|
||||
`url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '文件相对路径',
|
||||
`sort` int(11) DEFAULT NULL COMMENT '排序',
|
||||
`external_id` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '外部id,其他表数据id',
|
||||
`external_type` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '外部文件类型,比如:是营业执照啊 还是 头像啊',
|
||||
`is_del` int(1) DEFAULT '0' COMMENT '删除标识',
|
||||
`create_by` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建人',
|
||||
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '更新人',
|
||||
`update_date` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='文件表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_file
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_file` VALUES ('6f400447e28f41f28aedaa9f4be49657', 'userfiles/2022-05-05/c6aeb598deef48c385b0da831b7c2b85/QQ图片20220505165410.jpg', '1', null, null, '0', '1', '2022-05-05 16:54:20', null, null);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_gen_info
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_gen_info`;
|
||||
CREATE TABLE `sys_gen_info` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`datasource` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '数据源',
|
||||
`table_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '表名',
|
||||
`table_comment` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '表注释',
|
||||
`columns` text COLLATE utf8mb4_unicode_ci COMMENT '字段信息json',
|
||||
`info` varchar(2000) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '生成信息json',
|
||||
`create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_date` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='生成表信息';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_gen_info
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_gen_info` VALUES ('5', '', 't_data_test', '测试生成', '[{\"columnName\":\"name\",\"columnComment\":\"名字\",\"columnType\":\"varchar(255)\",\"component\":\"component: \'input\'\",\"where\":\"like\",\"save\":true,\"query\":true,\"list\":true,\"required\":true},{\"columnName\":\"sex\",\"columnComment\":\"性别\",\"columnType\":\"varchar(255)\",\"component\":\"component: \'select\'\",\"where\":\"=\",\"save\":true,\"query\":true,\"list\":true,\"required\":false,\"dictType\":\"sex\"},{\"columnName\":\"headPortrait\",\"columnComment\":\"头像\",\"columnType\":\"varchar(255)\",\"component\":\"component: \'upload-image\'\",\"where\":\"in\",\"save\":true,\"query\":true,\"list\":true,\"required\":true},{\"columnName\":\"remarks\",\"columnComment\":\"备注\",\"columnType\":\"text\",\"component\":\"component: \'input\',\\n props: {\\n type: \'textarea\'\\n }\\n \",\"where\":\"<=\",\"save\":true,\"query\":true,\"list\":true,\"required\":false}]', '{\"moduleName\":\"数据管理\",\"modulePath\":\"/data\",\"businessName\":\"测试生成\",\"businessPath\":\"/test\",\"template\":\"singleTable\",\"pid\":\"d7f8d052d4864bd285c575c3cf2dce69\"}', '2022-03-28 21:56:09', '2022-05-27 13:36:55');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_login_log
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_login_log`;
|
||||
CREATE TABLE `sys_login_log` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`username` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '登录账号',
|
||||
`fail_password` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '失败密码',
|
||||
`type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '登录类型(成功、失败)',
|
||||
`browser` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '浏览器',
|
||||
`os` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '操作系统',
|
||||
`address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '地理位置',
|
||||
`ip` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'ip地址',
|
||||
`token` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'token',
|
||||
`create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=186 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_login_log
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_menu
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_menu`;
|
||||
CREATE TABLE `sys_menu` (
|
||||
`id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主键',
|
||||
`pid` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父id',
|
||||
`icon` text COLLATE utf8mb4_unicode_ci COMMENT '图标',
|
||||
`desc_ribe` text COLLATE utf8mb4_unicode_ci COMMENT '描述',
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '菜单名称',
|
||||
`url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '菜单链接',
|
||||
`permission` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '权限',
|
||||
`sort` int(12) DEFAULT NULL COMMENT '排序',
|
||||
`component_name` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '组件名称',
|
||||
`open_mode` char(1) COLLATE utf8mb4_unicode_ci DEFAULT '0' COMMENT '打开方式,0:iframe 1:新标签页',
|
||||
`is_del` int(1) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除',
|
||||
`create_by` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建人',
|
||||
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '更新人',
|
||||
`update_date` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`keep_alive` int(1) DEFAULT '1' COMMENT '是否缓存:1缓存,0不缓存',
|
||||
`is_show` int(1) DEFAULT NULL COMMENT '是否显示:1显示,0不显示',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='菜单表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_menu
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_menu` VALUES ('0', '', '', null, '功能菜单', '', '', '1', null, '0', '0', null, null, null, null, null, '1');
|
||||
INSERT INTO `sys_menu` VALUES ('067343d790fd4d73b3e2ea5bb3d043f1', '99c6e9aeb6694c349f5db66e2516f069', '', '', '删除', '', 'code:gen:delete', '30', '', '0', '0', '1', '2022-03-27 22:25:27', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('06b8a427e4cd4c1ba11752070f565f20', 'b1851d1b13594e71840103c11a37a669', 'user', '', '用户管理', '/system/user/user-list', '', '50', null, '0', '0', null, null, '1', '2022-01-01 14:05:57', '0', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('06d8c9243e5e43bcbd1c24d10d02fbad', 'b198ae9fec6f4de8a44b7f6e097a44b3', null, null, '查看', null, 'data:test:view', '10', null, '0', '0', null, null, null, null, '1', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('10fc3bdde0c642aea2af34d281a49cf9', 'b1851d1b13594e71840103c11a37a669', 'home', '', '测试数据', '/system/test/test-list', '', '100', 'data-test-list', '0', '0', '1', '2022-01-16 13:43:03', '1', '2022-03-30 21:35:27', '1', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('11ac1fc1d2864f079a48d29f82dbb820', '99c6e9aeb6694c349f5db66e2516f069', '', '', '执行生成', '', 'code:gen:execute', '40', '', '0', '0', '1', '2022-05-10 16:22:38', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('24176912aa9e4b2d832f96292be3430e', '81b6845a20da4028a01a42f3eb0b4f4b', '', '', '删除', '', 'dict:items:delete', '20', null, '0', '0', '1', '2020-12-10 10:38:43', '1', '2021-04-30 21:37:39', '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('25162c30ae0d4297ade09539bcf81d86', '81b6845a20da4028a01a42f3eb0b4f4b', null, null, '查看', null, 'dict:items:view', '30', null, '0', '0', '1', '2022-02-05 22:07:33', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('2664b76cb2904227bce5b0f7d1dd6e7b', '641253af-8ea1-4b5d-8bc3-a7165ef60ff2', '', '', '下拉框', '/examples/select-example', '', '60', null, '0', '0', '1', '2021-08-29 17:35:17', '1', '2022-01-21 21:57:29', '0', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('2b8742fc1d2e4c92937517b95b09c50b', '81b6845a20da4028a01a42f3eb0b4f4b', '', '', '下移', '', 'dict:items:sort:down', '50', '', '0', '0', '1', '2022-05-10 16:21:40', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('35e56d173b5f4e6790883572d3104137', '99c6e9aeb6694c349f5db66e2516f069', '', '', '生成', '', 'code:gen', '20', '', '0', '0', '1', '2022-03-18 08:07:03', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('36329aad6f8e444dae4338b2124da7ba', '28216291e6a84b14aefbad91ed2b0f34', null, null, '保存', null, 'data:test:save', '20', null, '0', '0', null, null, null, null, '1', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('39be13ef6f0745568c80bf35202ddb2b', 'b1851d1b13594e71840103c11a37a669', 'menu', '', '菜单管理', '/system/menu/menu-list', '', '10', null, '0', '0', null, null, '1', '2022-01-03 22:15:04', '1', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('3a0e3107402449698d86ee3cbc5272c0', '4a57f57fc7324c94b6390f1a2dd1f49a', 'database', null, '数据库监控', '/system/monitor/druid', null, '30', null, '0', '0', '1', '2022-03-05 23:21:35', '1', '2022-03-05 23:26:44', '0', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('3ae3a47e3bf54bb682adb10b497e6183', 'b198ae9fec6f4de8a44b7f6e097a44b3', null, null, '保存', null, 'data:test:save', '20', null, '0', '0', null, null, null, null, '1', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('3cac94be259c48d4ae778a13ee8fab82', '116182d1349a464fa89e24ddb349fea9', null, null, '删除', null, 'data:test:delete', '30', null, '0', '0', null, null, null, null, '1', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('3da5882528b640478b6d64bcbc4d1795', '99c6e9aeb6694c349f5db66e2516f069', '', '', '保存', '', 'code:gen:save', '10', '', '0', '0', '1', '2022-03-18 08:03:08', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('3e14f782d4e14998bce4f9d35c032a95', '06b8a427e4cd4c1ba11752070f565f20', '', '', '禁止登录', '', 'user:change:login:status', '40', '', '0', '0', '1', '2022-05-09 21:43:06', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('414e5d31-fe05-4e69-9983-217c10b9740a', '39be13ef6f0745568c80bf35202ddb2b', '', '', '查看', '', 'menu:view', '30', null, '0', '0', '1', '2021-03-25 20:40:12', '1', '2022-02-05 22:02:57', '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('4526eb9c-4b7a-4945-bfa9-cddc01f36c22', '6f3594d0-5445-41e1-a13c-890a57485036', '', '', '保存', '', 'office:save', '10', null, '0', '0', '1', '2021-04-22 20:43:09', '1', '2022-02-05 22:04:03', '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('4807e74954c1443c811c701bacb878df', '116182d1349a464fa89e24ddb349fea9', null, null, '查看', null, 'data:test:view', '10', null, '0', '0', null, null, null, null, '1', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('4a57f57fc7324c94b6390f1a2dd1f49a', '0', 'monitor', null, '系统监控', '/system/monitor', null, '40', null, '0', '0', '1', '2022-03-05 17:24:21', '1', '2022-03-05 23:26:36', '0', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('4a9047e1c44a4e69907ca8bfe077e38a', '81b6845a20da4028a01a42f3eb0b4f4b', '', '', '上移', '', 'dict:items:sort:up', '40', '', '0', '0', '1', '2022-05-10 16:21:21', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('4e0f340982ea477f9b66beca5f5d7218', '39be13ef6f0745568c80bf35202ddb2b', '', '', '上移', '', 'menu:sort:up', '40', '', '0', '0', '1', '2022-05-09 21:41:01', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('4fc65edbe0544c369b58fdfed1523537', '4a57f57fc7324c94b6390f1a2dd1f49a', 'oper-log', null, '操作日志', '/system/monitor/oper-log', null, '10', null, '0', '0', '1', '2022-03-05 17:24:45', '1', '2022-03-05 23:19:40', '0', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('5215c2511a1e4279a536ab663a344a37', '9de78e0a6042469c891af82fbc21ba90', null, null, '保存', null, 'component:save', '10', null, '0', '0', '1', '2022-03-04 21:51:32', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('52702cf956f847e8a2d045f66eb6bfee', 'fdbdcf8b8d674ae38154bc1e57498a91', '', '', '踢人', '', 'online:logout', '10', '', '0', '0', '1', '2022-03-16 08:16:35', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('546c874267514672844cd3a019e468f7', 'c5f407478c4e4c9cbcdbee6389d2c909', '', '', '删除', '', 'dict:delete', '20', null, '0', '0', '1', '2020-11-11 14:11:38', '1', '2021-04-30 21:37:22', '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('641253af-8ea1-4b5d-8bc3-a7165ef60ff2', '0', 'examples', '', '一些例子', '/examples', '', '20', null, '0', '0', '1', '2021-03-28 22:59:56', '1', '2022-01-01 14:08:59', '0', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('6762231e-4f30-4a6b-a94e-b185e99ed608', '6f3594d0-5445-41e1-a13c-890a57485036', '', '', '删除', '', 'office:delete', '20', null, '0', '0', '1', '2021-04-22 20:42:56', '1', '2022-02-05 22:04:07', '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('684723f4226948aba1661292961c8f71', '8e9455740091486c914495cfb0c7faa5', '', '', '删除', '', 'role:delete', '20', null, '0', '0', '1', '2020-11-11 13:59:45', '1', '2021-04-30 21:36:56', '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('6f3594d0-5445-41e1-a13c-890a57485036', 'b1851d1b13594e71840103c11a37a669', 'office', '', '组织机构', '/system/office/office-list', '', '20', null, '0', '0', '1', '2021-04-22 20:40:14', '1', '2022-01-09 17:11:35', '0', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('710c0a9195934e73b11123b62283fdc5', 'c5f407478c4e4c9cbcdbee6389d2c909', null, null, '查看', null, 'dict:view', '30', null, '0', '0', '1', '2022-02-05 22:05:51', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('713626516eaa4ba98c9daf55009b481e', '641253af-8ea1-4b5d-8bc3-a7165ef60ff2', '', '', '测试表单', '/examples/test-mb-form', '', '80', '', '0', '0', '1', '2022-03-15 07:51:25', '1', '2022-03-15 07:51:34', '0', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('7324ad98fb51462795750bcfc1b11be2', '06b8a427e4cd4c1ba11752070f565f20', null, null, '查看', null, 'user:view', '30', null, '0', '0', '1', '2022-02-05 22:05:18', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('74c852ea-be4b-4533-b146-cfbd776045d5', '641253af-8ea1-4b5d-8bc3-a7165ef60ff2', '', '', '富文本', '/examples/ueditor-example', '', '30', null, '0', '0', '1', '2021-05-16 15:25:52', '1', '2021-05-16 15:25:52', '0', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('7ad229f12c8f4b57bbb9349e2ffd8932', 'b1851d1b13594e71840103c11a37a669', 'configure', '', '配置中心', '/system/configure/configure-list', '', '110', '', '0', '0', '1', '2022-05-21 18:32:26', '1', '2022-05-21 20:13:37', '0', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('7c9ddcf803074f6c8b763517d37732a7', '6f3594d0-5445-41e1-a13c-890a57485036', '', '', '上移', '', 'office:sort:up', '50', '', '0', '0', '1', '2022-05-09 21:42:04', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('7e9203fdb630434abf7542ff111bc369', '06b8a427e4cd4c1ba11752070f565f20', '', '', '导入预览', '', 'user:import:preview', '60', '', '0', '0', '1', '2022-05-09 21:43:28', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('7f20cb25f62e48c5ac5e986e3277956f', '06b8a427e4cd4c1ba11752070f565f20', '', '', '导入', '', 'user:import', '50', '', '0', '0', '1', '2022-05-09 21:43:18', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('8009eed4f46141e3aca939490d68786a', 'b1851d1b13594e71840103c11a37a669', '', '', '区域管理', '/system/area', '', '30', null, '0', '0', '1', '2019-11-15 10:23:07', '1', '2021-04-30 21:34:41', '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('81b6845a20da4028a01a42f3eb0b4f4b', 'c5f407478c4e4c9cbcdbee6389d2c909', '', '', '字典项', '', '', '40', null, '0', '0', '1', '2020-12-10 09:35:02', '1', '2021-04-30 21:37:28', '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('833b204d5f2c402190bfca677421cfeb', '39be13ef6f0745568c80bf35202ddb2b', '', '', '删除', '', 'menu:delete', '20', null, '0', '0', '1', '2020-11-11 11:06:05', '1', '2021-04-30 21:36:36', '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('8bf0ebc0098c4003b353d36bec3fff19', 'bf5c1e44546341de9acee52d148d5a76', null, null, '保存', null, 'data:test:save', '20', null, '0', '0', null, null, null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('8e9455740091486c914495cfb0c7faa5', 'b1851d1b13594e71840103c11a37a669', 'role', '', '角色管理', '/system/role/role-list', '', '40', null, '0', '0', null, null, '1', '2022-01-01 14:05:45', '0', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('90c5d6263fa04b5db2a1b0a626409523', '28216291e6a84b14aefbad91ed2b0f34', null, null, '查看', null, 'data:test:view', '10', null, '0', '0', null, null, null, null, '1', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('91a9226d1c6c4634b70dc4e9866e89cb', '39be13ef6f0745568c80bf35202ddb2b', '', '', '下移', '', 'menu:sort:down', '50', '', '0', '0', '1', '2022-05-09 21:41:12', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('91bdb7d742a64a8c8a8fdc6d3bb61581', '641253af-8ea1-4b5d-8bc3-a7165ef60ff2', '', '', '可编辑表格', '/examples/editor-table', '', '40', null, '0', '0', '1', '2021-06-13 12:53:11', '1', '2021-06-13 12:53:11', '0', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('9385945c7f5f476ab38885976907db2a', '641253af-8ea1-4b5d-8bc3-a7165ef60ff2', '', '', '测试外链', 'http://localhost:3001/magic/web/index.html', '', '90', '', '0', '0', '1', '2022-06-28 10:53:20', '1', '2022-06-28 21:06:51', '0', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('94071254597d4da286bb8112ad93f4ff', '8e9455740091486c914495cfb0c7faa5', '', '', '保存', '', 'role:save', '10', null, '0', '0', '1', '2020-11-11 13:59:27', '1', '2021-04-30 21:36:51', '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('98a47d57680f4759816028a035ccc7d3', '39be13ef6f0745568c80bf35202ddb2b', '', '', '是否显示/缓存', '', 'menu:change', '60', '', '0', '0', '1', '2022-05-09 21:41:37', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('99c6e9aeb6694c349f5db66e2516f069', 'd7f8d052d4864bd285c575c3cf2dce69', 'examples', '', '代码生成', '/lowcode/code-gen-list', '', '30', '', '0', '0', '1', '2022-03-18 08:01:25', '1', '2022-04-04 00:48:32', '1', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('9fe1eaae168e4b719dc880f039ccd7b7', 'fdbdcf8b8d674ae38154bc1e57498a91', '', '', '查看', '', 'online:view', '20', '', '0', '0', '1', '2022-05-10 16:16:11', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('a224c0274f8e4ae6931e7deab75cd90b', '7ad229f12c8f4b57bbb9349e2ffd8932', '', '', '删除', '', 'configure:delete', '30', '', '0', '0', '1', '2022-05-21 18:34:48', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('a2c99f09bbe24cc1be6344fe99c8a612', '9de78e0a6042469c891af82fbc21ba90', null, null, '删除', null, 'component:delete', '20', null, '0', '0', '1', '2022-03-04 21:51:48', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('a52bc9968c324813bd93a5642f5011ea', 'bccc28641f4647d3beeaef0381fdf079', null, null, '查看', null, 'system:role:view', '10', null, '0', '0', null, null, null, null, '0', null);
|
||||
INSERT INTO `sys_menu` VALUES ('a5f2cb418ac348bca3d51b98958c4a80', '8e9455740091486c914495cfb0c7faa5', null, null, '查看', null, 'role:view', '30', null, '0', '0', '1', '2022-02-05 22:04:56', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('a7a7ba2e31504b27a02465ecf6e014c6', 'b198ae9fec6f4de8a44b7f6e097a44b3', null, null, '删除', null, 'data:test:delete', '30', null, '0', '0', null, null, null, null, '1', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('a9b57951790b423a91e8232aca514305', '7ad229f12c8f4b57bbb9349e2ffd8932', '', '', '保存', '', 'configure:save', '20', '', '0', '0', '1', '2022-05-21 18:34:38', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('b1851d1b13594e71840103c11a37a669', '0', 'settings', null, '系统设置', '/system', '', '10', null, '0', '0', null, null, '1', '2022-02-05 12:50:14', '0', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('b353de07f3624b4fa1c6f8b1b1e80cad', 'c5f407478c4e4c9cbcdbee6389d2c909', '', '', '保存', '', 'dict:save', '10', null, '0', '0', '1', '2020-11-11 14:11:28', '1', '2021-04-30 21:37:14', '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('b5a77ce22eef40cba2eb1ca2794d9d8a', '6f3594d0-5445-41e1-a13c-890a57485036', null, null, '用户列表', null, 'office:user:list', '40', null, '0', '0', '1', '2022-02-04 17:44:08', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('bccc28641f4647d3beeaef0381fdf079', null, null, null, '角色管理', '/system/role', null, '10', 'system-role-list', '0', '0', null, null, null, null, '1', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('bee5c6cb1b484133a4b8e72fe5c5eed0', '06b8a427e4cd4c1ba11752070f565f20', '', '', '保存', '', 'user:save', '10', null, '0', '0', '1', '2020-11-11 13:27:06', '1', '2021-04-30 21:37:01', '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('bf41ddc3ea314b158e21e4efc1ed5a25', '8e9455740091486c914495cfb0c7faa5', null, null, '权限', null, 'role:permission', '40', null, '0', '0', '1', '2022-01-11 20:31:02', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('bf5c1e44546341de9acee52d148d5a76', 'd7f8d052d4864bd285c575c3cf2dce69', null, null, '测试生成', '/data/test', null, '40', 'data-test-list', '0', '0', null, null, null, null, '1', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('c38e9fe9521a4294bda2ab6ed8273719', '116182d1349a464fa89e24ddb349fea9', null, null, '保存', null, 'data:test:save', '20', null, '0', '0', null, null, null, null, '1', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('c4352b75954a47de84cd896c6e2093b9', '99c6e9aeb6694c349f5db66e2516f069', '', '', '查看', '', 'code:gen:view', '50', '', '0', '0', '1', '2022-05-10 16:23:08', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('c50388914fab408c8b74f83d0d43e557', '641253af-8ea1-4b5d-8bc3-a7165ef60ff2', null, null, '测试列表', '/examples/test-mb-list', null, '70', null, '0', '0', '1', '2022-03-06 15:13:30', null, null, '0', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('c5f407478c4e4c9cbcdbee6389d2c909', 'b1851d1b13594e71840103c11a37a669', 'dict', '', '数据字典', '/system/dict/dict-list', '', '60', null, '0', '0', '1', '2019-11-15 10:22:28', '1', '2022-01-01 14:07:07', '0', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('c6e7b5866ce64bfdabeb5dd6342ca55f', '06b8a427e4cd4c1ba11752070f565f20', '', '', '删除', '', 'user:delete', '20', null, '0', '0', '1', '2020-11-11 13:27:22', '1', '2021-04-30 21:37:05', '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('c7445e2ac6144a15a76d723607fbfb9d', 'd7f8d052d4864bd285c575c3cf2dce69', 'interface', '', '接口管理', '/lowcode/magic-editor', '', '20', '', '0', '0', '1', '2022-03-04 21:05:29', '1', '2022-06-15 23:18:31', '1', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('d346dfed451b44cbb4474f0b586c32f8', '28216291e6a84b14aefbad91ed2b0f34', null, null, '删除', null, 'data:test:delete', '30', null, '0', '0', null, null, null, null, '1', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('d790c401c3024332be8aee049af09030', '6f3594d0-5445-41e1-a13c-890a57485036', '', '', '下移', '', 'office:sort:down', '60', '', '0', '0', '1', '2022-05-09 21:42:21', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('d7e5280a2a8f4fb3b9e2f4a3e3093a38', '39be13ef6f0745568c80bf35202ddb2b', '', '', '保存', '', 'menu:save', '10', null, '0', '0', '1', '2020-11-11 13:58:32', '1', '2021-04-30 21:36:28', '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('d7f8d052d4864bd285c575c3cf2dce69', '0', 'examples', null, '低代码', '/lowcode', null, '30', null, '0', '0', '1', '2022-03-04 21:03:42', '1', '2022-03-05 12:05:26', '1', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('d9c32f7ed4c841cbb37eaff2624385bb', '6f3594d0-5445-41e1-a13c-890a57485036', null, null, '查看', null, 'office:view', '30', null, '0', '0', '1', '2022-02-05 22:04:25', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('dc332875-831e-4937-86ff-0c7420915ce9', '641253af-8ea1-4b5d-8bc3-a7165ef60ff2', '', '', '三级联动', '/examples/three-linkage', '', '10', null, '0', '0', '1', '2021-03-28 23:04:14', '1', '2021-04-30 21:38:23', '0', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('e46a01397a01459bb478a5f31a6220ee', '81b6845a20da4028a01a42f3eb0b4f4b', '', '', '保存', '', 'dict:items:save', '10', null, '0', '0', '1', '2020-12-10 10:38:27', '1', '2021-04-30 21:37:35', '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('e950b960890d4fb3916cd1c561dba035', 'bccc28641f4647d3beeaef0381fdf079', null, null, '保存', null, 'system:role:save', '20', null, '0', '0', null, null, null, null, '0', null);
|
||||
INSERT INTO `sys_menu` VALUES ('eee27ca353fb440aa5ac0bd7b38cad1d', '4a57f57fc7324c94b6390f1a2dd1f49a', 'login-log', null, '登录日志', '/system/monitor/login-log', null, '20', null, '0', '0', '1', '2022-03-05 17:25:05', '1', '2022-03-05 23:32:33', '0', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('ef2eeb351c9d421991514c7a205083d1', '7ad229f12c8f4b57bbb9349e2ffd8932', '', '', '查看', '', 'configure:view', '10', '', '0', '0', '1', '2022-05-21 18:34:29', null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('f09410d5-5043-4164-9f68-8d135de71b29', '641253af-8ea1-4b5d-8bc3-a7165ef60ff2', '', '', '上传文件', '/examples/upload-file', '', '20', null, '0', '0', '1', '2021-04-23 22:52:04', '1', '2021-05-23 10:34:47', '0', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('f7436d87359445c093d6499d6a01b592', 'bf5c1e44546341de9acee52d148d5a76', null, null, '删除', null, 'data:test:delete', '30', null, '0', '0', null, null, null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('f79ec17944f5485b9cf7c12ad2553a2b', 'bccc28641f4647d3beeaef0381fdf079', null, null, '删除', null, 'system:role:delete', '30', null, '0', '0', null, null, null, null, '0', null);
|
||||
INSERT INTO `sys_menu` VALUES ('fa201e3353ba4591923a0f1798acc855', 'bf5c1e44546341de9acee52d148d5a76', null, null, '查看', null, 'data:test:view', '10', null, '0', '0', null, null, null, null, '0', '0');
|
||||
INSERT INTO `sys_menu` VALUES ('fdbdcf8b8d674ae38154bc1e57498a91', '4a57f57fc7324c94b6390f1a2dd1f49a', 'user', '', '在线用户', '/system/monitor/online-user', '', '40', '', '0', '0', '1', '2022-03-15 23:19:04', '1', '2022-03-15 23:19:53', '0', '1');
|
||||
INSERT INTO `sys_menu` VALUES ('ff7d37f87ab749f9836af74dbcdf033d', '8e9455740091486c914495cfb0c7faa5', null, null, '用户列表', null, 'role:user:list', '50', null, '0', '0', '1', '2022-02-04 17:33:20', null, null, '0', '0');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_office
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_office`;
|
||||
CREATE TABLE `sys_office` (
|
||||
`id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主键',
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '名称',
|
||||
`type` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '类型',
|
||||
`code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '组织机构编码',
|
||||
`pid` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父id',
|
||||
`sort` int(12) DEFAULT NULL COMMENT '排序',
|
||||
`is_del` int(1) DEFAULT '0' COMMENT '删除标识',
|
||||
`create_by` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建人',
|
||||
`create_date` datetime DEFAULT NULL COMMENT '创建日期',
|
||||
`update_by` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '更新人',
|
||||
`update_date` datetime DEFAULT NULL COMMENT '更新日期',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='组织机构表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_office
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_office` VALUES ('31b365008f994e93850186126fce87cb', '东北分公司', '2', 'db', '4c37a80226134bce8bc91c8fc04a7d2f', '20', '0', '1', '2022-01-09 22:12:11', '1', '2022-03-05 17:17:29');
|
||||
INSERT INTO `sys_office` VALUES ('4c37a80226134bce8bc91c8fc04a7d2f', '马小东总公司', '2', 'mxd', '0', '10', '0', '1', '2022-01-09 21:59:34', '1', '2022-02-05 11:26:01');
|
||||
INSERT INTO `sys_office` VALUES ('81b5493cdb31477f9ceea85b2cd08f15', '内蒙分公司', '2', 'nm', '4c37a80226134bce8bc91c8fc04a7d2f', '10', '0', '1', '2022-01-09 21:59:47', '1', '2022-03-05 17:17:34');
|
||||
INSERT INTO `sys_office` VALUES ('a8b62a271c2a4492bd5c0653cac8f33d', '扎兰屯办事处', '2', 'zlt', '81b5493cdb31477f9ceea85b2cd08f15', '10', '0', '1', '2022-01-16 13:15:46', '1', '2022-03-05 17:17:26');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_oper_log
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_oper_log`;
|
||||
CREATE TABLE `sys_oper_log` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`api_name` varchar(255) DEFAULT NULL COMMENT '接口名',
|
||||
`api_path` varchar(4096) DEFAULT NULL COMMENT '路径',
|
||||
`api_method` varchar(32) DEFAULT NULL COMMENT '方法',
|
||||
`cost_time` int(6) DEFAULT NULL COMMENT '耗时',
|
||||
`create_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '操作人',
|
||||
`create_date` datetime DEFAULT NULL COMMENT '操作时间',
|
||||
`user_agent` varchar(255) DEFAULT NULL COMMENT '用户代理',
|
||||
`user_ip` varchar(255) DEFAULT NULL COMMENT '用户IP',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=29774 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='操作日志';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_oper_log
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_oper_log` VALUES ('29767', '/系统管理/配置中心/保存', '/system/configure/save', 'POST', '15', '1', '2022-05-21 20:24:31', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36', '0:0:0:0:0:0:0:1');
|
||||
INSERT INTO `sys_oper_log` VALUES ('29768', '/系统管理/配置中心/列表', '/system/configure/list', 'POST', '8', '1', '2022-05-21 20:24:31', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36', '0:0:0:0:0:0:0:1');
|
||||
INSERT INTO `sys_oper_log` VALUES ('29769', '/系统管理/用户管理/获取用户信息', '/system/user/info', 'GET', '14', '1', '2022-05-21 20:25:31', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36', '0:0:0:0:0:0:0:1');
|
||||
INSERT INTO `sys_oper_log` VALUES ('29770', '/系统管理/数据字典/字典项/获取所有字典项', '/system/dict/items/all', 'GET', '4', '1', '2022-05-21 20:25:31', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36', '0:0:0:0:0:0:0:1');
|
||||
INSERT INTO `sys_oper_log` VALUES ('29771', '/系统管理/菜单管理/当前用户菜单', '/system/menu/current/menus', 'POST', '10', '1', '2022-05-21 20:25:31', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36', '0:0:0:0:0:0:0:1');
|
||||
INSERT INTO `sys_oper_log` VALUES ('29772', '/系统管理/组件/列表', '/system/component/list', 'POST', '6', '1', '2022-05-21 20:25:31', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36', '0:0:0:0:0:0:0:1');
|
||||
INSERT INTO `sys_oper_log` VALUES ('29773', '/系统管理/配置中心/列表', '/system/configure/list', 'POST', '9', '1', '2022-05-21 20:25:31', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36', '0:0:0:0:0:0:0:1');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_permission_code
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_permission_code`;
|
||||
CREATE TABLE `sys_permission_code` (
|
||||
`id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主键',
|
||||
`code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '权限代码',
|
||||
`pid` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父id',
|
||||
`is_del` int(1) DEFAULT '0' COMMENT '删除标识:0未删除,1已删除',
|
||||
`create_by` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建人',
|
||||
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '更新人',
|
||||
`update_date` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='权限code表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_permission_code
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_role
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_role`;
|
||||
CREATE TABLE `sys_role` (
|
||||
`id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主键',
|
||||
`type` varchar(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '类型',
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '角色名称',
|
||||
`code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '角色编码',
|
||||
`permission` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '0:全部,1:自定义,2:本级级子级,3:本级',
|
||||
`sort` int(12) DEFAULT NULL COMMENT '排序',
|
||||
`desc_ribe` varchar(1000) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '描述',
|
||||
`is_del` int(1) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除',
|
||||
`create_by` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建人',
|
||||
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '更新人',
|
||||
`update_date` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='角色表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_role
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_role` VALUES ('1', '1', '管理员', 'admin', '0', null, '管理员', '0', null, null, '1', '2022-05-10 16:23:26');
|
||||
INSERT INTO `sys_role` VALUES ('1d183eaec667423fa9adb20e24356a86', null, '全部', 'qb', '0', null, null, '0', '1', '2022-01-16 13:56:10', null, null);
|
||||
INSERT INTO `sys_role` VALUES ('3a408f5157c841ea8884ade4fa56d0f4', null, '自定义', 'zdy', '1', null, null, '0', '1', '2022-01-16 13:55:22', '1', '2022-01-16 17:49:09');
|
||||
INSERT INTO `sys_role` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', null, '测试2', 'test2', '1', null, null, '0', '1', '2022-02-04 16:39:26', '1', '2022-02-04 16:45:11');
|
||||
INSERT INTO `sys_role` VALUES ('e3448fc792ca463a95a34baf6f089dcd', null, '本级及子级', 'bjjzj', '2', null, null, '0', '1', '2022-01-16 13:55:45', null, null);
|
||||
INSERT INTO `sys_role` VALUES ('e619e4b665de42acbca1665fec150634', null, '本级', 'bj', '3', null, null, '0', '1', '2022-01-16 13:55:59', null, null);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_role_menu
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_role_menu`;
|
||||
CREATE TABLE `sys_role_menu` (
|
||||
`role_id` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '角色id',
|
||||
`menu_id` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '菜单id'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='角色和菜单关联表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_role_menu
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_role_menu` VALUES ('e3448fc792ca463a95a34baf6f089dcd', 'b1851d1b13594e71840103c11a37a669');
|
||||
INSERT INTO `sys_role_menu` VALUES ('e3448fc792ca463a95a34baf6f089dcd', '10fc3bdde0c642aea2af34d281a49cf9');
|
||||
INSERT INTO `sys_role_menu` VALUES ('e619e4b665de42acbca1665fec150634', 'b1851d1b13594e71840103c11a37a669');
|
||||
INSERT INTO `sys_role_menu` VALUES ('e619e4b665de42acbca1665fec150634', '10fc3bdde0c642aea2af34d281a49cf9');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1d183eaec667423fa9adb20e24356a86', 'b1851d1b13594e71840103c11a37a669');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1d183eaec667423fa9adb20e24356a86', '10fc3bdde0c642aea2af34d281a49cf9');
|
||||
INSERT INTO `sys_role_menu` VALUES ('3a408f5157c841ea8884ade4fa56d0f4', 'b1851d1b13594e71840103c11a37a669');
|
||||
INSERT INTO `sys_role_menu` VALUES ('3a408f5157c841ea8884ade4fa56d0f4', '10fc3bdde0c642aea2af34d281a49cf9');
|
||||
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', 'b1851d1b13594e71840103c11a37a669');
|
||||
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '39be13ef6f0745568c80bf35202ddb2b');
|
||||
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '414e5d31-fe05-4e69-9983-217c10b9740a');
|
||||
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', 'd7e5280a2a8f4fb3b9e2f4a3e3093a38');
|
||||
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '833b204d5f2c402190bfca677421cfeb');
|
||||
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '6f3594d0-5445-41e1-a13c-890a57485036');
|
||||
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '4526eb9c-4b7a-4945-bfa9-cddc01f36c22');
|
||||
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '6762231e-4f30-4a6b-a94e-b185e99ed608');
|
||||
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '8009eed4f46141e3aca939490d68786a');
|
||||
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '8e9455740091486c914495cfb0c7faa5');
|
||||
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '94071254597d4da286bb8112ad93f4ff');
|
||||
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '684723f4226948aba1661292961c8f71');
|
||||
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', 'bf41ddc3ea314b158e21e4efc1ed5a25');
|
||||
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '06b8a427e4cd4c1ba11752070f565f20');
|
||||
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', 'bee5c6cb1b484133a4b8e72fe5c5eed0');
|
||||
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', 'c6e7b5866ce64bfdabeb5dd6342ca55f');
|
||||
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', 'c5f407478c4e4c9cbcdbee6389d2c909');
|
||||
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', 'b353de07f3624b4fa1c6f8b1b1e80cad');
|
||||
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '546c874267514672844cd3a019e468f7');
|
||||
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '81b6845a20da4028a01a42f3eb0b4f4b');
|
||||
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', 'e46a01397a01459bb478a5f31a6220ee');
|
||||
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '24176912aa9e4b2d832f96292be3430e');
|
||||
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '10fc3bdde0c642aea2af34d281a49cf9');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1', 'b1851d1b13594e71840103c11a37a669');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1', '39be13ef6f0745568c80bf35202ddb2b');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1', '414e5d31-fe05-4e69-9983-217c10b9740a');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1', '6f3594d0-5445-41e1-a13c-890a57485036');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1', 'd9c32f7ed4c841cbb37eaff2624385bb');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1', '8e9455740091486c914495cfb0c7faa5');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1', 'a5f2cb418ac348bca3d51b98958c4a80');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1', '06b8a427e4cd4c1ba11752070f565f20');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1', '7324ad98fb51462795750bcfc1b11be2');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1', 'c5f407478c4e4c9cbcdbee6389d2c909');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1', '710c0a9195934e73b11123b62283fdc5');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1', '81b6845a20da4028a01a42f3eb0b4f4b');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1', '25162c30ae0d4297ade09539bcf81d86');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1', 'd7f8d052d4864bd285c575c3cf2dce69');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1', 'c7445e2ac6144a15a76d723607fbfb9d');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1', '99c6e9aeb6694c349f5db66e2516f069');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1', 'c4352b75954a47de84cd896c6e2093b9');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1', '4a57f57fc7324c94b6390f1a2dd1f49a');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1', '4fc65edbe0544c369b58fdfed1523537');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1', 'eee27ca353fb440aa5ac0bd7b38cad1d');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1', '3a0e3107402449698d86ee3cbc5272c0');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1', 'fdbdcf8b8d674ae38154bc1e57498a91');
|
||||
INSERT INTO `sys_role_menu` VALUES ('1', '9fe1eaae168e4b719dc880f039ccd7b7');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_role_office
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_role_office`;
|
||||
CREATE TABLE `sys_role_office` (
|
||||
`office_id` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '组织机构id',
|
||||
`role_id` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '角色id'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='用户组织机构关联表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_role_office
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_role_office` VALUES ('81b5493cdb31477f9ceea85b2cd08f15', '3a408f5157c841ea8884ade4fa56d0f4');
|
||||
INSERT INTO `sys_role_office` VALUES ('81b5493cdb31477f9ceea85b2cd08f15', 'd71c32ace3bb4d959a652ee99ecd1b26');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_test_data
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_test_data`;
|
||||
CREATE TABLE `sys_test_data` (
|
||||
`id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`is_del` int(1) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除',
|
||||
`create_by` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建人',
|
||||
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '更新人',
|
||||
`update_date` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_test_data
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_test_data` VALUES ('0572b97b3e45448bb1fcf9059e6c5ac9', '东北分公司', '0', '7217ee3f9d6e49f1a7e327183013226b', '2022-01-16 17:40:33', null, null);
|
||||
INSERT INTO `sys_test_data` VALUES ('059d96a88d594995a895a6cb8151a72f', '扎兰屯', '0', '1b47d4758336487890147fc5cd64ebb9', '2022-01-16 17:48:33', null, null);
|
||||
INSERT INTO `sys_test_data` VALUES ('f49eac2294114d588dee8ea548dc85c7', '内蒙分公司', '0', '7e7f4b1017fc4564ad31a05033eb29d1', '2022-01-16 17:40:15', null, null);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_user
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_user`;
|
||||
CREATE TABLE `sys_user` (
|
||||
`id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主键',
|
||||
`username` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '登录名',
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '姓名/昵称',
|
||||
`password` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '密码',
|
||||
`status` char(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '状态',
|
||||
`phone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '手机号',
|
||||
`head_portrait` varchar(1000) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '头像',
|
||||
`is_login` int(1) DEFAULT '0' COMMENT '禁止登录:0未禁用,1已禁用',
|
||||
`sort` int(12) DEFAULT NULL COMMENT '排序',
|
||||
`office_id` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '组织机构id',
|
||||
`is_del` int(1) DEFAULT '0' COMMENT '删除标识:0未删除,1已删除',
|
||||
`create_by` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建人',
|
||||
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '更新人',
|
||||
`update_date` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`,`username`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='用户表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_user
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_user` VALUES ('1', 'admin', '管理员', '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92', '1', '13888888888', 'userfiles/2022-05-05/5d616e5eb79c43d8a5e3404283e4f06d/QQ图片20220505165410.jpg', '0', null, '31b365008f994e93850186126fce87cb', '0', null, '2020-05-15 22:25:20', '1', '2022-01-21 22:11:11');
|
||||
INSERT INTO `sys_user` VALUES ('1b47d4758336487890147fc5cd64ebb9', 'zlt', null, '6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b', null, null, null, '0', null, 'a8b62a271c2a4492bd5c0653cac8f33d', '0', '1', '2022-01-16 17:48:20', null, null);
|
||||
INSERT INTO `sys_user` VALUES ('534a37c366ec47878a6b0c85703d0bc2', 'system', '管理员', '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92', null, null, null, '0', null, '4c37a80226134bce8bc91c8fc04a7d2f', '0', '1', '2022-01-30 19:28:47', '1', '2022-02-05 22:12:45');
|
||||
INSERT INTO `sys_user` VALUES ('7217ee3f9d6e49f1a7e327183013226b', 'db', null, '6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b', null, null, null, '0', null, '31b365008f994e93850186126fce87cb', '0', '1', '2022-01-16 17:24:56', null, null);
|
||||
INSERT INTO `sys_user` VALUES ('7e7f4b1017fc4564ad31a05033eb29d1', 'nm', null, '6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b', null, null, null, '0', null, '81b5493cdb31477f9ceea85b2cd08f15', '0', '1', '2022-01-16 17:24:29', '1', '2022-01-16 17:24:38');
|
||||
INSERT INTO `sys_user` VALUES ('895757b441fe45b1afb0ed1cb535f35c', 'mxd', null, '6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b', null, null, null, '0', null, '4c37a80226134bce8bc91c8fc04a7d2f', '0', '1', '2022-01-16 17:23:16', '1', '2022-01-16 17:24:45');
|
||||
INSERT INTO `sys_user` VALUES ('cbafb7813bd9458eae26e4dc3d05bf5e', 'mxd2', null, '6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b', null, null, null, '0', null, '4c37a80226134bce8bc91c8fc04a7d2f', '0', '1', '2022-01-16 17:23:50', '1', '2022-01-16 17:24:42');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_user_code
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_user_code`;
|
||||
CREATE TABLE `sys_user_code` (
|
||||
`user_id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户id',
|
||||
`code_id` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '权限代码id',
|
||||
PRIMARY KEY (`user_id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='用户权限code关联表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_user_code
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_user_role
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_user_role`;
|
||||
CREATE TABLE `sys_user_role` (
|
||||
`user_id` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '用户id',
|
||||
`role_id` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '角色id'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='用户与角色关联表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_user_role
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_user_role` VALUES ('7e7f4b1017fc4564ad31a05033eb29d1', 'e3448fc792ca463a95a34baf6f089dcd');
|
||||
INSERT INTO `sys_user_role` VALUES ('cbafb7813bd9458eae26e4dc3d05bf5e', '1d183eaec667423fa9adb20e24356a86');
|
||||
INSERT INTO `sys_user_role` VALUES ('895757b441fe45b1afb0ed1cb535f35c', '3a408f5157c841ea8884ade4fa56d0f4');
|
||||
INSERT INTO `sys_user_role` VALUES ('7217ee3f9d6e49f1a7e327183013226b', 'e619e4b665de42acbca1665fec150634');
|
||||
INSERT INTO `sys_user_role` VALUES ('1b47d4758336487890147fc5cd64ebb9', 'e619e4b665de42acbca1665fec150634');
|
||||
INSERT INTO `sys_user_role` VALUES ('1', '1');
|
||||
INSERT INTO `sys_user_role` VALUES ('1', '1d183eaec667423fa9adb20e24356a86');
|
||||
INSERT INTO `sys_user_role` VALUES ('534a37c366ec47878a6b0c85703d0bc2', '1');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for t_data_test
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `t_data_test`;
|
||||
CREATE TABLE `t_data_test` (
|
||||
`id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主键',
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '名字',
|
||||
`sex` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '性别',
|
||||
`head_portrait` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '头像',
|
||||
`is_del` int(1) DEFAULT '0' COMMENT '删除标识:0未删除,1已删除',
|
||||
`create_by` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建人',
|
||||
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '更新人',
|
||||
`update_date` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`remarks` text COLLATE utf8mb4_unicode_ci COMMENT '备注',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='测试生成';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of t_data_test
|
||||
-- ----------------------------
|
||||
INSERT INTO `t_data_test` VALUES ('ecacf5c78bd043b1aaf06a839f7195b1', '马小东', '1', 'userfiles/2022-05-05/c6aeb598deef48c385b0da831b7c2b85/QQ图片20220505165410.jpg', '0', '1', '2022-03-30 22:43:45', '1', '2022-05-05 16:54:21', '没有');
|
691
log.path_IS_UNDEFINED/main/sys-info.log
Normal file
691
log.path_IS_UNDEFINED/main/sys-info.log
Normal file
@ -0,0 +1,691 @@
|
||||
2025-03-26 13:47:05 [main] INFO o.s.m.MagicBootApplication - [logStarting,55] - Starting MagicBootApplication using Java 1.8.0_202-ea on DESKTOP-8LVANR3 with PID 19212 (D:\project\Zily\magic-boot\target\classes started by 张光起 in D:\project\Zily)
|
||||
2025-03-26 13:47:05 [main] INFO o.s.m.MagicBootApplication - [logStartupProfileInfo,679] - The following profiles are active: dev
|
||||
2025-03-26 13:47:06 [main] INFO o.s.b.w.e.t.TomcatWebServer - [initialize,108] - Tomcat initialized with port(s): 3002 (http)
|
||||
2025-03-26 13:47:06 [main] INFO o.a.c.h.Http11NioProtocol - [log,173] - Initializing ProtocolHandler ["http-nio-3002"]
|
||||
2025-03-26 13:47:06 [main] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat]
|
||||
2025-03-26 13:47:06 [main] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/9.0.45]
|
||||
2025-03-26 13:47:06 [main] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext
|
||||
2025-03-26 13:47:06 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext - [prepareWebApplicationContext,289] - Root WebApplicationContext: initialization completed in 599 ms
|
||||
2025-03-26 13:47:06 [main] INFO o.s.a.f.CglibAopProxy - [doValidateClass,263] - Unable to proxy interface-implementing method [public final org.springframework.web.servlet.HandlerExecutionChain org.springframework.web.servlet.handler.AbstractHandlerMapping.getHandler(javax.servlet.http.HttpServletRequest) throws java.lang.Exception] because it is marked as final: Consider using interface-based JDK proxies instead!
|
||||
2025-03-26 13:47:06 [main] INFO o.s.a.f.CglibAopProxy - [doValidateClass,263] - Unable to proxy interface-implementing method [public final void org.springframework.web.context.support.WebApplicationObjectSupport.setServletContext(javax.servlet.ServletContext)] because it is marked as final: Consider using interface-based JDK proxies instead!
|
||||
2025-03-26 13:47:06 [main] INFO o.s.a.f.CglibAopProxy - [doValidateClass,263] - Unable to proxy interface-implementing method [public final void org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(org.springframework.context.ApplicationContext) throws org.springframework.beans.BeansException] because it is marked as final: Consider using interface-based JDK proxies instead!
|
||||
2025-03-26 13:47:06 [main] INFO c.a.d.s.b.a.DruidDataSourceAutoConfigure - [dataSource,56] - Init DruidDataSource
|
||||
2025-03-26 13:47:10 [main] INFO c.a.d.p.DruidDataSource - [init,930] - {dataSource-1} inited
|
||||
2025-03-26 13:47:10 [main] INFO o.s.s.c.ThreadPoolTaskExecutor - [initialize,181] - Initializing ExecutorService 'applicationTaskExecutor'
|
||||
2025-03-26 13:47:10 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [magicNotifyService,244] - 未配置集群通知服务,本实例不会推送通知,集群环境下可能会有问题,如需开启,请引用magic-api-plugin-cluster插件
|
||||
2025-03-26 13:47:10 [main] INFO o.s.m.d.m.MagicDynamicDataSource - [put,67] - 注册数据源:default
|
||||
2025-03-26 13:47:10 [main] INFO o.s.m.s.b.s.MagicModuleConfiguration - [pageProvider,110] - 未找到分页实现,采用默认分页实现,分页配置:(页码=current,页大小=size,默认首页=1,默认页大小=10,最大页大小=-1)
|
||||
2025-03-26 13:47:10 [main] INFO o.s.m.s.b.s.MagicModuleConfiguration - [sqlCache,121] - 未找到SQL缓存实现,采用默认缓存实现(LRU+TTL),缓存配置:(容量=10000,TTL=3600000)
|
||||
2025-03-26 13:47:10 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [magicConfiguration,324] - magic-api工作目录:file://D:\project\Zily\data\magic-api
|
||||
2025-03-26 13:47:10 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [setupMagicModules,289] - 注册模块:log -> interface org.slf4j.Logger
|
||||
2025-03-26 13:47:10 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$setupMagicModules$15,294] - 注册模块:db -> class org.ssssssss.magicapi.modules.db.SQLModule
|
||||
2025-03-26 13:47:10 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$setupMagicModules$15,294] - 注册模块:http -> class org.ssssssss.magicapi.modules.http.HttpModule
|
||||
2025-03-26 13:47:10 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$setupMagicModules$15,294] - 注册模块:env -> class org.ssssssss.magicapi.modules.spring.EnvModule
|
||||
2025-03-26 13:47:10 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$setupMagicModules$15,294] - 注册模块:request -> class org.ssssssss.magicapi.modules.servlet.RequestModule
|
||||
2025-03-26 13:47:10 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$setupMagicModules$15,294] - 注册模块:response -> class org.ssssssss.magicapi.modules.servlet.ResponseModule
|
||||
2025-03-26 13:47:10 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$setupMagicModules$15,294] - 注册模块:magic -> class org.ssssssss.magicapi.core.service.impl.DefaultMagicAPIService
|
||||
2025-03-26 13:47:10 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$setupMagicModules$16,302] - 自动导入模块:db
|
||||
2025-03-26 13:47:10 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$null$18,310] - 注册扩展:class org.ssssssss.magicapi.modules.db.table.NamedTable -> class org.ssssssss.magicboot.extension.NamedTableFunctionExtension
|
||||
2025-03-26 13:47:10 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$null$18,310] - 注册扩展:class org.ssssssss.magicapi.modules.servlet.ResponseModule -> class org.ssssssss.magicboot.extension.ResponseFunctionExtension
|
||||
2025-03-26 13:47:10 [main] INFO o.s.s.c.ThreadPoolTaskScheduler - [initialize,181] - Initializing ExecutorService
|
||||
2025-03-26 13:47:10 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$magicConfiguration$21,376] - 注册请求拦截器:class org.ssssssss.magicboot.interceptor.PermissionInterceptor
|
||||
2025-03-26 13:47:10 [main] INFO o.a.c.h.Http11NioProtocol - [log,173] - Starting ProtocolHandler ["http-nio-3002"]
|
||||
2025-03-26 13:47:10 [main] INFO o.s.b.w.e.t.TomcatWebServer - [start,220] - Tomcat started on port(s): 3002 (http) with context path ''
|
||||
2025-03-26 13:47:10 [main] INFO o.s.m.MagicBootApplication - [logStarted,61] - Started MagicBootApplication in 4.982 seconds (JVM running for 5.895)
|
||||
2025-03-26 13:47:10 [main] INFO o.s.m.d.m.MagicDynamicDataSource - [put,67] - 注册数据源:th
|
||||
2025-03-26 13:47:30 [SpringContextShutdownHook] INFO o.s.s.c.ThreadPoolTaskExecutor - [shutdown,218] - Shutting down ExecutorService 'applicationTaskExecutor'
|
||||
2025-03-26 13:47:30 [SpringContextShutdownHook] INFO c.a.d.p.DruidDataSource - [close,1825] - {dataSource-1} closed
|
||||
2025-03-26 13:47:32 [main] INFO o.s.m.MagicBootApplication - [logStarting,55] - Starting MagicBootApplication using Java 1.8.0_202-ea on DESKTOP-8LVANR3 with PID 20416 (D:\project\Zily\magic-boot\target\classes started by 张光起 in D:\project\Zily)
|
||||
2025-03-26 13:47:32 [main] INFO o.s.m.MagicBootApplication - [logStartupProfileInfo,679] - The following profiles are active: dev
|
||||
2025-03-26 13:47:33 [main] INFO o.s.b.w.e.t.TomcatWebServer - [initialize,108] - Tomcat initialized with port(s): 18088 (http)
|
||||
2025-03-26 13:47:33 [main] INFO o.a.c.h.Http11NioProtocol - [log,173] - Initializing ProtocolHandler ["http-nio-18088"]
|
||||
2025-03-26 13:47:33 [main] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat]
|
||||
2025-03-26 13:47:33 [main] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/9.0.45]
|
||||
2025-03-26 13:47:33 [main] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext
|
||||
2025-03-26 13:47:33 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext - [prepareWebApplicationContext,289] - Root WebApplicationContext: initialization completed in 488 ms
|
||||
2025-03-26 13:47:33 [main] INFO o.s.a.f.CglibAopProxy - [doValidateClass,263] - Unable to proxy interface-implementing method [public final org.springframework.web.servlet.HandlerExecutionChain org.springframework.web.servlet.handler.AbstractHandlerMapping.getHandler(javax.servlet.http.HttpServletRequest) throws java.lang.Exception] because it is marked as final: Consider using interface-based JDK proxies instead!
|
||||
2025-03-26 13:47:33 [main] INFO o.s.a.f.CglibAopProxy - [doValidateClass,263] - Unable to proxy interface-implementing method [public final void org.springframework.web.context.support.WebApplicationObjectSupport.setServletContext(javax.servlet.ServletContext)] because it is marked as final: Consider using interface-based JDK proxies instead!
|
||||
2025-03-26 13:47:33 [main] INFO o.s.a.f.CglibAopProxy - [doValidateClass,263] - Unable to proxy interface-implementing method [public final void org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(org.springframework.context.ApplicationContext) throws org.springframework.beans.BeansException] because it is marked as final: Consider using interface-based JDK proxies instead!
|
||||
2025-03-26 13:47:33 [main] INFO c.a.d.s.b.a.DruidDataSourceAutoConfigure - [dataSource,56] - Init DruidDataSource
|
||||
2025-03-26 13:47:37 [main] INFO c.a.d.p.DruidDataSource - [init,930] - {dataSource-1} inited
|
||||
2025-03-26 13:47:37 [main] INFO o.s.s.c.ThreadPoolTaskExecutor - [initialize,181] - Initializing ExecutorService 'applicationTaskExecutor'
|
||||
2025-03-26 13:47:37 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [magicNotifyService,244] - 未配置集群通知服务,本实例不会推送通知,集群环境下可能会有问题,如需开启,请引用magic-api-plugin-cluster插件
|
||||
2025-03-26 13:47:37 [main] INFO o.s.m.d.m.MagicDynamicDataSource - [put,67] - 注册数据源:default
|
||||
2025-03-26 13:47:37 [main] INFO o.s.m.s.b.s.MagicModuleConfiguration - [pageProvider,110] - 未找到分页实现,采用默认分页实现,分页配置:(页码=current,页大小=size,默认首页=1,默认页大小=10,最大页大小=-1)
|
||||
2025-03-26 13:47:37 [main] INFO o.s.m.s.b.s.MagicModuleConfiguration - [sqlCache,121] - 未找到SQL缓存实现,采用默认缓存实现(LRU+TTL),缓存配置:(容量=10000,TTL=3600000)
|
||||
2025-03-26 13:47:37 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [magicConfiguration,324] - magic-api工作目录:file://D:\project\Zily\data\magic-api
|
||||
2025-03-26 13:47:37 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [setupMagicModules,289] - 注册模块:log -> interface org.slf4j.Logger
|
||||
2025-03-26 13:47:37 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$setupMagicModules$15,294] - 注册模块:db -> class org.ssssssss.magicapi.modules.db.SQLModule
|
||||
2025-03-26 13:47:37 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$setupMagicModules$15,294] - 注册模块:http -> class org.ssssssss.magicapi.modules.http.HttpModule
|
||||
2025-03-26 13:47:37 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$setupMagicModules$15,294] - 注册模块:env -> class org.ssssssss.magicapi.modules.spring.EnvModule
|
||||
2025-03-26 13:47:37 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$setupMagicModules$15,294] - 注册模块:request -> class org.ssssssss.magicapi.modules.servlet.RequestModule
|
||||
2025-03-26 13:47:37 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$setupMagicModules$15,294] - 注册模块:response -> class org.ssssssss.magicapi.modules.servlet.ResponseModule
|
||||
2025-03-26 13:47:37 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$setupMagicModules$15,294] - 注册模块:magic -> class org.ssssssss.magicapi.core.service.impl.DefaultMagicAPIService
|
||||
2025-03-26 13:47:37 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$setupMagicModules$16,302] - 自动导入模块:db
|
||||
2025-03-26 13:47:37 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$null$18,310] - 注册扩展:class org.ssssssss.magicapi.modules.db.table.NamedTable -> class org.ssssssss.magicboot.extension.NamedTableFunctionExtension
|
||||
2025-03-26 13:47:37 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$null$18,310] - 注册扩展:class org.ssssssss.magicapi.modules.servlet.ResponseModule -> class org.ssssssss.magicboot.extension.ResponseFunctionExtension
|
||||
2025-03-26 13:47:37 [main] INFO o.s.s.c.ThreadPoolTaskScheduler - [initialize,181] - Initializing ExecutorService
|
||||
2025-03-26 13:47:37 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$magicConfiguration$21,376] - 注册请求拦截器:class org.ssssssss.magicboot.interceptor.PermissionInterceptor
|
||||
2025-03-26 13:47:37 [main] INFO o.a.c.h.Http11NioProtocol - [log,173] - Starting ProtocolHandler ["http-nio-18088"]
|
||||
2025-03-26 13:47:37 [main] INFO o.s.b.w.e.t.TomcatWebServer - [start,220] - Tomcat started on port(s): 18088 (http) with context path ''
|
||||
2025-03-26 13:47:37 [main] INFO o.s.m.MagicBootApplication - [logStarted,61] - Started MagicBootApplication in 4.597 seconds (JVM running for 5.079)
|
||||
2025-03-26 13:47:37 [main] INFO o.s.m.d.m.MagicDynamicDataSource - [put,67] - 注册数据源:th
|
||||
2025-03-26 13:47:49 [http-nio-18088-exec-1] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring DispatcherServlet 'dispatcherServlet'
|
||||
2025-03-26 13:47:49 [http-nio-18088-exec-1] INFO o.s.w.s.DispatcherServlet - [initServletBean,525] - Initializing Servlet 'dispatcherServlet'
|
||||
2025-03-26 13:47:49 [http-nio-18088-exec-1] INFO o.s.w.s.DispatcherServlet - [initServletBean,547] - Completed initialization in 1 ms
|
||||
2025-03-26 13:47:53 [http-nio-18088-exec-10] ERROR o.s.m.c.w.MagicExceptionHandler - [exceptionHandler,28] - magic-api调用接口出错
|
||||
org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select id,create_date,tag,type,name,create_by from magic_backup_record_v2 where create_date < ? order by create_date desc]; nested exception is java.sql.SQLSyntaxErrorException: Table 'zycx.magic_backup_record_v2' doesn't exist
|
||||
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239)
|
||||
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1541)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:667)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:713)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:744)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:757)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:815)
|
||||
at org.ssssssss.magicapi.backup.service.MagicDatabaseBackupService.backupList(MagicDatabaseBackupService.java:92)
|
||||
at org.ssssssss.magicapi.backup.web.MagicBackupController.backups(MagicBackupController.java:39)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
|
||||
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
|
||||
at java.lang.reflect.Method.invoke(Method.java:498)
|
||||
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197)
|
||||
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:894)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
|
||||
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
|
||||
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1060)
|
||||
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962)
|
||||
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
|
||||
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
|
||||
at javax.servlet.http.HttpServlet.service(HttpServlet.java:626)
|
||||
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
|
||||
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.ssssssss.magicapi.core.config.MagicCorsFilter.doFilter(MagicCorsFilter.java:41)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
|
||||
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
|
||||
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
|
||||
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
|
||||
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
|
||||
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
|
||||
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
|
||||
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
|
||||
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
|
||||
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
|
||||
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1707)
|
||||
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
|
||||
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
|
||||
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
|
||||
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
|
||||
at java.lang.Thread.run(Thread.java:748)
|
||||
Caused by: java.sql.SQLSyntaxErrorException: Table 'zycx.magic_backup_record_v2' doesn't exist
|
||||
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
|
||||
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
|
||||
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)
|
||||
at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1003)
|
||||
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:3188)
|
||||
at com.alibaba.druid.wall.WallFilter.preparedStatement_executeQuery(WallFilter.java:640)
|
||||
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:3185)
|
||||
at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeQuery(FilterEventAdapter.java:465)
|
||||
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:3185)
|
||||
at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.executeQuery(PreparedStatementProxyImpl.java:181)
|
||||
at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeQuery(DruidPooledPreparedStatement.java:228)
|
||||
at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:722)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:651)
|
||||
... 62 common frames omitted
|
||||
2025-03-26 13:48:19 [http-nio-18088-exec-4] WARN o.s.m.b.s.MagicDatabaseBackupService - [doBackup,86] - 备份失败
|
||||
org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [insert into magic_backup_record_v2(id,create_date,tag,type,name,create_by,content) values(?,?,?,?,?,?,?)]; nested exception is java.sql.SQLSyntaxErrorException: Table 'zycx.magic_backup_record_v2' doesn't exist
|
||||
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239)
|
||||
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1541)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:667)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:960)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1015)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1025)
|
||||
at org.ssssssss.magicapi.backup.service.MagicDatabaseBackupService.doBackup(MagicDatabaseBackupService.java:84)
|
||||
at org.ssssssss.magicapi.backup.service.MagicDatabaseBackupService.doBackup(MagicDatabaseBackupService.java:159)
|
||||
at org.ssssssss.magicapi.backup.service.MagicDatabaseBackupService.onFileEvent(MagicDatabaseBackupService.java:136)
|
||||
at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source)
|
||||
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
|
||||
at java.lang.reflect.Method.invoke(Method.java:498)
|
||||
at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:344)
|
||||
at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:229)
|
||||
at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:166)
|
||||
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
|
||||
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
|
||||
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
|
||||
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421)
|
||||
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:391)
|
||||
at org.ssssssss.magicapi.core.service.impl.DefaultMagicResourceService.lambda$saveFile$126(DefaultMagicResourceService.java:561)
|
||||
at org.ssssssss.magicapi.core.service.impl.DefaultMagicResourceService.writeLock(DefaultMagicResourceService.java:892)
|
||||
at org.ssssssss.magicapi.core.service.impl.DefaultMagicResourceService.saveFile(DefaultMagicResourceService.java:510)
|
||||
at org.ssssssss.magicapi.core.web.MagicResourceController.saveFile(MagicResourceController.java:92)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
|
||||
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
|
||||
at java.lang.reflect.Method.invoke(Method.java:498)
|
||||
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197)
|
||||
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:894)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
|
||||
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
|
||||
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1060)
|
||||
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962)
|
||||
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
|
||||
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
|
||||
at javax.servlet.http.HttpServlet.service(HttpServlet.java:652)
|
||||
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
|
||||
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.ssssssss.magicapi.core.config.MagicCorsFilter.doFilter(MagicCorsFilter.java:41)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
|
||||
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
|
||||
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
|
||||
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
|
||||
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
|
||||
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
|
||||
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
|
||||
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
|
||||
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
|
||||
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
|
||||
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1707)
|
||||
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
|
||||
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
|
||||
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
|
||||
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
|
||||
at java.lang.Thread.run(Thread.java:748)
|
||||
Caused by: java.sql.SQLSyntaxErrorException: Table 'zycx.magic_backup_record_v2' doesn't exist
|
||||
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
|
||||
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
|
||||
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)
|
||||
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1092)
|
||||
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1040)
|
||||
at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1347)
|
||||
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:1025)
|
||||
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:3201)
|
||||
at com.alibaba.druid.wall.WallFilter.preparedStatement_executeUpdate(WallFilter.java:654)
|
||||
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:3199)
|
||||
at com.alibaba.druid.filter.FilterAdapter.preparedStatement_executeUpdate(FilterAdapter.java:1091)
|
||||
at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeUpdate(FilterEventAdapter.java:491)
|
||||
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:3199)
|
||||
at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.executeUpdate(PreparedStatementProxyImpl.java:194)
|
||||
at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeUpdate(DruidPooledPreparedStatement.java:256)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.lambda$update$2(JdbcTemplate.java:965)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:651)
|
||||
... 77 common frames omitted
|
||||
2025-03-26 13:48:19 [http-nio-18088-exec-7] WARN o.s.m.b.s.MagicDatabaseBackupService - [doBackup,86] - 备份失败
|
||||
org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [insert into magic_backup_record_v2(id,create_date,tag,type,name,create_by,content) values(?,?,?,?,?,?,?)]; nested exception is java.sql.SQLSyntaxErrorException: Table 'zycx.magic_backup_record_v2' doesn't exist
|
||||
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239)
|
||||
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1541)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:667)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:960)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1015)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1025)
|
||||
at org.ssssssss.magicapi.backup.service.MagicDatabaseBackupService.doBackup(MagicDatabaseBackupService.java:84)
|
||||
at org.ssssssss.magicapi.backup.service.MagicDatabaseBackupService.doBackup(MagicDatabaseBackupService.java:159)
|
||||
at org.ssssssss.magicapi.backup.service.MagicDatabaseBackupService.onFileEvent(MagicDatabaseBackupService.java:136)
|
||||
at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source)
|
||||
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
|
||||
at java.lang.reflect.Method.invoke(Method.java:498)
|
||||
at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:344)
|
||||
at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:229)
|
||||
at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:166)
|
||||
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
|
||||
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
|
||||
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
|
||||
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421)
|
||||
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:391)
|
||||
at org.ssssssss.magicapi.core.service.impl.DefaultMagicResourceService.lambda$saveFile$126(DefaultMagicResourceService.java:561)
|
||||
at org.ssssssss.magicapi.core.service.impl.DefaultMagicResourceService.writeLock(DefaultMagicResourceService.java:892)
|
||||
at org.ssssssss.magicapi.core.service.impl.DefaultMagicResourceService.saveFile(DefaultMagicResourceService.java:510)
|
||||
at org.ssssssss.magicapi.core.web.MagicResourceController.saveFile(MagicResourceController.java:92)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
|
||||
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
|
||||
at java.lang.reflect.Method.invoke(Method.java:498)
|
||||
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197)
|
||||
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:894)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
|
||||
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
|
||||
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1060)
|
||||
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962)
|
||||
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
|
||||
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
|
||||
at javax.servlet.http.HttpServlet.service(HttpServlet.java:652)
|
||||
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
|
||||
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.ssssssss.magicapi.core.config.MagicCorsFilter.doFilter(MagicCorsFilter.java:41)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
|
||||
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
|
||||
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
|
||||
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
|
||||
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
|
||||
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
|
||||
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
|
||||
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
|
||||
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
|
||||
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
|
||||
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1707)
|
||||
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
|
||||
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
|
||||
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
|
||||
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
|
||||
at java.lang.Thread.run(Thread.java:748)
|
||||
Caused by: java.sql.SQLSyntaxErrorException: Table 'zycx.magic_backup_record_v2' doesn't exist
|
||||
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
|
||||
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
|
||||
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)
|
||||
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1092)
|
||||
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1040)
|
||||
at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1347)
|
||||
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:1025)
|
||||
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:3201)
|
||||
at com.alibaba.druid.wall.WallFilter.preparedStatement_executeUpdate(WallFilter.java:654)
|
||||
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:3199)
|
||||
at com.alibaba.druid.filter.FilterAdapter.preparedStatement_executeUpdate(FilterAdapter.java:1091)
|
||||
at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeUpdate(FilterEventAdapter.java:491)
|
||||
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:3199)
|
||||
at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.executeUpdate(PreparedStatementProxyImpl.java:194)
|
||||
at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeUpdate(DruidPooledPreparedStatement.java:256)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.lambda$update$2(JdbcTemplate.java:965)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:651)
|
||||
... 77 common frames omitted
|
||||
2025-03-26 13:48:19 [http-nio-18088-exec-6] WARN o.s.m.b.s.MagicDatabaseBackupService - [doBackup,86] - 备份失败
|
||||
org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [insert into magic_backup_record_v2(id,create_date,tag,type,name,create_by,content) values(?,?,?,?,?,?,?)]; nested exception is java.sql.SQLSyntaxErrorException: Table 'zycx.magic_backup_record_v2' doesn't exist
|
||||
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239)
|
||||
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1541)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:667)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:960)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1015)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1025)
|
||||
at org.ssssssss.magicapi.backup.service.MagicDatabaseBackupService.doBackup(MagicDatabaseBackupService.java:84)
|
||||
at org.ssssssss.magicapi.backup.service.MagicDatabaseBackupService.doBackup(MagicDatabaseBackupService.java:159)
|
||||
at org.ssssssss.magicapi.backup.service.MagicDatabaseBackupService.onFileEvent(MagicDatabaseBackupService.java:136)
|
||||
at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source)
|
||||
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
|
||||
at java.lang.reflect.Method.invoke(Method.java:498)
|
||||
at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:344)
|
||||
at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:229)
|
||||
at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:166)
|
||||
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
|
||||
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
|
||||
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
|
||||
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421)
|
||||
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:391)
|
||||
at org.ssssssss.magicapi.core.service.impl.DefaultMagicResourceService.lambda$saveFile$126(DefaultMagicResourceService.java:561)
|
||||
at org.ssssssss.magicapi.core.service.impl.DefaultMagicResourceService.writeLock(DefaultMagicResourceService.java:892)
|
||||
at org.ssssssss.magicapi.core.service.impl.DefaultMagicResourceService.saveFile(DefaultMagicResourceService.java:510)
|
||||
at org.ssssssss.magicapi.core.web.MagicResourceController.saveFile(MagicResourceController.java:92)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
|
||||
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
|
||||
at java.lang.reflect.Method.invoke(Method.java:498)
|
||||
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197)
|
||||
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:894)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
|
||||
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
|
||||
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1060)
|
||||
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962)
|
||||
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
|
||||
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
|
||||
at javax.servlet.http.HttpServlet.service(HttpServlet.java:652)
|
||||
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
|
||||
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.ssssssss.magicapi.core.config.MagicCorsFilter.doFilter(MagicCorsFilter.java:41)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
|
||||
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
|
||||
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
|
||||
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
|
||||
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
|
||||
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
|
||||
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
|
||||
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
|
||||
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
|
||||
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
|
||||
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1707)
|
||||
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
|
||||
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
|
||||
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
|
||||
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
|
||||
at java.lang.Thread.run(Thread.java:748)
|
||||
Caused by: java.sql.SQLSyntaxErrorException: Table 'zycx.magic_backup_record_v2' doesn't exist
|
||||
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
|
||||
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
|
||||
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)
|
||||
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1092)
|
||||
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1040)
|
||||
at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1347)
|
||||
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:1025)
|
||||
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:3201)
|
||||
at com.alibaba.druid.wall.WallFilter.preparedStatement_executeUpdate(WallFilter.java:654)
|
||||
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:3199)
|
||||
at com.alibaba.druid.filter.FilterAdapter.preparedStatement_executeUpdate(FilterAdapter.java:1091)
|
||||
at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeUpdate(FilterEventAdapter.java:491)
|
||||
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:3199)
|
||||
at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.executeUpdate(PreparedStatementProxyImpl.java:194)
|
||||
at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeUpdate(DruidPooledPreparedStatement.java:256)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.lambda$update$2(JdbcTemplate.java:965)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:651)
|
||||
... 77 common frames omitted
|
||||
2025-03-26 13:48:19 [http-nio-18088-exec-9] WARN o.s.m.b.s.MagicDatabaseBackupService - [doBackup,86] - 备份失败
|
||||
org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [insert into magic_backup_record_v2(id,create_date,tag,type,name,create_by,content) values(?,?,?,?,?,?,?)]; nested exception is java.sql.SQLSyntaxErrorException: Table 'zycx.magic_backup_record_v2' doesn't exist
|
||||
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239)
|
||||
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1541)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:667)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:960)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1015)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1025)
|
||||
at org.ssssssss.magicapi.backup.service.MagicDatabaseBackupService.doBackup(MagicDatabaseBackupService.java:84)
|
||||
at org.ssssssss.magicapi.backup.service.MagicDatabaseBackupService.doBackup(MagicDatabaseBackupService.java:159)
|
||||
at org.ssssssss.magicapi.backup.service.MagicDatabaseBackupService.onFileEvent(MagicDatabaseBackupService.java:136)
|
||||
at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source)
|
||||
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
|
||||
at java.lang.reflect.Method.invoke(Method.java:498)
|
||||
at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:344)
|
||||
at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:229)
|
||||
at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:166)
|
||||
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
|
||||
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
|
||||
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
|
||||
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421)
|
||||
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:391)
|
||||
at org.ssssssss.magicapi.core.service.impl.DefaultMagicResourceService.lambda$saveFile$126(DefaultMagicResourceService.java:561)
|
||||
at org.ssssssss.magicapi.core.service.impl.DefaultMagicResourceService.writeLock(DefaultMagicResourceService.java:892)
|
||||
at org.ssssssss.magicapi.core.service.impl.DefaultMagicResourceService.saveFile(DefaultMagicResourceService.java:510)
|
||||
at org.ssssssss.magicapi.core.web.MagicResourceController.saveFile(MagicResourceController.java:92)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
|
||||
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
|
||||
at java.lang.reflect.Method.invoke(Method.java:498)
|
||||
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197)
|
||||
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:894)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
|
||||
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
|
||||
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1060)
|
||||
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962)
|
||||
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
|
||||
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
|
||||
at javax.servlet.http.HttpServlet.service(HttpServlet.java:652)
|
||||
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
|
||||
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.ssssssss.magicapi.core.config.MagicCorsFilter.doFilter(MagicCorsFilter.java:41)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
|
||||
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
|
||||
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
|
||||
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
|
||||
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
|
||||
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
|
||||
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
|
||||
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
|
||||
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
|
||||
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
|
||||
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1707)
|
||||
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
|
||||
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
|
||||
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
|
||||
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
|
||||
at java.lang.Thread.run(Thread.java:748)
|
||||
Caused by: java.sql.SQLSyntaxErrorException: Table 'zycx.magic_backup_record_v2' doesn't exist
|
||||
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
|
||||
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
|
||||
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)
|
||||
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1092)
|
||||
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1040)
|
||||
at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1347)
|
||||
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:1025)
|
||||
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:3201)
|
||||
at com.alibaba.druid.wall.WallFilter.preparedStatement_executeUpdate(WallFilter.java:654)
|
||||
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:3199)
|
||||
at com.alibaba.druid.filter.FilterAdapter.preparedStatement_executeUpdate(FilterAdapter.java:1091)
|
||||
at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeUpdate(FilterEventAdapter.java:491)
|
||||
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:3199)
|
||||
at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.executeUpdate(PreparedStatementProxyImpl.java:194)
|
||||
at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeUpdate(DruidPooledPreparedStatement.java:256)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.lambda$update$2(JdbcTemplate.java:965)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:651)
|
||||
... 77 common frames omitted
|
||||
2025-03-26 13:48:24 [http-nio-18088-exec-3] INFO o.s.m.d.m.MagicDynamicDataSource - [delete,117] - 删除数据源:th-1740016868074:失败
|
||||
2025-03-26 13:48:26 [http-nio-18088-exec-10] ERROR o.s.m.c.w.MagicExceptionHandler - [exceptionHandler,28] - magic-api调用接口出错
|
||||
org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select id,create_date,tag,type,name,create_by from magic_backup_record_v2 where create_date < ? order by create_date desc]; nested exception is java.sql.SQLSyntaxErrorException: Table 'zycx.magic_backup_record_v2' doesn't exist
|
||||
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239)
|
||||
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1541)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:667)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:713)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:744)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:757)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:815)
|
||||
at org.ssssssss.magicapi.backup.service.MagicDatabaseBackupService.backupList(MagicDatabaseBackupService.java:92)
|
||||
at org.ssssssss.magicapi.backup.web.MagicBackupController.backups(MagicBackupController.java:39)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
|
||||
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
|
||||
at java.lang.reflect.Method.invoke(Method.java:498)
|
||||
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197)
|
||||
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:894)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
|
||||
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
|
||||
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1060)
|
||||
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962)
|
||||
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
|
||||
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
|
||||
at javax.servlet.http.HttpServlet.service(HttpServlet.java:626)
|
||||
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
|
||||
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.ssssssss.magicapi.core.config.MagicCorsFilter.doFilter(MagicCorsFilter.java:41)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
|
||||
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
|
||||
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
|
||||
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
|
||||
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
|
||||
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
|
||||
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
|
||||
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
|
||||
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
|
||||
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
|
||||
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1707)
|
||||
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
|
||||
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
|
||||
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
|
||||
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
|
||||
at java.lang.Thread.run(Thread.java:748)
|
||||
Caused by: java.sql.SQLSyntaxErrorException: Table 'zycx.magic_backup_record_v2' doesn't exist
|
||||
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
|
||||
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
|
||||
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)
|
||||
at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1003)
|
||||
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:3188)
|
||||
at com.alibaba.druid.wall.WallFilter.preparedStatement_executeQuery(WallFilter.java:640)
|
||||
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:3185)
|
||||
at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeQuery(FilterEventAdapter.java:465)
|
||||
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:3185)
|
||||
at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.executeQuery(PreparedStatementProxyImpl.java:181)
|
||||
at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeQuery(DruidPooledPreparedStatement.java:228)
|
||||
at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:722)
|
||||
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:651)
|
||||
... 62 common frames omitted
|
||||
2025-03-26 13:49:36 [SpringContextShutdownHook] INFO o.s.s.c.ThreadPoolTaskExecutor - [shutdown,218] - Shutting down ExecutorService 'applicationTaskExecutor'
|
||||
2025-03-26 13:49:36 [SpringContextShutdownHook] INFO c.a.d.p.DruidDataSource - [close,1825] - {dataSource-1} closed
|
||||
2025-03-26 13:49:39 [main] INFO o.s.m.MagicBootApplication - [logStarting,55] - Starting MagicBootApplication using Java 1.8.0_202-ea on DESKTOP-8LVANR3 with PID 13100 (D:\project\Zily\magic-boot\target\classes started by 张光起 in D:\project\Zily)
|
||||
2025-03-26 13:49:39 [main] INFO o.s.m.MagicBootApplication - [logStartupProfileInfo,679] - The following profiles are active: dev
|
||||
2025-03-26 13:49:40 [main] INFO o.s.b.w.e.t.TomcatWebServer - [initialize,108] - Tomcat initialized with port(s): 18088 (http)
|
||||
2025-03-26 13:49:40 [main] INFO o.a.c.h.Http11NioProtocol - [log,173] - Initializing ProtocolHandler ["http-nio-18088"]
|
||||
2025-03-26 13:49:40 [main] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat]
|
||||
2025-03-26 13:49:40 [main] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/9.0.45]
|
||||
2025-03-26 13:49:40 [main] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext
|
||||
2025-03-26 13:49:40 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext - [prepareWebApplicationContext,289] - Root WebApplicationContext: initialization completed in 467 ms
|
||||
2025-03-26 13:49:40 [main] INFO o.s.a.f.CglibAopProxy - [doValidateClass,263] - Unable to proxy interface-implementing method [public final org.springframework.web.servlet.HandlerExecutionChain org.springframework.web.servlet.handler.AbstractHandlerMapping.getHandler(javax.servlet.http.HttpServletRequest) throws java.lang.Exception] because it is marked as final: Consider using interface-based JDK proxies instead!
|
||||
2025-03-26 13:49:40 [main] INFO o.s.a.f.CglibAopProxy - [doValidateClass,263] - Unable to proxy interface-implementing method [public final void org.springframework.web.context.support.WebApplicationObjectSupport.setServletContext(javax.servlet.ServletContext)] because it is marked as final: Consider using interface-based JDK proxies instead!
|
||||
2025-03-26 13:49:40 [main] INFO o.s.a.f.CglibAopProxy - [doValidateClass,263] - Unable to proxy interface-implementing method [public final void org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(org.springframework.context.ApplicationContext) throws org.springframework.beans.BeansException] because it is marked as final: Consider using interface-based JDK proxies instead!
|
||||
2025-03-26 13:49:40 [main] INFO c.a.d.s.b.a.DruidDataSourceAutoConfigure - [dataSource,56] - Init DruidDataSource
|
||||
2025-03-26 13:49:44 [main] INFO c.a.d.p.DruidDataSource - [init,930] - {dataSource-1} inited
|
||||
2025-03-26 13:49:44 [main] INFO o.s.s.c.ThreadPoolTaskExecutor - [initialize,181] - Initializing ExecutorService 'applicationTaskExecutor'
|
||||
2025-03-26 13:49:44 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [magicNotifyService,244] - 未配置集群通知服务,本实例不会推送通知,集群环境下可能会有问题,如需开启,请引用magic-api-plugin-cluster插件
|
||||
2025-03-26 13:49:44 [main] INFO o.s.m.d.m.MagicDynamicDataSource - [put,67] - 注册数据源:default
|
||||
2025-03-26 13:49:44 [main] INFO o.s.m.s.b.s.MagicModuleConfiguration - [pageProvider,110] - 未找到分页实现,采用默认分页实现,分页配置:(页码=current,页大小=size,默认首页=1,默认页大小=10,最大页大小=-1)
|
||||
2025-03-26 13:49:44 [main] INFO o.s.m.s.b.s.MagicModuleConfiguration - [sqlCache,121] - 未找到SQL缓存实现,采用默认缓存实现(LRU+TTL),缓存配置:(容量=10000,TTL=3600000)
|
||||
2025-03-26 13:49:44 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [magicConfiguration,324] - magic-api工作目录:file://D:\project\Zily\data\magic-api
|
||||
2025-03-26 13:49:44 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [setupMagicModules,289] - 注册模块:log -> interface org.slf4j.Logger
|
||||
2025-03-26 13:49:44 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$setupMagicModules$15,294] - 注册模块:db -> class org.ssssssss.magicapi.modules.db.SQLModule
|
||||
2025-03-26 13:49:44 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$setupMagicModules$15,294] - 注册模块:http -> class org.ssssssss.magicapi.modules.http.HttpModule
|
||||
2025-03-26 13:49:44 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$setupMagicModules$15,294] - 注册模块:env -> class org.ssssssss.magicapi.modules.spring.EnvModule
|
||||
2025-03-26 13:49:44 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$setupMagicModules$15,294] - 注册模块:request -> class org.ssssssss.magicapi.modules.servlet.RequestModule
|
||||
2025-03-26 13:49:44 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$setupMagicModules$15,294] - 注册模块:response -> class org.ssssssss.magicapi.modules.servlet.ResponseModule
|
||||
2025-03-26 13:49:44 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$setupMagicModules$15,294] - 注册模块:magic -> class org.ssssssss.magicapi.core.service.impl.DefaultMagicAPIService
|
||||
2025-03-26 13:49:44 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$setupMagicModules$16,302] - 自动导入模块:db
|
||||
2025-03-26 13:49:44 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$null$18,310] - 注册扩展:class org.ssssssss.magicapi.modules.db.table.NamedTable -> class org.ssssssss.magicboot.extension.NamedTableFunctionExtension
|
||||
2025-03-26 13:49:44 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$null$18,310] - 注册扩展:class org.ssssssss.magicapi.modules.servlet.ResponseModule -> class org.ssssssss.magicboot.extension.ResponseFunctionExtension
|
||||
2025-03-26 13:49:44 [main] INFO o.s.s.c.ThreadPoolTaskScheduler - [initialize,181] - Initializing ExecutorService
|
||||
2025-03-26 13:49:44 [main] INFO o.s.m.s.b.s.MagicAPIAutoConfiguration - [lambda$magicConfiguration$21,376] - 注册请求拦截器:class org.ssssssss.magicboot.interceptor.PermissionInterceptor
|
||||
2025-03-26 13:49:44 [main] INFO o.a.c.h.Http11NioProtocol - [log,173] - Starting ProtocolHandler ["http-nio-18088"]
|
||||
2025-03-26 13:49:44 [main] INFO o.s.b.w.e.t.TomcatWebServer - [start,220] - Tomcat started on port(s): 18088 (http) with context path ''
|
||||
2025-03-26 13:49:44 [main] INFO o.s.m.MagicBootApplication - [logStarted,61] - Started MagicBootApplication in 4.663 seconds (JVM running for 5.124)
|
||||
2025-03-26 13:49:44 [http-nio-18088-exec-1] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring DispatcherServlet 'dispatcherServlet'
|
||||
2025-03-26 13:49:44 [http-nio-18088-exec-1] INFO o.s.w.s.DispatcherServlet - [initServletBean,525] - Initializing Servlet 'dispatcherServlet'
|
||||
2025-03-26 13:49:44 [http-nio-18088-exec-1] INFO o.s.w.s.DispatcherServlet - [initServletBean,547] - Completed initialization in 0 ms
|
||||
2025-03-26 14:27:53 [SpringContextShutdownHook] INFO o.s.s.c.ThreadPoolTaskExecutor - [shutdown,218] - Shutting down ExecutorService 'applicationTaskExecutor'
|
||||
2025-03-26 14:27:53 [SpringContextShutdownHook] INFO c.a.d.p.DruidDataSource - [close,1825] - {dataSource-1} closed
|
8
magic-boot/magic-boot.iml
Normal file
8
magic-boot/magic-boot.iml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="Spring" name="Spring">
|
||||
<configuration />
|
||||
</facet>
|
||||
</component>
|
||||
</module>
|
121
magic-boot/pom.xml
Normal file
121
magic-boot/pom.xml
Normal file
@ -0,0 +1,121 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.ssssssss</groupId>
|
||||
<artifactId>magic-boot-parent</artifactId>
|
||||
<version>0.0.1</version>
|
||||
</parent>
|
||||
<groupId>org.ssssssss</groupId>
|
||||
<artifactId>magic-boot</artifactId>
|
||||
<version>0.0.1</version>
|
||||
<name>magic-boot</name>
|
||||
<description>magic-boot</description>
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<magic-api.version>2.0.2</magic-api.version>
|
||||
<druid.version>1.1.10</druid.version>
|
||||
<hutool-all.version>5.7.22</hutool-all.version>
|
||||
<sa-token.version>1.26.0</sa-token.version>
|
||||
<poi.version>4.1.2</poi.version>
|
||||
<aliyun-core.version>4.6.0</aliyun-core.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-jdbc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.ssssssss</groupId>
|
||||
<artifactId>magic-api-spring-boot-starter</artifactId>
|
||||
<version>${magic-api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
<version>${druid.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>${hutool-all.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-spring-boot-starter</artifactId>
|
||||
<version>${sa-token.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.ssssssss</groupId>
|
||||
<artifactId>magic-api-plugin-task</artifactId>
|
||||
<version>${magic-api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.ssssssss</groupId>
|
||||
<artifactId>magic-api-plugin-component</artifactId>
|
||||
<version>${magic-api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>aliyun-java-sdk-core</artifactId>
|
||||
<version>${aliyun-core.version}</version>
|
||||
</dependency>
|
||||
<!-- alibaba json -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.37</version>
|
||||
</dependency>
|
||||
<!-- apache httpclient组件 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
</dependency>
|
||||
<!-- xxl-job组件 -->
|
||||
<dependency>
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-job-core</artifactId>
|
||||
<version>2.4.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.16.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
<version>7.4.1.jre8</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<finalName>magic-boot</finalName>
|
||||
<mainClass>org.ssssssss.magicboot.MagicBootApplication</mainClass>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -0,0 +1,13 @@
|
||||
package org.ssssssss.magicboot;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class MagicBootApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(MagicBootApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package org.ssssssss.magicboot.configuration;
|
||||
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
||||
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
@Configuration
|
||||
public class MagicBootConfiguration {
|
||||
|
||||
@Bean
|
||||
public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() {
|
||||
LocalDateTimeSerializer localDateTimeSerializer = new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||
return builder -> builder.serializerByType(LocalDateTime.class, localDateTimeSerializer);
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package org.ssssssss.magicboot.configuration;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.scheduling.concurrent.ConcurrentTaskExecutor;
|
||||
import org.springframework.web.servlet.config.annotation.AsyncSupportConfigurer;
|
||||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
import org.ssssssss.magicboot.model.Global;
|
||||
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
@Configuration
|
||||
public class WebConfiguration implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
registry.addResourceHandler(Global.USER_FILES_BASE_URL + "**").addResourceLocations("file:" + Global.getDir() + Global.USER_FILES_BASE_URL);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package org.ssssssss.magicboot.extension;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.ssssssss.magicapi.modules.db.table.NamedTable;
|
||||
import org.ssssssss.magicboot.model.MagicBootConstants;
|
||||
import org.ssssssss.script.annotation.Comment;
|
||||
import org.ssssssss.script.functions.ExtensionMethod;
|
||||
import org.ssssssss.script.runtime.RuntimeContext;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
public class NamedTableFunctionExtension implements ExtensionMethod {
|
||||
|
||||
@Override
|
||||
public Class<?> support() {
|
||||
return NamedTable.class;
|
||||
}
|
||||
|
||||
@Comment("保存到表中,当主键有值时则修改,否则插入")
|
||||
public static Object saveOrUpdate(NamedTable namedTable, RuntimeContext runtimeContext, @Comment("各项列和值") Map<String, Object> data){
|
||||
namedTable.setAttribute(MagicBootConstants.COMMON_FIELD, true);
|
||||
namedTable.save(runtimeContext, data,true);
|
||||
return namedTable.getAttribute(MagicBootConstants.ID);
|
||||
}
|
||||
|
||||
@Comment("保存到表中,当主键有值时则修改,否则插入")
|
||||
public static Object saveOrUpdate(NamedTable namedTable, RuntimeContext runtimeContext){
|
||||
return saveOrUpdate(namedTable, runtimeContext, null);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package org.ssssssss.magicboot.extension;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.context.request.RequestAttributes;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
import org.ssssssss.magicapi.core.context.RequestContext;
|
||||
import org.ssssssss.magicapi.modules.servlet.ResponseModule;
|
||||
import org.ssssssss.script.annotation.Comment;
|
||||
import org.ssssssss.script.functions.ExtensionMethod;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
@Component
|
||||
public class ResponseFunctionExtension implements ExtensionMethod {
|
||||
|
||||
@Override
|
||||
public Class<?> support() {
|
||||
return ResponseModule.class;
|
||||
}
|
||||
|
||||
private HttpServletResponse getResponse() {
|
||||
RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
|
||||
if (requestAttributes instanceof ServletRequestAttributes) {
|
||||
return ((ServletRequestAttributes) requestAttributes).getResponse();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Comment("转发")
|
||||
public ResponseModule.NullValue dispatcher(ResponseModule responseModule, String url) throws ServletException, IOException {
|
||||
HttpServletRequest request = RequestContext.getHttpServletRequest();
|
||||
request.getRequestDispatcher(url).forward(request, getResponse());
|
||||
return responseModule.end();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package org.ssssssss.magicboot.fxapi;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Description: 封装httpClient响应结果
|
||||
*
|
||||
* @author gengchunjing
|
||||
* @date Created on 2019年11月6日
|
||||
*/
|
||||
public class HttpClientResult implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 2168152194164783950L;
|
||||
|
||||
/**
|
||||
* 响应状态码
|
||||
*/
|
||||
private int code;
|
||||
|
||||
/**
|
||||
* 响应数据
|
||||
*/
|
||||
private String content;
|
||||
|
||||
public HttpClientResult() {
|
||||
}
|
||||
|
||||
public HttpClientResult(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public HttpClientResult(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public HttpClientResult(int code, String content) {
|
||||
this.code = code;
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "HttpClientResult [code=" + code + ", content=" + content + "]";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,324 @@
|
||||
package org.ssssssss.magicboot.fxapi;
|
||||
|
||||
import org.apache.http.HttpStatus;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||
import org.apache.http.client.methods.*;
|
||||
import org.apache.http.client.utils.URIBuilder;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Description: httpClient工具类
|
||||
*
|
||||
* @author gengchunjing
|
||||
* @date Created on 2019年11月6日
|
||||
*/
|
||||
public class HttpClientUtils {
|
||||
|
||||
// 编码格式。发送编码格式统一用UTF-8
|
||||
private static final String ENCODING = "UTF-8";
|
||||
|
||||
// 设置连接超时时间,单位毫秒。
|
||||
private static final int CONNECT_TIMEOUT = 60000;
|
||||
|
||||
// 请求获取数据的超时时间(即响应时间),单位毫秒。
|
||||
private static final int SOCKET_TIMEOUT = 60000;
|
||||
|
||||
/**
|
||||
* 发送get请求;不带请求头和请求参数
|
||||
*
|
||||
* @param url 请求地址
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static HttpClientResult doGet(String url) throws Exception {
|
||||
return doGet(url, null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送get请求;带请求参数
|
||||
*
|
||||
* @param url 请求地址
|
||||
* @param params 请求参数集合
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static HttpClientResult doGet(String url, Map<String, String> params) throws Exception {
|
||||
return doGet(url, null, params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送get请求;带请求头和请求参数
|
||||
*
|
||||
* @param url 请求地址
|
||||
* @param headers 请求头集合
|
||||
* @param params 请求参数集合
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static HttpClientResult doGet(String url, Map<String, String> headers, Map<String, String> params) throws Exception {
|
||||
// 创建httpClient对象
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建访问的地址
|
||||
URIBuilder uriBuilder = new URIBuilder(url);
|
||||
if (params != null) {
|
||||
Set<Entry<String, String>> entrySet = params.entrySet();
|
||||
for (Entry<String, String> entry : entrySet) {
|
||||
uriBuilder.setParameter(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
// 创建http对象
|
||||
HttpGet httpGet = new HttpGet(uriBuilder.build());
|
||||
/**
|
||||
* setConnectTimeout:设置连接超时时间,单位毫秒。
|
||||
* setConnectionRequestTimeout:设置从connect Manager(连接池)获取Connection
|
||||
* 超时时间,单位毫秒。这个属性是新加的属性,因为目前版本是可以共享连接池的。
|
||||
* setSocketTimeout:请求获取数据的超时时间(即响应时间),单位毫秒。 如果访问一个接口,多少时间内无法返回数据,就直接放弃此次调用。
|
||||
*/
|
||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(CONNECT_TIMEOUT).setSocketTimeout(SOCKET_TIMEOUT).build();
|
||||
httpGet.setConfig(requestConfig);
|
||||
|
||||
// 设置请求头
|
||||
packageHeader(headers, httpGet);
|
||||
|
||||
// 创建httpResponse对象
|
||||
CloseableHttpResponse httpResponse = null;
|
||||
|
||||
try {
|
||||
// 执行请求并获得响应结果
|
||||
return getHttpClientResult(httpResponse, httpClient, httpGet);
|
||||
} finally {
|
||||
// 释放资源
|
||||
release(httpResponse, httpClient);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送post请求;不带请求头和请求参数
|
||||
*
|
||||
* @param url 请求地址
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static HttpClientResult doPost(String url) throws Exception {
|
||||
return doPost(url, null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送post请求;带请求参数
|
||||
*
|
||||
* @param url 请求地址
|
||||
* @param params 参数集合
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static HttpClientResult doPost(String url, Map<String, String> params) throws Exception {
|
||||
return doPost(url, null, params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送post请求;带Json请求参数
|
||||
*
|
||||
* @param url 请求地址
|
||||
* @param json 参数集合
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static HttpClientResult doPostJson(String url,String json) throws Exception {
|
||||
return doPostJson(url, null, json);
|
||||
}
|
||||
/**
|
||||
* 发送post请求;带请求头和请求参数
|
||||
*
|
||||
* @param url 请求地址
|
||||
* @param headers 请求头集合
|
||||
* @param params 请求参数集合
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static HttpClientResult doPost(String url, Map<String, String> headers, Map<String, String> params) throws Exception {
|
||||
// 创建httpClient对象
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建http对象
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
/**
|
||||
* setConnectTimeout:设置连接超时时间,单位毫秒。
|
||||
* setConnectionRequestTimeout:设置从connect Manager(连接池)获取Connection
|
||||
* 超时时间,单位毫秒。这个属性是新加的属性,因为目前版本是可以共享连接池的。
|
||||
* setSocketTimeout:请求获取数据的超时时间(即响应时间),单位毫秒。 如果访问一个接口,多少时间内无法返回数据,就直接放弃此次调用。
|
||||
*/
|
||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(CONNECT_TIMEOUT).setSocketTimeout(SOCKET_TIMEOUT).build();
|
||||
httpPost.setConfig(requestConfig);
|
||||
|
||||
packageHeader(headers, httpPost);
|
||||
|
||||
// 封装请求参数
|
||||
packageParam(params,httpPost);
|
||||
|
||||
// 创建httpResponse对象
|
||||
CloseableHttpResponse httpResponse = null;
|
||||
|
||||
try {
|
||||
// 执行请求并获得响应结果
|
||||
return getHttpClientResult(httpResponse, httpClient, httpPost);
|
||||
} finally {
|
||||
// 释放资源
|
||||
release(httpResponse, httpClient);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送post请求;带请求头和请求参数 POST+JOSN
|
||||
*
|
||||
* @param url 请求地址
|
||||
* @param headers 请求头集合
|
||||
* @param json json参数集合
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static HttpClientResult doPostJson(String url, Map<String, String> headers,String json) throws Exception {
|
||||
// 创建httpClient对象
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
|
||||
// 创建http对象
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
/**
|
||||
* setConnectTimeout:设置连接超时时间,单位毫秒。
|
||||
* setConnectionRequestTimeout:设置从connect Manager(连接池)获取Connection
|
||||
* 超时时间,单位毫秒。这个属性是新加的属性,因为目前版本是可以共享连接池的。
|
||||
* setSocketTimeout:请求获取数据的超时时间(即响应时间),单位毫秒。 如果访问一个接口,多少时间内无法返回数据,就直接放弃此次调用。
|
||||
*/
|
||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(CONNECT_TIMEOUT).setSocketTimeout(SOCKET_TIMEOUT).build();
|
||||
httpPost.setConfig(requestConfig);
|
||||
//封装请求头
|
||||
packageHeader(headers, httpPost);
|
||||
|
||||
// 封装请求参数
|
||||
packageParam_json(json, httpPost);
|
||||
|
||||
// 创建httpResponse对象
|
||||
CloseableHttpResponse httpResponse = null;
|
||||
|
||||
try {
|
||||
// 执行请求并获得响应结果
|
||||
return getHttpClientResult(httpResponse, httpClient, httpPost);
|
||||
} finally {
|
||||
// 释放资源
|
||||
release(httpResponse, httpClient);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Description: 封装请求头
|
||||
* @param params
|
||||
* @param httpMethod
|
||||
*/
|
||||
public static void packageHeader(Map<String, String> params, HttpRequestBase httpMethod) {
|
||||
// 封装请求头
|
||||
if (params != null) {
|
||||
Set<Entry<String, String>> entrySet = params.entrySet();
|
||||
for (Entry<String, String> entry : entrySet) {
|
||||
// 设置到请求头到HttpRequestBase对象中
|
||||
httpMethod.setHeader(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Description: 封装请求参数
|
||||
*
|
||||
* @param params
|
||||
* @param httpMethod
|
||||
* @throws UnsupportedEncodingException
|
||||
*/
|
||||
public static void packageParam(Map<String, String> params, HttpEntityEnclosingRequestBase httpMethod)
|
||||
throws UnsupportedEncodingException {
|
||||
// 封装请求参数
|
||||
if (params != null) {
|
||||
List<NameValuePair> nvps = new ArrayList<NameValuePair>();
|
||||
Set<Entry<String, String>> entrySet = params.entrySet();
|
||||
for (Entry<String, String> entry : entrySet) {
|
||||
nvps.add(new BasicNameValuePair(entry.getKey(), entry.getValue()));
|
||||
}
|
||||
|
||||
// 设置到请求的http对象中
|
||||
httpMethod.setEntity(new UrlEncodedFormEntity(nvps, ENCODING));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Description: 获得响应结果
|
||||
*
|
||||
* @param httpResponse
|
||||
* @param httpClient
|
||||
* @param httpMethod
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static HttpClientResult getHttpClientResult(CloseableHttpResponse httpResponse,
|
||||
CloseableHttpClient httpClient, HttpRequestBase httpMethod) throws Exception {
|
||||
// 执行请求
|
||||
httpResponse = httpClient.execute(httpMethod);
|
||||
|
||||
// 获取返回结果
|
||||
if (httpResponse != null && httpResponse.getStatusLine() != null) {
|
||||
String content = "";
|
||||
if (httpResponse.getEntity() != null) {
|
||||
content = EntityUtils.toString(httpResponse.getEntity(), ENCODING);
|
||||
}
|
||||
return new HttpClientResult(httpResponse.getStatusLine().getStatusCode(), content);
|
||||
}
|
||||
return new HttpClientResult(HttpStatus.SC_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
/**
|
||||
* Description: 释放资源
|
||||
*
|
||||
* @param httpResponse
|
||||
* @param httpClient
|
||||
* @throws IOException
|
||||
*/
|
||||
public static void release(CloseableHttpResponse httpResponse, CloseableHttpClient httpClient) throws IOException {
|
||||
// 释放资源
|
||||
if (httpResponse != null) {
|
||||
httpResponse.close();
|
||||
}
|
||||
if (httpClient != null) {
|
||||
httpClient.close();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Description: 封装请求参数 json
|
||||
*
|
||||
* @param json
|
||||
* @param httpMethod
|
||||
* @throws UnsupportedEncodingException
|
||||
*/
|
||||
public static void packageParam_json(String json,HttpEntityEnclosingRequestBase httpMethod)
|
||||
throws UnsupportedEncodingException {
|
||||
// 封装请求参数
|
||||
if(json!= null){
|
||||
StringEntity s = new StringEntity(json,ENCODING);
|
||||
s.setContentEncoding(ENCODING);
|
||||
s.setContentType("application/json");
|
||||
httpMethod.setEntity(s);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
1283
magic-boot/src/main/java/org/ssssssss/magicboot/fxapi/NewFXAPI.java
Normal file
1283
magic-boot/src/main/java/org/ssssssss/magicboot/fxapi/NewFXAPI.java
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,110 @@
|
||||
package org.ssssssss.magicboot.fxapi;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.ssssssss.magicboot.fxapi.model.AppAccessToken;
|
||||
import org.ssssssss.magicboot.fxapi.model.CorpAccessToken;
|
||||
import org.ssssssss.magicboot.fxapi.model.XKopenAPI;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 纷享请求token
|
||||
*/
|
||||
public class XKTokenAccess {
|
||||
/**
|
||||
* 验证连接
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
System.out.println(new XKTokenAccess().getCorpAccessToken());
|
||||
}
|
||||
private final Logger log = LoggerFactory.getLogger(XKTokenAccess.class);
|
||||
|
||||
|
||||
private static final String KEY_EXPIRES_IN = "expiresIn";
|
||||
private static final String KEY_TOKEN = "token";
|
||||
private static final String APP_ACCESS_TOKEN_KEY_PREX = "appAccessToken_";
|
||||
private static final String CORP_ACCESS_TOKEN_KEY_PREX = "corpAccessToken_";
|
||||
|
||||
private static final String appId = "FSAID_131ee7a";
|
||||
private static final String appSecret= "b9d85f718d46460aaf5c45b0afa27792";
|
||||
private static final String permanentCode= "334912202A8400E338E6A7BD8C45C219";
|
||||
|
||||
private static final String prefix = "https://open.fxiaoke.com";
|
||||
|
||||
private static Map<String,Map<String, Object>> accessTokenMap= new HashMap();
|
||||
|
||||
public static Map<String,Map<String, Object>> accessTokenMap() {
|
||||
return accessTokenMap;
|
||||
}
|
||||
|
||||
public AppAccessToken getAppAccessToken() {
|
||||
String key = APP_ACCESS_TOKEN_KEY_PREX.concat(appId);
|
||||
Map<String, Object> token = accessTokenMap.get(key);
|
||||
if(token != null){
|
||||
long expiresIn = (Long) token.get(KEY_EXPIRES_IN);
|
||||
|
||||
if (System.currentTimeMillis() < expiresIn) {
|
||||
return (AppAccessToken) token.get(KEY_TOKEN);
|
||||
}
|
||||
accessTokenMap.remove(key);
|
||||
}
|
||||
String appAccessToken = null;
|
||||
XKopenAPI XKAPI = new XKopenAPI();
|
||||
XKAPI.setAppId(appId);
|
||||
XKAPI.setAppSecret(appSecret);
|
||||
String param = JSON.toJSONString(XKAPI);
|
||||
|
||||
AppAccessToken appToken =null;
|
||||
try {
|
||||
String url = prefix + "/cgi/appAccessToken/get";
|
||||
HttpClientResult result = HttpClientUtils.doPostJson(url,param);
|
||||
appToken = JSON.toJavaObject(JSONObject.parseObject(result.getContent()),AppAccessToken.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
token = new HashMap();
|
||||
// 减去5分钟,以免过时
|
||||
token.put(KEY_EXPIRES_IN, (appToken.getExpiresIn() - 5 * 60) * 1000 + System.currentTimeMillis());
|
||||
token.put(KEY_TOKEN, appAccessToken);
|
||||
accessTokenMap.put(key, token);
|
||||
return appToken;
|
||||
}
|
||||
|
||||
public CorpAccessToken getCorpAccessToken() {
|
||||
String key = CORP_ACCESS_TOKEN_KEY_PREX.concat(appId);
|
||||
Map<String, Object> token = accessTokenMap.get(key);
|
||||
if(token != null){
|
||||
long expiresIn = (Long) token.get(KEY_EXPIRES_IN);
|
||||
|
||||
if (System.currentTimeMillis() < expiresIn) {
|
||||
return (CorpAccessToken) token.get(KEY_TOKEN);
|
||||
}
|
||||
accessTokenMap.remove(key);
|
||||
}
|
||||
String corpAccessToken = null;
|
||||
XKopenAPI XKAPI = new XKopenAPI();
|
||||
XKAPI.setAppId(appId);
|
||||
XKAPI.setAppSecret(appSecret);
|
||||
XKAPI.setPermanentCode(permanentCode);
|
||||
String param = JSON.toJSONString(XKAPI);
|
||||
CorpAccessToken corpToken =null;
|
||||
|
||||
try {
|
||||
String url = prefix + "/cgi/corpAccessToken/get/V2";
|
||||
HttpClientResult result = HttpClientUtils.doPostJson(url,param);
|
||||
System.out.println(result);
|
||||
corpToken = JSON.toJavaObject(JSONObject.parseObject(result.getContent()),CorpAccessToken.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
token = new HashMap();
|
||||
// 减去5分钟,以免过时
|
||||
token.put(KEY_EXPIRES_IN, (corpToken.getExpiresIn() - 5 * 60) * 1000 + System.currentTimeMillis());
|
||||
token.put(KEY_TOKEN, corpToken);
|
||||
accessTokenMap.put(key, token);
|
||||
return corpToken;
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package org.ssssssss.magicboot.fxapi.model;
|
||||
|
||||
public class AppAccessToken {
|
||||
private String appAccessToken;
|
||||
private Long expiresIn;
|
||||
private String errorCode;
|
||||
private String errorMessage;
|
||||
|
||||
public String getAppAccessToken() {
|
||||
return appAccessToken;
|
||||
}
|
||||
|
||||
public void setAppAccessToken(String appAccessToken) {
|
||||
this.appAccessToken = appAccessToken;
|
||||
}
|
||||
|
||||
public Long getExpiresIn() {
|
||||
return expiresIn;
|
||||
}
|
||||
|
||||
public void setExpiresIn(Long expiresIn) {
|
||||
this.expiresIn = expiresIn;
|
||||
}
|
||||
|
||||
public String getErrorCode() {
|
||||
return errorCode;
|
||||
}
|
||||
|
||||
public void setErrorCode(String errorCode) {
|
||||
this.errorCode = errorCode;
|
||||
}
|
||||
|
||||
public String getErrorMessage() {
|
||||
return errorMessage;
|
||||
}
|
||||
|
||||
public void setErrorMessage(String errorMessage) {
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AppAccessToken{" +
|
||||
"appAccessToken='" + appAccessToken + '\'' +
|
||||
", expiresIn=" + expiresIn +
|
||||
", errorCode='" + errorCode + '\'' +
|
||||
", errorMessage='" + errorMessage + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,59 @@
|
||||
package org.ssssssss.magicboot.fxapi.model;
|
||||
|
||||
public class CorpAccessToken {
|
||||
private String corpAccessToken;
|
||||
private Long expiresIn;
|
||||
private String errorCode;
|
||||
private String errorMessage;
|
||||
private String corpId;
|
||||
public String getCorpAccessToken() {
|
||||
return corpAccessToken;
|
||||
}
|
||||
|
||||
public void setCorpAccessToken(String corpAccessToken) {
|
||||
this.corpAccessToken = corpAccessToken;
|
||||
}
|
||||
|
||||
public Long getExpiresIn() {
|
||||
return expiresIn;
|
||||
}
|
||||
|
||||
public void setExpiresIn(Long expiresIn) {
|
||||
this.expiresIn = expiresIn;
|
||||
}
|
||||
|
||||
public String getErrorCode() {
|
||||
return errorCode;
|
||||
}
|
||||
|
||||
public void setErrorCode(String errorCode) {
|
||||
this.errorCode = errorCode;
|
||||
}
|
||||
|
||||
public String getErrorMessage() {
|
||||
return errorMessage;
|
||||
}
|
||||
|
||||
public void setErrorMessage(String errorMessage) {
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
|
||||
public String getCorpId() {
|
||||
return corpId;
|
||||
}
|
||||
|
||||
public void setCorpId(String corpId) {
|
||||
this.corpId = corpId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CorpAccessToken{" +
|
||||
"corpAccessToken='" + corpAccessToken + '\'' +
|
||||
", expiresIn=" + expiresIn +
|
||||
", errorCode='" + errorCode + '\'' +
|
||||
", errorMessage='" + errorMessage + '\'' +
|
||||
", corpId='" + corpId + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package org.ssssssss.magicboot.fxapi.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CrmApiCaseInfo {
|
||||
|
||||
private String id;//主键
|
||||
private String createTime;//创建人
|
||||
private String createBy;//创建时间
|
||||
private String updateTime;//修改人
|
||||
private String uodateBy;//修改时间
|
||||
private String status;//状态
|
||||
private String beginField;//开始字段
|
||||
private String endField;//结束字段
|
||||
private String jcId;//集成表id
|
||||
|
||||
private String AFieldName;//
|
||||
private String AFieldKey;//
|
||||
private String BFieldValue;//
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package org.ssssssss.magicboot.fxapi.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CrmApiField {
|
||||
|
||||
private String field_id;//主键
|
||||
private String createTime;//创建人
|
||||
private String createBy;//创建时间
|
||||
private String updateTime;//修改人
|
||||
private String uodateBy;//修改时间
|
||||
private String status;//状态
|
||||
private String fieldName;//字段名称
|
||||
private String fieldKey;//字段值
|
||||
private String fieldValue;//字段取值参数
|
||||
private String apiId;//接口主键
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package org.ssssssss.magicboot.fxapi.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CrmApiInfo {
|
||||
|
||||
private String apiId;//主键
|
||||
private String createTime;//创建人
|
||||
private String createBy;//创建时间
|
||||
private String updateTime;//修改人
|
||||
private String uodateBy;//修改时间
|
||||
private String status;//状态
|
||||
private String apiName;//接口名称
|
||||
private String apiType;//接口类型
|
||||
private String remark;//备注
|
||||
private String apiUrl;//接口路径
|
||||
private String apiParam;//接口参数
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package org.ssssssss.magicboot.fxapi.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CrmFXApiParam {
|
||||
|
||||
private String operator;//主键
|
||||
private String fieldKey;//字段值
|
||||
private Object fieldValue;//字段取值参数
|
||||
|
||||
public String getOperator() {
|
||||
return operator;
|
||||
}
|
||||
|
||||
public void setOperator(String operator) {
|
||||
this.operator = operator;
|
||||
}
|
||||
|
||||
public String getFieldKey() {
|
||||
return fieldKey;
|
||||
}
|
||||
|
||||
public void setFieldKey(String fieldKey) {
|
||||
this.fieldKey = fieldKey;
|
||||
}
|
||||
|
||||
public Object getFieldValue() {
|
||||
return fieldValue;
|
||||
}
|
||||
|
||||
public void setFieldValue(Object fieldValue) {
|
||||
this.fieldValue = fieldValue;
|
||||
}
|
||||
|
||||
public CrmFXApiParam(String operator, String fieldKey, Object fieldValue) {
|
||||
this.fieldValue = fieldValue;
|
||||
this.fieldKey = fieldKey;
|
||||
this.operator = operator;
|
||||
}
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package org.ssssssss.magicboot.fxapi.model;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class Token {
|
||||
/* 令牌 */
|
||||
private String Token;
|
||||
|
||||
private String code;
|
||||
|
||||
/* 有效期 默认1小时 3600s */
|
||||
private int Validity;
|
||||
|
||||
private String IPAddress;
|
||||
|
||||
private String Language;
|
||||
|
||||
// 更新时间
|
||||
private Date Create;
|
||||
|
||||
public String getToken() {
|
||||
return Token;
|
||||
}
|
||||
|
||||
public void setToken(String token) {
|
||||
Token = token;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public int getValidity() {
|
||||
return Validity;
|
||||
}
|
||||
|
||||
public void setValidity(int validity) {
|
||||
Validity = validity;
|
||||
}
|
||||
|
||||
public String getIPAddress() {
|
||||
return IPAddress;
|
||||
}
|
||||
|
||||
public void setIPAddress(String iPAddress) {
|
||||
IPAddress = iPAddress;
|
||||
}
|
||||
|
||||
public String getLanguage() {
|
||||
return Language;
|
||||
}
|
||||
|
||||
public void setLanguage(String language) {
|
||||
Language = language;
|
||||
}
|
||||
|
||||
public Date getCreate() {
|
||||
return Create;
|
||||
}
|
||||
|
||||
public void setCreate(Date create) {
|
||||
Create = create;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package org.ssssssss.magicboot.fxapi.model;
|
||||
|
||||
public class XKopenAPI {
|
||||
private String appId;
|
||||
private String appSecret;
|
||||
private String permanentCode;
|
||||
|
||||
public String getAppId() {
|
||||
return appId;
|
||||
}
|
||||
|
||||
public void setAppId(String appId) {
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public String getAppSecret() {
|
||||
return appSecret;
|
||||
}
|
||||
|
||||
public void setAppSecret(String appSecret) {
|
||||
this.appSecret = appSecret;
|
||||
}
|
||||
|
||||
public String getPermanentCode() {
|
||||
return permanentCode;
|
||||
}
|
||||
|
||||
public void setPermanentCode(String permanentCode) {
|
||||
this.permanentCode = permanentCode;
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package org.ssssssss.magicboot.interceptor;
|
||||
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.ssssssss.magicapi.modules.db.inteceptor.NamedTableInterceptor;
|
||||
import org.ssssssss.magicapi.modules.db.model.SqlMode;
|
||||
import org.ssssssss.magicapi.modules.db.table.NamedTable;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static org.ssssssss.magicboot.model.MagicBootConstants.*;
|
||||
|
||||
@Component
|
||||
public class NamedTableHandlerInterceptor implements NamedTableInterceptor {
|
||||
|
||||
@Override
|
||||
public void preHandle(SqlMode sqlMode, NamedTable namedTable) {
|
||||
if(Boolean.TRUE == namedTable.getAttribute(COMMON_FIELD)){
|
||||
if(sqlMode == SqlMode.INSERT) {
|
||||
String id = IdUtil.simpleUUID();
|
||||
namedTable.setAttribute(namedTable.getPrimary(), id);
|
||||
namedTable.column(namedTable.getPrimary(), id);
|
||||
namedTable.column(CREATE_BY, StpUtil.getLoginId());
|
||||
namedTable.column(CREATE_DATE, new Date());
|
||||
}
|
||||
if(sqlMode == SqlMode.UPDATE){
|
||||
namedTable.setAttribute(namedTable.getPrimary(), namedTable.getColumns().get(namedTable.getPrimary()));
|
||||
namedTable.column(UPDATE_BY, StpUtil.getLoginId());
|
||||
namedTable.column(UPDATE_DATE, new Date());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
package org.ssssssss.magicboot.interceptor;
|
||||
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.hutool.extra.servlet.ServletUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
import org.ssssssss.magicapi.core.context.RequestEntity;
|
||||
import org.ssssssss.magicapi.core.interceptor.RequestInterceptor;
|
||||
import org.ssssssss.magicapi.core.model.ApiInfo;
|
||||
import org.ssssssss.magicapi.core.model.Options;
|
||||
import org.ssssssss.magicapi.core.service.MagicAPIService;
|
||||
import org.ssssssss.magicapi.core.service.MagicResourceService;
|
||||
import org.ssssssss.magicapi.utils.PathUtils;
|
||||
import org.ssssssss.magicboot.model.StatusCode;
|
||||
import org.ssssssss.script.MagicScriptContext;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@Component
|
||||
@Order(1)
|
||||
public class PermissionInterceptor implements RequestInterceptor, HandlerInterceptor {
|
||||
|
||||
@Autowired
|
||||
MagicAPIService magicAPIService;
|
||||
|
||||
@Autowired
|
||||
MagicResourceService magicResourceService;
|
||||
|
||||
@Autowired
|
||||
private JdbcTemplate template;
|
||||
|
||||
/*
|
||||
* 当返回对象时,直接将此对象返回到页面,返回null时,继续执行后续操作
|
||||
*/
|
||||
@Override
|
||||
public Object preHandle(ApiInfo info, MagicScriptContext context, HttpServletRequest request, HttpServletResponse response) {
|
||||
String requireLogin = Objects.toString(info.getOptionValue(Options.REQUIRE_LOGIN), "");
|
||||
if(requireLogin.equals("false")){
|
||||
return null;
|
||||
}
|
||||
if(!StpUtil.isLogin()){
|
||||
// return StatusCode.CERTIFICATE_EXPIRED.json();
|
||||
return null;
|
||||
} else {
|
||||
// TODO
|
||||
List<String> permissions = (List<String>) magicAPIService.execute("post", "/system/security/permissions", new HashMap<String, Object>());
|
||||
String permission = Objects.toString(info.getOptionValue(Options.PERMISSION), "");
|
||||
if (StringUtils.isNotBlank(permission) && !permissions.contains(permission)) {
|
||||
return StatusCode.FORBIDDEN.json();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object postHandle(RequestEntity requestEntity, Object returnValue) throws Exception {
|
||||
if(StpUtil.isLogin()){
|
||||
try {
|
||||
HttpServletRequest request = requestEntity.getRequest();
|
||||
ApiInfo info = requestEntity.getApiInfo();
|
||||
template.update("insert into sys_oper_log(api_name, api_path, api_method, cost_time, create_by, create_date, user_agent, user_ip) values(?,?,?,?,?,?,?,?)",
|
||||
// PathUtils.replaceSlash(groupServiceProvider.getFullName(info.getGroupId()) + "/" + info.getName()).replace("/","-"),
|
||||
PathUtils.replaceSlash(String.format("/%s/%s", magicResourceService.getGroupName(info.getGroupId()), info.getName())),
|
||||
request.getRequestURI(),
|
||||
request.getMethod(),
|
||||
System.currentTimeMillis() - requestEntity.getRequestTime(),
|
||||
StpUtil.getLoginId(),
|
||||
new Date(requestEntity.getRequestTime()),
|
||||
request.getHeader("User-Agent"),
|
||||
ServletUtil.getClientIP(request));
|
||||
} catch (Exception ignored){
|
||||
ignored.printStackTrace();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package org.ssssssss.magicboot.model;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class CodeCacheMap {
|
||||
|
||||
private static Map<String, String> map = new HashMap<String, String>();
|
||||
|
||||
public static void put(String key, String value){
|
||||
map.put(key, value);
|
||||
}
|
||||
|
||||
public static void remove(String key){
|
||||
map.remove(key);
|
||||
}
|
||||
|
||||
public static String get(String key){
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package org.ssssssss.magicboot.model;
|
||||
|
||||
public class CorpAccessU9Token {
|
||||
|
||||
private Long resCode;
|
||||
private String data;
|
||||
private String errorCode;
|
||||
private String errorMessage;
|
||||
|
||||
private String resMsg;
|
||||
|
||||
|
||||
public Long getResCode() {
|
||||
return resCode;
|
||||
}
|
||||
|
||||
public void setResCode(Long resCode) {
|
||||
this.resCode = resCode;
|
||||
}
|
||||
|
||||
public String getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(String data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public String getErrorCode() {
|
||||
return errorCode;
|
||||
}
|
||||
|
||||
public void setErrorCode(String errorCode) {
|
||||
this.errorCode = errorCode;
|
||||
}
|
||||
|
||||
public String getErrorMessage() {
|
||||
return errorMessage;
|
||||
}
|
||||
|
||||
public void setErrorMessage(String errorMessage) {
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
|
||||
public String getResMsg() {
|
||||
return resMsg;
|
||||
}
|
||||
|
||||
public void setResMsg(String resMsg) {
|
||||
this.resMsg = resMsg;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CorpAccessU9Token{" +
|
||||
", resCode=" + resCode +
|
||||
", data='" + data + '\'' +
|
||||
", errorCode='" + errorCode + '\'' +
|
||||
", errorMessage='" + errorMessage + '\'' +
|
||||
", resMsg='" + resMsg + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package org.ssssssss.magicboot.model;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.ssssssss.magicboot.utils.WebUtils;
|
||||
|
||||
@Component
|
||||
public class Global {
|
||||
|
||||
/**
|
||||
* 文件上的根目录
|
||||
*/
|
||||
public static String dir;
|
||||
|
||||
public final static String USER_FILES_BASE_URL = "/userfiles/";
|
||||
|
||||
public static String getDir() {
|
||||
return dir;
|
||||
}
|
||||
|
||||
@Value("${upload.dir:D:/mb/}")
|
||||
public void setDir(String dir) {
|
||||
this.dir = dir;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取上传文件的根目录
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getUserFilesBaseDir() {
|
||||
String dir = getDir();
|
||||
if (StrUtil.isBlank(dir)) {
|
||||
try {
|
||||
dir = WebUtils.getHttpServletRequest().getSession().getServletContext().getRealPath("/");
|
||||
} catch (Exception e) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
if (!dir.endsWith("/")) {
|
||||
dir += "/";
|
||||
}
|
||||
return dir;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package org.ssssssss.magicboot.model;
|
||||
|
||||
/**
|
||||
* Magic Boot 中使用的常量
|
||||
*/
|
||||
public class MagicBootConstants {
|
||||
|
||||
/**
|
||||
* 设置通用字段
|
||||
*/
|
||||
public static final String COMMON_FIELD = "setCommonField";
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
public static final String ID = "id";
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
public static final String CREATE_BY = "createBy";
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
public static final String UPDATE_BY = "updateBy";
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
public static final String CREATE_DATE = "createDate";
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
public static final String UPDATE_DATE = "updateDate";
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package org.ssssssss.magicboot.model;
|
||||
|
||||
import org.ssssssss.magicapi.core.model.JsonBean;
|
||||
|
||||
public enum StatusCode {
|
||||
|
||||
CERTIFICATE_EXPIRED(402, "凭证已过期"),
|
||||
FORBIDDEN(403, "禁止访问");
|
||||
|
||||
StatusCode(int code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
private int code;
|
||||
|
||||
private String message;
|
||||
|
||||
public JsonBean json(){
|
||||
return new JsonBean<>(this.code, this.message);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,348 @@
|
||||
package org.ssssssss.magicboot.model;
|
||||
|
||||
import org.ssssssss.magicboot.utils.WebUtils;
|
||||
|
||||
public class UeditorConfig {
|
||||
|
||||
private String imageActionName ="uploadImage";//执行上传图片的action名称
|
||||
|
||||
private String imageFieldName = "file";//提交的图片表单名称
|
||||
|
||||
private long imageMaxSize = 2048000;//上传大小限制,单位B
|
||||
|
||||
private String[] imageAllowFiles = new String[]{".png", ".jpg", ".jpeg", ".gif", ".bmp"};/* 上传图片格式显示 */
|
||||
|
||||
private boolean imageCompressEnable = true;//是否压缩图片,默认是true
|
||||
|
||||
private int imageCompressBorder = 1600;//图片压缩最长边限制
|
||||
|
||||
private String imageInsertAlign = "none";//插入的图片浮动方式
|
||||
|
||||
private String imageUrlPrefix = WebUtils.getUeditorPrefix();//图片访问路径前缀
|
||||
|
||||
/* 上传保存路径,可以自定义保存路径和文件名格式 */
|
||||
/* {filename} 会替换成原文件名,配置这项需要注意中文乱码问题 */
|
||||
/* {rand:6} 会替换成随机数,后面的数字是随机数的位数 */
|
||||
/* {time} 会替换成时间戳 */
|
||||
/* {yyyy} 会替换成四位年份 */
|
||||
/* {yy} 会替换成两位年份 */
|
||||
/* {mm} 会替换成两位月份 */
|
||||
/* {dd} 会替换成两位日期 */
|
||||
/* {hh} 会替换成两位小时 */
|
||||
/* {ii} 会替换成两位分钟 */
|
||||
/* {ss} 会替换成两位秒 */
|
||||
/* 非法字符 \ : * ? " < > | */
|
||||
/* 具请体看线上文档: fex.baidu.com/ueditor/#use-format_upload_filename */
|
||||
private String imagePathFormat = "/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}";
|
||||
|
||||
/*抓取远程图片配置*/
|
||||
private String catcherLocalDomain[] = new String[]{"127.0.0.1", "localhost", "img.baidu.com"};
|
||||
|
||||
private String catcherActionName = "catchimage";/* 执行抓取远程图片的action名称 */
|
||||
|
||||
private String catcherFieldName = "source";/* 提交的图片列表表单名称 */
|
||||
|
||||
private String catcherPathFormat ="/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}"; /* 上传保存路径,可以自定义保存路径和文件名格式 */
|
||||
|
||||
private long catcherMaxSize= 2048000; /* 上传大小限制,单位B */
|
||||
|
||||
private String catcherAllowFiles[] = new String[]{".png", ".jpg", ".jpeg", ".gif", ".bmp"}; /* 抓取图片格式显示 */
|
||||
|
||||
/* 上传文件配置 */
|
||||
private String fileActionName = "uploadFile";
|
||||
|
||||
private String fileFieldName = "file"; /* 提交的文件表单名称 */
|
||||
|
||||
private String filePathFormat = "/ueditor/jsp/upload/file/{yyyy}{mm}{dd}/{time}{rand:6}"; /* 上传保存路径,可以自定义保存路径和文件名格式 */
|
||||
|
||||
private String fileUrlPrefix = WebUtils.getUeditorPrefix(); /* 文件访问路径前缀 */
|
||||
|
||||
private long fileMaxSize = 51200000; /* 上传大小限制,单位B,默认50MB */
|
||||
|
||||
/* 上传文件格式显示 */
|
||||
private String[] fileAllowFiles = new String[]{".png", ".jpg", ".jpeg", ".gif", ".bmp",".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg", ".ogg", ".ogv", ".mov", ".wmv", ".mp4",".mp3", ".wav", ".mid",".rar", ".zip", ".tar", ".gz", ".7z",".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt"};
|
||||
|
||||
/* 列出指定目录下的图片 */
|
||||
private String imageManagerActionName = "listimage";/* 执行图片管理的action名称 */
|
||||
|
||||
private String imageManagerListPath = "/upload/image/"; /* 指定要列出图片的目录 */
|
||||
|
||||
private int imageManagerListSize = 20; /* 每次列出文件数量 */
|
||||
|
||||
private String imageManagerUrlPrefix = WebUtils.getUeditorPrefix(); /* 图片访问路径前缀 */
|
||||
|
||||
private String imageManagerInsertAlign = "none"; /* 插入的图片浮动方式 */
|
||||
|
||||
private String[] imageManagerAllowFiles = new String[]{".png", ".jpg", ".jpeg", ".gif", ".bmp"}; /* 列出的文件类型 */
|
||||
|
||||
/* 列出指定目录下的文件 */
|
||||
private String fileManagerActionName = "listfile";/* 执行文件管理的action名称 */
|
||||
|
||||
private String fileManagerListPath = "/upload/file/"; /* 指定要列出文件的目录 */
|
||||
|
||||
private String fileManagerUrlPrefix = WebUtils.getUeditorPrefix(); /* 文件访问路径前缀 */
|
||||
|
||||
private int fileManagerListSize = 20; /* 每次列出文件数量 */
|
||||
|
||||
/* 列出的文件类型 */
|
||||
private String fileManagerAllowFiles[] = new String[]{".png", ".jpg", ".jpeg", ".gif", ".bmp",".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg", ".ogg", ".ogv", ".mov", ".wmv", ".mp4",".mp3", ".wav", ".mid",".rar", ".zip", ".tar", ".gz", ".7z",".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt"};
|
||||
|
||||
public String getImageActionName() {
|
||||
return imageActionName;
|
||||
}
|
||||
|
||||
public void setImageActionName(String imageActionName) {
|
||||
this.imageActionName = imageActionName;
|
||||
}
|
||||
|
||||
public String getImageFieldName() {
|
||||
return imageFieldName;
|
||||
}
|
||||
|
||||
public void setImageFieldName(String imageFieldName) {
|
||||
this.imageFieldName = imageFieldName;
|
||||
}
|
||||
|
||||
public long getImageMaxSize() {
|
||||
return imageMaxSize;
|
||||
}
|
||||
|
||||
public void setImageMaxSize(long imageMaxSize) {
|
||||
this.imageMaxSize = imageMaxSize;
|
||||
}
|
||||
|
||||
public String[] getImageAllowFiles() {
|
||||
return imageAllowFiles;
|
||||
}
|
||||
|
||||
public void setImageAllowFiles(String[] imageAllowFiles) {
|
||||
this.imageAllowFiles = imageAllowFiles;
|
||||
}
|
||||
|
||||
public boolean isImageCompressEnable() {
|
||||
return imageCompressEnable;
|
||||
}
|
||||
|
||||
public void setImageCompressEnable(boolean imageCompressEnable) {
|
||||
this.imageCompressEnable = imageCompressEnable;
|
||||
}
|
||||
|
||||
public int getImageCompressBorder() {
|
||||
return imageCompressBorder;
|
||||
}
|
||||
|
||||
public void setImageCompressBorder(int imageCompressBorder) {
|
||||
this.imageCompressBorder = imageCompressBorder;
|
||||
}
|
||||
|
||||
public String getImageInsertAlign() {
|
||||
return imageInsertAlign;
|
||||
}
|
||||
|
||||
public void setImageInsertAlign(String imageInsertAlign) {
|
||||
this.imageInsertAlign = imageInsertAlign;
|
||||
}
|
||||
|
||||
public String getImageUrlPrefix() {
|
||||
return imageUrlPrefix;
|
||||
}
|
||||
|
||||
public void setImageUrlPrefix(String imageUrlPrefix) {
|
||||
this.imageUrlPrefix = imageUrlPrefix;
|
||||
}
|
||||
|
||||
public String getImagePathFormat() {
|
||||
return imagePathFormat;
|
||||
}
|
||||
|
||||
public void setImagePathFormat(String imagePathFormat) {
|
||||
this.imagePathFormat = imagePathFormat;
|
||||
}
|
||||
|
||||
public String[] getCatcherLocalDomain() {
|
||||
return catcherLocalDomain;
|
||||
}
|
||||
|
||||
public void setCatcherLocalDomain(String[] catcherLocalDomain) {
|
||||
this.catcherLocalDomain = catcherLocalDomain;
|
||||
}
|
||||
|
||||
public String getCatcherActionName() {
|
||||
return catcherActionName;
|
||||
}
|
||||
|
||||
public void setCatcherActionName(String catcherActionName) {
|
||||
this.catcherActionName = catcherActionName;
|
||||
}
|
||||
|
||||
public String getCatcherFieldName() {
|
||||
return catcherFieldName;
|
||||
}
|
||||
|
||||
public void setCatcherFieldName(String catcherFieldName) {
|
||||
this.catcherFieldName = catcherFieldName;
|
||||
}
|
||||
|
||||
public String getCatcherPathFormat() {
|
||||
return catcherPathFormat;
|
||||
}
|
||||
|
||||
public void setCatcherPathFormat(String catcherPathFormat) {
|
||||
this.catcherPathFormat = catcherPathFormat;
|
||||
}
|
||||
|
||||
public long getCatcherMaxSize() {
|
||||
return catcherMaxSize;
|
||||
}
|
||||
|
||||
public void setCatcherMaxSize(long catcherMaxSize) {
|
||||
this.catcherMaxSize = catcherMaxSize;
|
||||
}
|
||||
|
||||
public String[] getCatcherAllowFiles() {
|
||||
return catcherAllowFiles;
|
||||
}
|
||||
|
||||
public void setCatcherAllowFiles(String[] catcherAllowFiles) {
|
||||
this.catcherAllowFiles = catcherAllowFiles;
|
||||
}
|
||||
|
||||
public String getFileActionName() {
|
||||
return fileActionName;
|
||||
}
|
||||
|
||||
public void setFileActionName(String fileActionName) {
|
||||
this.fileActionName = fileActionName;
|
||||
}
|
||||
|
||||
public String getFileFieldName() {
|
||||
return fileFieldName;
|
||||
}
|
||||
|
||||
public void setFileFieldName(String fileFieldName) {
|
||||
this.fileFieldName = fileFieldName;
|
||||
}
|
||||
|
||||
public String getFilePathFormat() {
|
||||
return filePathFormat;
|
||||
}
|
||||
|
||||
public void setFilePathFormat(String filePathFormat) {
|
||||
this.filePathFormat = filePathFormat;
|
||||
}
|
||||
|
||||
public String getFileUrlPrefix() {
|
||||
return fileUrlPrefix;
|
||||
}
|
||||
|
||||
public void setFileUrlPrefix(String fileUrlPrefix) {
|
||||
this.fileUrlPrefix = fileUrlPrefix;
|
||||
}
|
||||
|
||||
public long getFileMaxSize() {
|
||||
return fileMaxSize;
|
||||
}
|
||||
|
||||
public void setFileMaxSize(long fileMaxSize) {
|
||||
this.fileMaxSize = fileMaxSize;
|
||||
}
|
||||
|
||||
public String[] getFileAllowFiles() {
|
||||
return fileAllowFiles;
|
||||
}
|
||||
|
||||
public void setFileAllowFiles(String[] fileAllowFiles) {
|
||||
this.fileAllowFiles = fileAllowFiles;
|
||||
}
|
||||
|
||||
public String getImageManagerActionName() {
|
||||
return imageManagerActionName;
|
||||
}
|
||||
|
||||
public void setImageManagerActionName(String imageManagerActionName) {
|
||||
this.imageManagerActionName = imageManagerActionName;
|
||||
}
|
||||
|
||||
public String getImageManagerListPath() {
|
||||
return imageManagerListPath;
|
||||
}
|
||||
|
||||
public void setImageManagerListPath(String imageManagerListPath) {
|
||||
this.imageManagerListPath = imageManagerListPath;
|
||||
}
|
||||
|
||||
public int getImageManagerListSize() {
|
||||
return imageManagerListSize;
|
||||
}
|
||||
|
||||
public void setImageManagerListSize(int imageManagerListSize) {
|
||||
this.imageManagerListSize = imageManagerListSize;
|
||||
}
|
||||
|
||||
public String getImageManagerUrlPrefix() {
|
||||
return imageManagerUrlPrefix;
|
||||
}
|
||||
|
||||
public void setImageManagerUrlPrefix(String imageManagerUrlPrefix) {
|
||||
this.imageManagerUrlPrefix = imageManagerUrlPrefix;
|
||||
}
|
||||
|
||||
public String getImageManagerInsertAlign() {
|
||||
return imageManagerInsertAlign;
|
||||
}
|
||||
|
||||
public void setImageManagerInsertAlign(String imageManagerInsertAlign) {
|
||||
this.imageManagerInsertAlign = imageManagerInsertAlign;
|
||||
}
|
||||
|
||||
public String[] getImageManagerAllowFiles() {
|
||||
return imageManagerAllowFiles;
|
||||
}
|
||||
|
||||
public void setImageManagerAllowFiles(String[] imageManagerAllowFiles) {
|
||||
this.imageManagerAllowFiles = imageManagerAllowFiles;
|
||||
}
|
||||
|
||||
public String getFileManagerActionName() {
|
||||
return fileManagerActionName;
|
||||
}
|
||||
|
||||
public void setFileManagerActionName(String fileManagerActionName) {
|
||||
this.fileManagerActionName = fileManagerActionName;
|
||||
}
|
||||
|
||||
public String getFileManagerListPath() {
|
||||
return fileManagerListPath;
|
||||
}
|
||||
|
||||
public void setFileManagerListPath(String fileManagerListPath) {
|
||||
this.fileManagerListPath = fileManagerListPath;
|
||||
}
|
||||
|
||||
public String getFileManagerUrlPrefix() {
|
||||
return fileManagerUrlPrefix;
|
||||
}
|
||||
|
||||
public void setFileManagerUrlPrefix(String fileManagerUrlPrefix) {
|
||||
this.fileManagerUrlPrefix = fileManagerUrlPrefix;
|
||||
}
|
||||
|
||||
public int getFileManagerListSize() {
|
||||
return fileManagerListSize;
|
||||
}
|
||||
|
||||
public void setFileManagerListSize(int fileManagerListSize) {
|
||||
this.fileManagerListSize = fileManagerListSize;
|
||||
}
|
||||
|
||||
public String[] getFileManagerAllowFiles() {
|
||||
return fileManagerAllowFiles;
|
||||
}
|
||||
|
||||
public void setFileManagerAllowFiles(String[] fileManagerAllowFiles) {
|
||||
this.fileManagerAllowFiles = fileManagerAllowFiles;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package org.ssssssss.magicboot.provider;
|
||||
|
||||
import cn.dev33.satoken.exception.DisableLoginException;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.ssssssss.magicapi.core.context.RequestEntity;
|
||||
import org.ssssssss.magicapi.core.interceptor.ResultProvider;
|
||||
import org.ssssssss.magicapi.core.model.JsonBean;
|
||||
|
||||
@Component
|
||||
public class ExceptionResultProvider implements ResultProvider {
|
||||
|
||||
@Override
|
||||
public Object buildResult(RequestEntity requestEntity, int code, String message, Object data) {
|
||||
long timestamp = System.currentTimeMillis();
|
||||
return new JsonBean<>(code, message, data, (int) (timestamp - requestEntity.getRequestTime()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object buildException(RequestEntity requestEntity, Throwable throwable) {
|
||||
if(throwable.getCause() instanceof DisableLoginException){
|
||||
return buildResult(requestEntity, 500, "此账号已被临时封禁,请联系管理员");
|
||||
}
|
||||
if(throwable.getCause()!=null ){
|
||||
return buildResult(requestEntity, 500, String.valueOf(throwable.getCause()));
|
||||
}
|
||||
return buildResult(requestEntity, 500, "系统内部出现错误");
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package org.ssssssss.magicboot.utils;
|
||||
|
||||
import cn.hutool.core.net.Ipv4Util;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
|
||||
public class AddressUtil {
|
||||
|
||||
public static String getAddress(String ip){
|
||||
try {
|
||||
if(Ipv4Util.isInnerIP(ip)){
|
||||
return "内网IP";
|
||||
}
|
||||
return JSONUtil.parseObj(HttpUtil.get("https://whois.pconline.com.cn/ipJson.jsp?json=true&ip=" + ip)).getStr("addr");
|
||||
}catch(IllegalArgumentException e){
|
||||
return "内网IP";
|
||||
}catch(Exception e){
|
||||
return "未知";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package org.ssssssss.magicboot.utils;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.ssssssss.magicboot.model.Global;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class FileUtils {
|
||||
|
||||
public static Map<String, String> createFileAttr(String originalFilename){
|
||||
String ret = Global.USER_FILES_BASE_URL + DateUtil.today() + "/" + IdUtil.simpleUUID() + "/";
|
||||
String suffix = FileUtil.getSuffix(originalFilename);
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("ret", ret);
|
||||
map.put("filePath", ret.substring(1) + originalFilename);
|
||||
map.put("fileNames", originalFilename);
|
||||
map.put("suffix", suffix);
|
||||
return map;
|
||||
}
|
||||
|
||||
public static Map<String, String> saveFile(MultipartFile file) {
|
||||
Map<String, String> fileAttr = createFileAttr(file.getOriginalFilename());
|
||||
String fileNames = fileAttr.get("fileNames");
|
||||
String ret = fileAttr.get("ret");
|
||||
String suffix = fileAttr.get("suffix");
|
||||
String realPath = Global.getUserFilesBaseDir() + ret;
|
||||
FileUtil.mkdir(FileUtil.normalize(realPath));
|
||||
File tempFile = new File(realPath + fileNames);
|
||||
if (!tempFile.getParentFile().exists()) {
|
||||
tempFile.getParentFile().mkdir();
|
||||
}
|
||||
try {
|
||||
if (!tempFile.exists()) {
|
||||
file.transferTo(tempFile);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("state", "SUCCESS");
|
||||
params.put("original", file.getName());
|
||||
params.put("name", file.getName());
|
||||
params.put("size", file.getSize() + "");
|
||||
params.put("type", suffix);
|
||||
params.put("url", fileAttr.get("filePath"));
|
||||
return params;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package org.ssssssss.magicboot.utils;
|
||||
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
import org.ssssssss.magicboot.model.Global;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
public class WebUtils {
|
||||
|
||||
public static HttpServletRequest getHttpServletRequest(){
|
||||
return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
||||
}
|
||||
|
||||
public static String getContextUrl() {
|
||||
HttpServletRequest request = getHttpServletRequest();
|
||||
StringBuffer url = request.getRequestURL();
|
||||
return url.delete(url.length() - request.getRequestURI().length(), url.length()).append(request.getServletContext().getContextPath()).append("/").toString();
|
||||
}
|
||||
|
||||
public static String getUeditorPrefix(){
|
||||
return getContextUrl();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
package org.ssssssss.magicboot.zdyutils;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.ssssssss.magicboot.fxapi.HttpClientResult;
|
||||
import org.ssssssss.magicboot.fxapi.HttpClientUtils;
|
||||
|
||||
public class APIUtil {
|
||||
public static void endApi(String dept, Boolean sendFlag, String syn_type,
|
||||
String dataId, String nameData, String endtime,
|
||||
String mark_id, StringBuffer stringBuffer) {
|
||||
JSONObject jsonObjectData = new JSONObject();
|
||||
jsonObjectData.put("log_type", dept); //业务类型
|
||||
jsonObjectData.put("log_status", !sendFlag);//同步状态 0同步成功 1同步失败
|
||||
jsonObjectData.put("syn_type", syn_type);//同步类型 0新增 1修改 2删除
|
||||
jsonObjectData.put("data_id", dataId);//数据id
|
||||
jsonObjectData.put("data_name", nameData);//数据名称
|
||||
jsonObjectData.put("mark", endtime);//标识
|
||||
jsonObjectData.put("res_body", "同步成功");//返回值
|
||||
jsonObjectData.put("mark_id", mark_id);//目标对象id
|
||||
if (sendFlag) {
|
||||
jsonObjectData.put("res_body", stringBuffer.toString());//返回值
|
||||
}
|
||||
//回写
|
||||
MagicApi.saveDataLog(jsonObjectData);
|
||||
|
||||
}
|
||||
public static void endApi(String dept, Boolean sendFlag, String syn_type,
|
||||
String dataId, String nameData, String endtime,
|
||||
String mark_id, StringBuffer stringBuffer,
|
||||
String sendUrl, String sendBody, String sendRes) {
|
||||
JSONObject jsonObjectData = new JSONObject();
|
||||
jsonObjectData.put("log_type", dept); //业务类型
|
||||
jsonObjectData.put("log_status", !sendFlag);//同步状态 0同步成功 1同步失败
|
||||
jsonObjectData.put("syn_type", syn_type);//同步类型 0新增 1修改 2删除
|
||||
jsonObjectData.put("data_id", dataId);//数据id
|
||||
jsonObjectData.put("data_name", nameData);//数据名称
|
||||
jsonObjectData.put("mark", endtime);//标识
|
||||
jsonObjectData.put("res_body", "同步成功");//返回值
|
||||
jsonObjectData.put("mark_id", mark_id);//目标对象id
|
||||
jsonObjectData.put("send_url", sendUrl);//返回值
|
||||
jsonObjectData.put("send_body", sendBody);//返回值
|
||||
jsonObjectData.put("send_res", sendRes);//返回值
|
||||
if (sendFlag) {
|
||||
jsonObjectData.put("res_body", stringBuffer.toString());//返回值
|
||||
}
|
||||
//回写
|
||||
MagicApi.saveDataLog(jsonObjectData);
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
APIUtil.kcLog( "1", "1", "1","1");
|
||||
}
|
||||
public static void kcLog(String stock_code, String pro_code,
|
||||
String batch, String qty) {
|
||||
JSONObject apiLog = new JSONObject();
|
||||
apiLog.put("stock_code", stock_code); //
|
||||
apiLog.put("pro_code", pro_code);//
|
||||
apiLog.put("batch", batch);//
|
||||
apiLog.put("qty", qty);//
|
||||
//回写
|
||||
MagicApi.saveApiDataLog(apiLog);
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求分享接口
|
||||
*
|
||||
* @param Xkjson
|
||||
*/
|
||||
public static String FXApiObj(String url, String Xkjson) {
|
||||
HttpClientResult rtn = null;
|
||||
boolean flag = true;
|
||||
try {
|
||||
rtn = HttpClientUtils.doPostJson(url, Xkjson);
|
||||
return rtn.getContent();
|
||||
} catch (Exception e) {
|
||||
flag = false;
|
||||
}
|
||||
//APIUtil.apiLog(url, Xkjson, rtn.toString(), flag, JsonData.strDataId, "");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
1034
magic-boot/src/main/java/org/ssssssss/magicboot/zdyutils/FXHTTP.java
Normal file
1034
magic-boot/src/main/java/org/ssssssss/magicboot/zdyutils/FXHTTP.java
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,23 @@
|
||||
package org.ssssssss.magicboot.zdyutils;
|
||||
|
||||
public class FXTIC {
|
||||
//
|
||||
public static String URL_FX_CREATE="https://open.fxiaoke.com/cgi/crm/v2/data/create";
|
||||
public static String URL_FX_UPDATE="https://open.fxiaoke.com/cgi/crm/v2/data/update";
|
||||
public static String URL_FX_QUERY="https://open.fxiaoke.com/cgi/crm/v2/data/query";
|
||||
|
||||
public static String URL_FX_ZDYQUERY="https://open.fxiaoke.com/cgi/crm/custom/v2/data/query";
|
||||
public static String URL_FX_ZDYCR="https://open.fxiaoke.com/cgi/crm/custom/v2/data/create";
|
||||
public static String URL_FX_ZDYUP="https://open.fxiaoke.com/cgi/crm/custom/v2/data/update";
|
||||
//加锁
|
||||
public static String URL_FX_LOCK="https://open.fxiaoke.com/cgi/crm/v2/object/lock";
|
||||
//解锁
|
||||
public static String URL_FX_UNLOCK="https://open.fxiaoke.com/cgi/crm/v2/object/unlock";
|
||||
|
||||
public static String CURRENTOPENUSERID="FSUID_0097DB273ACDA67353E1C0BAB997D8AC";
|
||||
public static String CORPID="FSCID_79069F6B50BC5CCF704283C5DEFD5670";
|
||||
|
||||
public static String URL_DESCRIBE="https://open.fxiaoke.com/cgi/crm/v2/object/describe";
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,172 @@
|
||||
package org.ssssssss.magicboot.zdyutils;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
public class GcjJson {
|
||||
/**
|
||||
* 获取节点值
|
||||
* @param jsonPath
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static synchronized Object getNodeValue(JSONObject obj, String jsonPath) throws Exception {
|
||||
String[] nodes = jsonPath.split("\\.");
|
||||
|
||||
for (int i = 1; i < nodes.length; i++) {
|
||||
if (obj != null) {
|
||||
obj = getObj(obj, nodes[i]);
|
||||
}
|
||||
if ((i+1) == nodes.length) {
|
||||
try {
|
||||
return obj.get(nodes[i]);
|
||||
} catch(Exception e) {
|
||||
//return "JSONException:" + e.getMessage() + ", NodeString:" + obj.toString();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* 获取节点值
|
||||
* @param jsonPath
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static synchronized String getNodeStrValue(JSONObject obj, String jsonPath) throws Exception {
|
||||
String[] nodes = jsonPath.split("\\.");
|
||||
|
||||
for (int i = 1; i < nodes.length; i++) {
|
||||
if (obj != null) {
|
||||
obj = getObj(obj, nodes[i]);
|
||||
}
|
||||
if ((i+1) == nodes.length) {
|
||||
try {
|
||||
return obj.get(nodes[i])+"";
|
||||
} catch(Exception e) {
|
||||
//return "JSONException:" + e.getMessage() + ", NodeString:" + obj.toString();
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
/**
|
||||
* 对节点进行解析
|
||||
*
|
||||
* @param obj
|
||||
* @param node
|
||||
* @return
|
||||
*/
|
||||
private static JSONObject getObj(JSONObject obj, String node) {
|
||||
try {
|
||||
if(node.contains("[")) {
|
||||
JSONArray arr = obj.getJSONArray(node.substring(0, node.indexOf("[")));
|
||||
for(int i = 0; i < arr.size(); i++) {
|
||||
if ((i + "").equals(node.substring(node.indexOf("["), node.indexOf("]")).replace("[", ""))) {
|
||||
return arr.getJSONObject(i);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return obj.getJSONObject(node);
|
||||
}
|
||||
} catch(Exception e) {
|
||||
return obj;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static String detailString(JSONObject jsonp, String getValue, String unitlabasdal) {
|
||||
JSONArray objUnit = new JSONArray();
|
||||
String unitlabal = "";
|
||||
objUnit = jsonp.getJSONObject("data").getJSONObject("describe").getJSONObject("fields").getJSONObject(getValue).getJSONArray("options");
|
||||
//循环遍历 获取id 对应的值
|
||||
for (int i = 0; i < objUnit.size(); i++) {
|
||||
if (objUnit.getJSONObject(i).getString("value") != null && objUnit.getJSONObject(i).getString("value").equals(unitlabasdal)) {
|
||||
unitlabal = objUnit.getJSONObject(i).getString("label");
|
||||
break;
|
||||
}
|
||||
}
|
||||
return unitlabal;
|
||||
}
|
||||
public static String detailStrVal(JSONObject jsonp, String getValue, String unitlabasdal) {
|
||||
JSONArray objUnit = new JSONArray();
|
||||
String unitlabal = "";
|
||||
objUnit = jsonp.getJSONObject("data").getJSONObject("describe").getJSONObject("fields").getJSONObject(getValue).getJSONArray("options");
|
||||
//循环遍历 获取id 对应的值
|
||||
for (int i = 0; i < objUnit.size(); i++) {
|
||||
if (objUnit.getJSONObject(i).getString("label") != null && objUnit.getJSONObject(i).getString("label").equals(unitlabasdal)) {
|
||||
unitlabal = objUnit.getJSONObject(i).getString("value");
|
||||
break;
|
||||
}
|
||||
}
|
||||
return unitlabal;
|
||||
}
|
||||
public static synchronized void setNodeValue(JSONObject obj, String jsonPath, Object value) throws Exception {
|
||||
String[] nodes = jsonPath.split("\\.");
|
||||
for (int i = 1; i < nodes.length; i++) {
|
||||
if ((i + 1) == nodes.length) {
|
||||
try {
|
||||
|
||||
if (nodes[i].contains("[")) {
|
||||
String nodesIndexS=nodes[i];
|
||||
int leftIndex = nodesIndexS.indexOf("["); // 获取左中括号的位置
|
||||
int rightIndex = nodesIndexS.indexOf("]"); // 获取右中括号的位置
|
||||
int num =0;
|
||||
if (leftIndex != -1 && rightIndex != -1) {
|
||||
String numStr = nodesIndexS.substring(leftIndex + 1, rightIndex); // 截取中括号内的字符串
|
||||
num = Integer.parseInt(numStr); // 将数字字符串转换成int类型
|
||||
}
|
||||
JSONArray jsonArray = obj.getJSONArray(nodes[i]);
|
||||
if(jsonArray==null){
|
||||
jsonArray= new JSONArray();
|
||||
}
|
||||
obj.put(nodes[i].replace("["+num+"]", ""), jsonArray);
|
||||
jsonArray.add(value);
|
||||
continue;
|
||||
}
|
||||
|
||||
obj.put(nodes[i], value);
|
||||
} catch (Exception e) {
|
||||
throw new Exception("Set value error:" + e.getMessage() + ", NodeString:" + obj.toString());
|
||||
}
|
||||
} else {
|
||||
|
||||
if (nodes[i].contains("[")) {
|
||||
String[] parts = nodes[i].split("\\[");
|
||||
String str=parts[1];
|
||||
String nodesIndexS=str.substring(0, str.length() - 1);
|
||||
int num =Integer.valueOf(nodesIndexS);
|
||||
|
||||
JSONArray jsonArray = obj.getJSONArray(parts[0]);
|
||||
if(jsonArray==null){
|
||||
jsonArray= new JSONArray();
|
||||
}
|
||||
JSONObject nextObj =null;
|
||||
if(jsonArray.size()>num){
|
||||
nextObj = jsonArray.getJSONObject(num);
|
||||
}
|
||||
if(nextObj==null){
|
||||
nextObj = new JSONObject();
|
||||
nextObj.put(nodes[i + 1], nextObj);
|
||||
jsonArray.add(nextObj);
|
||||
}else{
|
||||
nextObj.put(nodes[i + 1], new JSONObject());
|
||||
}
|
||||
obj.put(parts[0], jsonArray);
|
||||
|
||||
obj = nextObj;
|
||||
continue;
|
||||
}
|
||||
JSONObject nextObj = obj.getJSONObject(nodes[i]);
|
||||
if (nextObj == null) {
|
||||
nextObj = new JSONObject();
|
||||
obj.put(nodes[i], nextObj);
|
||||
}
|
||||
obj = nextObj;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package org.ssssssss.magicboot.zdyutils;
|
||||
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
public class HttpSend {
|
||||
public static synchronized String sendMagicGet(String url,String jsonPath){
|
||||
System.out.println(url);
|
||||
try {
|
||||
String obj = HttpRequest.get(url)
|
||||
.timeout(130000)
|
||||
.execute()
|
||||
.body();
|
||||
JSONObject res = JSONObject.parseObject(obj);
|
||||
if(res!=null && "200".equals(res.getString("code"))){
|
||||
if(StringUtils.isNoneBlank(jsonPath)){
|
||||
return (String) GcjJson.getNodeValue(res,jsonPath);
|
||||
}
|
||||
return obj;
|
||||
}else{
|
||||
System.out.println("Magic:"+url);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
public static synchronized String sendMagicPost(String url,JSONObject jsonPath){
|
||||
try {
|
||||
String obj = HttpRequest.post(url)
|
||||
.timeout(30000)
|
||||
.form(jsonPath)
|
||||
.execute()
|
||||
.body();
|
||||
JSONObject res = JSONObject.parseObject(obj);
|
||||
if(res!=null && "200".equals(res.getString("code"))){
|
||||
return obj;
|
||||
}else{
|
||||
System.out.println("NC"+res);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package org.ssssssss.magicboot.zdyutils;
|
||||
|
||||
import cn.hutool.core.io.file.FileWriter;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
public class JsonData {
|
||||
private static final String filePath = "D:\\java\\MSAPIjdk2022\\MSAPIjdk2022\\json/datajson.json";
|
||||
public static String strDataId;
|
||||
|
||||
|
||||
public static JSONObject getKey() {
|
||||
JSONObject json = JSONUtil.readJSONObject(new File(filePath), Charset.forName("utf-8"));
|
||||
return json;
|
||||
}
|
||||
|
||||
public static void putKey(JSONObject json) {
|
||||
FileWriter writer = new FileWriter(filePath);
|
||||
writer.write(String.valueOf(json), false);
|
||||
}
|
||||
}
|
@ -0,0 +1,457 @@
|
||||
package org.ssssssss.magicboot.zdyutils;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import java.net.URLEncoder;
|
||||
|
||||
public class MagicApi {
|
||||
public static void main(String[] args) {
|
||||
// JSONObject data= new JSONObject();
|
||||
// data.put("log_type","0");
|
||||
// data.put("log_status","0");
|
||||
// data.put("syn_type","0");
|
||||
// data.put("data_id","12312");
|
||||
// data.put("data_name","测试同步");
|
||||
// data.put("mark","21312312");
|
||||
// data.put("res_body","同步成功");
|
||||
//
|
||||
// saveDataLog(data);
|
||||
System.out.println(getkhzinfo("1001S3100000004DW7BE"));
|
||||
}
|
||||
|
||||
public static void saveApiDataLog(JSONObject data) {
|
||||
try {
|
||||
String res = HttpSend.sendMagicPost(
|
||||
"http://127.0.0.1:3002/SYNCLOG/STOCK/SAVE"
|
||||
, data);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
public static void saveDataLog(JSONObject data) {
|
||||
System.out.println(data);
|
||||
try {
|
||||
String res = HttpSend.sendMagicPost(
|
||||
"http://127.0.0.1:3002/send/log/save"
|
||||
, data);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
public static void saveDataLogSbbom(JSONObject data) {
|
||||
System.out.println(data);
|
||||
try {
|
||||
String res = HttpSend.sendMagicPost(
|
||||
"http://127.0.0.1:3002/send/log/savesbbom"
|
||||
, data);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
public static void saveDataWLLog(JSONObject data) {
|
||||
//System.out.println(data.toJSONString());
|
||||
try {
|
||||
String res = HttpSend.sendMagicPost(
|
||||
"http://127.0.0.1:3002/cpfx/save"
|
||||
, data);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
public static String getWNRES(String url,String jsonPath) {
|
||||
System.out.println(url);
|
||||
try {
|
||||
return HttpSend.sendMagicGet(url
|
||||
, jsonPath);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static String getYHXXID(String name) {
|
||||
|
||||
try {
|
||||
return HttpSend.sendMagicGet(
|
||||
"http://127.0.0.1:3002/NCC/ZHRY/V_CRM_PSNDOC?NAME=" + URLEncoder.encode(name, "UTF-8")
|
||||
, "JSON.data[0].PK_PSNDOC");
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static String getZUZHICODE(String name) {
|
||||
|
||||
try {
|
||||
return HttpSend.sendMagicGet(
|
||||
"http://127.0.0.1:3002/NCC/ZHRY/V_CRM_ORG?PK_ORG=" + name
|
||||
, "JSON.data[0].ORG_CODE");
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static JSONObject getKC(String stock_code, String pro_code,
|
||||
String batch, String qty) {
|
||||
|
||||
try {
|
||||
String res = HttpSend.sendMagicGet(
|
||||
"http://127.0.0.1:3002/SYNCLOG/GELOGDATA" +
|
||||
"?stock_code=" + URLEncoder.encode(stock_code, "UTF-8") +
|
||||
"&pro_code=" + URLEncoder.encode(pro_code, "UTF-8")+
|
||||
"&batch=" + URLEncoder.encode(batch, "UTF-8")+
|
||||
"&qty=" + URLEncoder.encode(qty, "UTF-8")
|
||||
, "");
|
||||
JSONObject resJson = JSONObject.parseObject(res);
|
||||
|
||||
if (resJson!=null && resJson.getJSONArray("data").size() > 0) {
|
||||
return resJson.getJSONArray("data").getJSONObject(0);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static JSONObject getDataLog(String type, String dataId) {
|
||||
|
||||
try {
|
||||
String res = HttpSend.sendMagicGet(
|
||||
"http://127.0.0.1:3002/SYNCLOG/GELOGDATA?type=" + URLEncoder.encode(type, "UTF-8") + "&dataId=" + URLEncoder.encode(dataId, "UTF-8")
|
||||
, "");
|
||||
JSONObject resJson = JSONObject.parseObject(res);
|
||||
|
||||
if (resJson.getJSONArray("data").size() > 0) {
|
||||
return resJson.getJSONArray("data").getJSONObject(0);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static String getkhzinfo(String name) {
|
||||
|
||||
try {
|
||||
return HttpSend.sendMagicGet(
|
||||
"http://127.0.0.1:3002/NCC/KH/V_CRM_CUSTOMER?DATAID=" + URLEncoder.encode(name, "UTF-8")
|
||||
, "JSON.data[0].CODE");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getTaxCode(String name) {
|
||||
|
||||
try {
|
||||
return HttpSend.sendMagicGet(
|
||||
"http://127.0.0.1:3002/NCC/WL/V_CRM_TAXCODE?NAME=" + URLEncoder.encode(name, "UTF-8")
|
||||
, "JSON.data[0].PK_TAXCODE");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getData(String table,String TS) {
|
||||
|
||||
try {
|
||||
return HttpSend.sendMagicGet(
|
||||
"http://127.0.0.1:3002"+table+"?TS=" + URLEncoder.encode(TS, "UTF-8")
|
||||
, null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getData2(String table,String TS,String GT) {
|
||||
|
||||
try {
|
||||
return HttpSend.sendMagicGet(
|
||||
"http://127.0.0.1:3002"+table+"?TS=" + URLEncoder.encode(TS, "UTF-8") + ">="+ URLEncoder.encode(GT, "UTF-8")
|
||||
, null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getDataStr(String table,String jsonPath) {
|
||||
|
||||
try {
|
||||
return HttpSend.sendMagicGet(
|
||||
"http://127.0.0.1:3002"+table
|
||||
, jsonPath);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static String getZIData(String table,String NAME,String TS) {
|
||||
|
||||
try {
|
||||
return HttpSend.sendMagicGet(
|
||||
"http://127.0.0.1:3002"+table+"?NAME=" + URLEncoder.encode(TS, "UTF-8")
|
||||
, null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String khfl(String name) {
|
||||
|
||||
|
||||
try {
|
||||
return HttpSend.sendMagicGet(
|
||||
"http://127.0.0.1:3002/NCC/KH/V_CRM_CUSTCLASS?NAME=" + URLEncoder.encode(name, "UTF-8")
|
||||
, "JSON.data[0].PK_CUSTCLASS");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String khgjqy(String name) {
|
||||
|
||||
try {
|
||||
return HttpSend.sendMagicGet(
|
||||
"http://127.0.0.1:3002/NCC/KH/V_CRM_COUNTRYZONE?NAME=" + URLEncoder.encode(name, "UTF-8")
|
||||
, "JSON.data[0].PK_COUNTRY");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String khshq(String name) {
|
||||
|
||||
try {
|
||||
return HttpSend.sendMagicGet(
|
||||
"http://127.0.0.1:3002/NCC/KH/V_CRM_REGION?NAME=" + URLEncoder.encode(name, "UTF-8")
|
||||
, "JSON.data[0].PK_REGION");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String bibie(String name) {
|
||||
try {
|
||||
return HttpSend.sendMagicGet(
|
||||
"http://127.0.0.1:3002/NCC/KH/V_CRM_CURRTYPE?NAME=" + URLEncoder.encode(name, "UTF-8")
|
||||
, "JSON.data[0].PK_CURRTYPE");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String khyh(String name) {
|
||||
try {
|
||||
return HttpSend.sendMagicGet(
|
||||
"http://127.0.0.1:3002/NCC/KH/V_CRM_BANKDOC?PKBANKDOC=" + URLEncoder.encode(name, "UTF-8")
|
||||
, "JSON.data[0].PK_BANKTYPE");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void saveSendSYNData(JSONObject data) {
|
||||
System.out.println(data.toJSONString());
|
||||
try {
|
||||
String res = HttpSend.sendMagicPost(
|
||||
"http://127.0.0.1:3002/syn/save"
|
||||
, data);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
public static void saveSendSYNDataSBBom(JSONObject data) {
|
||||
System.out.println(data.toJSONString());
|
||||
try {
|
||||
String res = HttpSend.sendMagicPost(
|
||||
"http://127.0.0.1:3002/syn/savesbbom"
|
||||
, data);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
public static void updateSendSYUPDATENData(JSONObject data) {
|
||||
System.out.println(data.toJSONString());
|
||||
try {
|
||||
String res = HttpSend.sendMagicPost(
|
||||
"http://127.0.0.1:3002/syn/update"
|
||||
, data);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
public static void updateSendSYUPDATENDataSbBom(JSONObject data) {
|
||||
System.out.println(data.toJSONString());
|
||||
try {
|
||||
String res = HttpSend.sendMagicPost(
|
||||
"http://127.0.0.1:3002/syn/updatesbbom"
|
||||
, data);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
public static JSONObject getSendSYNDataCRM(String type, String syn, String dataId) {
|
||||
|
||||
try {
|
||||
String res = HttpSend.sendMagicGet(
|
||||
"http://127.0.0.1:3002/syn/query?sendType=" + URLEncoder.encode(type, "UTF-8")
|
||||
+ "&crmId=" + URLEncoder.encode(dataId, "UTF-8")
|
||||
+ "&sendSyn=" + URLEncoder.encode(syn, "UTF-8")
|
||||
, "");
|
||||
JSONObject resJson = JSONObject.parseObject(res);
|
||||
|
||||
if (resJson.getJSONArray("data").size() > 0) {
|
||||
return resJson.getJSONArray("data").getJSONObject(0);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static JSONObject getSendSYNDataSBBom(String type, String syn, String dataId) {
|
||||
|
||||
try {
|
||||
String res = HttpSend.sendMagicGet(
|
||||
"http://127.0.0.1:3002/syn/querysbbom?sendType=" + URLEncoder.encode(type, "UTF-8")
|
||||
+ "&crmId=" + URLEncoder.encode(dataId, "UTF-8")
|
||||
+ "&sendSyn=" + URLEncoder.encode(syn, "UTF-8")
|
||||
, "");
|
||||
JSONObject resJson = JSONObject.parseObject(res);
|
||||
|
||||
if (resJson.getJSONArray("data").size() > 0) {
|
||||
return resJson.getJSONArray("data").getJSONObject(0);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public static JSONObject getSendSYNDataCRM(String type, String syn, String dataId, String sendStatus3) {
|
||||
|
||||
try {
|
||||
String res = HttpSend.sendMagicGet(
|
||||
"http://127.0.0.1:3002/syn/query?sendType=" + URLEncoder.encode(type, "UTF-8")
|
||||
+ "&crmId=" + URLEncoder.encode(dataId, "UTF-8")
|
||||
+ "&sendSyn=" + URLEncoder.encode(syn, "UTF-8")
|
||||
+ "&sendStatus3="+sendStatus3
|
||||
, "");
|
||||
JSONObject resJson = JSONObject.parseObject(res);
|
||||
|
||||
if (resJson.getJSONArray("data").size() > 0) {
|
||||
return resJson.getJSONArray("data").getJSONObject(0);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static JSONObject getSendSYNDataDSF(String type, String syn, String dataId) {
|
||||
|
||||
try {
|
||||
String res = HttpSend.sendMagicGet(
|
||||
"http://127.0.0.1:3002/syn/query?sendType=" + URLEncoder.encode(type, "UTF-8")
|
||||
+ "&dsfId=" + URLEncoder.encode(dataId, "UTF-8")
|
||||
+ "&sendSyn=" + URLEncoder.encode(syn, "UTF-8")
|
||||
, "");
|
||||
JSONObject resJson = JSONObject.parseObject(res);
|
||||
|
||||
if (resJson.getJSONArray("data").size() > 0) {
|
||||
return resJson.getJSONArray("data").getJSONObject(0);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static JSONObject getSendSYNDataDSF2(String type, String syn, String dataId) {
|
||||
|
||||
try {
|
||||
String res = HttpSend.sendMagicGet(
|
||||
"http://127.0.0.1:3002/syn/query2?sendType=" + URLEncoder.encode(type, "UTF-8")
|
||||
+ "&dsfId=" + URLEncoder.encode(dataId, "UTF-8")
|
||||
+ "&sendSyn=" + URLEncoder.encode(syn, "UTF-8")
|
||||
, "");
|
||||
JSONObject resJson = JSONObject.parseObject(res);
|
||||
|
||||
if (resJson.getJSONArray("data").size() > 0) {
|
||||
return resJson.getJSONArray("data").getJSONObject(0);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static JSONObject getSendUnit(String name) {
|
||||
|
||||
try {
|
||||
String res = HttpSend.sendMagicGet(
|
||||
"http://127.0.0.1:3002/syn/queryunit?name=" + URLEncoder.encode(name, "UTF-8")
|
||||
, "");
|
||||
JSONObject resJson = JSONObject.parseObject(res);
|
||||
|
||||
if (resJson.getJSONArray("data").size() > 0) {
|
||||
return resJson.getJSONArray("data").getJSONObject(0);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public static JSONObject getSendSYNDataDSF(String type, String syn, String dataId, String sendStatus3) {
|
||||
|
||||
try {
|
||||
String res = HttpSend.sendMagicGet(
|
||||
"http://127.0.0.1:3002/syn/query?sendType=" + URLEncoder.encode(type, "UTF-8")
|
||||
+ "&dsfId=" + URLEncoder.encode(dataId, "UTF-8")
|
||||
+ "&sendSyn=" + URLEncoder.encode(syn, "UTF-8")
|
||||
+ "&sendStatus3="+sendStatus3
|
||||
, "");
|
||||
JSONObject resJson = JSONObject.parseObject(res);
|
||||
|
||||
if (resJson.getJSONArray("data").size() > 0) {
|
||||
return resJson.getJSONArray("data").getJSONObject(0);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static JSONObject getSendSYNDataDSFBom(String type, String syn, String dataId, String sendStatus3) {
|
||||
|
||||
try {
|
||||
String res = HttpSend.sendMagicGet(
|
||||
"http://127.0.0.1:3002/syn/querysbbom?sendType=" + URLEncoder.encode(type, "UTF-8")
|
||||
+ "&crmId=" + URLEncoder.encode(dataId, "UTF-8")
|
||||
+ "&sendSyn=" + URLEncoder.encode(syn, "UTF-8")
|
||||
+ "&sendStatus3="+sendStatus3
|
||||
, "");
|
||||
JSONObject resJson = JSONObject.parseObject(res);
|
||||
|
||||
if (resJson.getJSONArray("data").size() > 0) {
|
||||
return resJson.getJSONArray("data").getJSONObject(0);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,113 @@
|
||||
package org.ssssssss.magicboot.zdyutils;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.ssssssss.magicboot.fxapi.HttpClientResult;
|
||||
import org.ssssssss.magicboot.fxapi.HttpClientUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class ThPost {
|
||||
private static final Logger log = LoggerFactory.getLogger(ThPost.class);
|
||||
|
||||
public static void main(String[] args) {
|
||||
String delResult = ThPost.deleteObj("PayBill","1002312130000048");
|
||||
System.out.println("delReslut ========= "+ delResult);
|
||||
}
|
||||
|
||||
public static String approveObj(String keyWord ,String U9ID) {
|
||||
String delReslut = "";
|
||||
try {
|
||||
LinkedHashMap map1 = new LinkedHashMap<String, Object>();
|
||||
U9TokenAccess tonken = new U9TokenAccess();
|
||||
String token = tonken.getCorpAccessU9Token().getData();
|
||||
|
||||
map1.put("token",token);
|
||||
String delUrl = "http://192.168.1.21/U9C/webapi/"+keyWord+"/Approve";
|
||||
JSONObject delData = new JSONObject();
|
||||
JSONArray delArray = new JSONArray();
|
||||
delData.put("ID",U9ID);
|
||||
delArray.add(delData);
|
||||
System.out.println("ApproveArray ========== " +keyWord +"ID : "+delArray);
|
||||
HttpClientResult rtn = HttpClientUtils.doPostJson(delUrl,map1, delArray.toJSONString());
|
||||
delReslut = rtn.getContent();
|
||||
} catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
log.info("审批接口传输错误"+e);
|
||||
}
|
||||
return delReslut;
|
||||
}
|
||||
|
||||
public static String submitObj(String keyWord ,String dataId) {
|
||||
String delReslut = "";
|
||||
try {
|
||||
LinkedHashMap map1 = new LinkedHashMap<String, Object>();
|
||||
U9TokenAccess tonken = new U9TokenAccess();
|
||||
String token = tonken.getCorpAccessU9Token().getData();
|
||||
|
||||
map1.put("token",token);
|
||||
String delUrl = "http://192.168.1.21/U9C/webapi/"+keyWord+"/Submit";
|
||||
JSONObject delData = new JSONObject();
|
||||
JSONArray delArray = new JSONArray();
|
||||
delData.put("ID",dataId);
|
||||
delArray.add(delData);
|
||||
System.out.println("submitArray ========== " +keyWord +"ID : "+delArray);
|
||||
HttpClientResult rtn = HttpClientUtils.doPostJson(delUrl,map1, delArray.toJSONString());
|
||||
delReslut = rtn.getContent();
|
||||
} catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
log.info("提交接口传输错误"+e);
|
||||
}
|
||||
return delReslut;
|
||||
}
|
||||
|
||||
public static String deleteObj(String keyWord ,String dataId) {
|
||||
String delReslut = "";
|
||||
try {
|
||||
LinkedHashMap map1 = new LinkedHashMap<String, Object>();
|
||||
U9TokenAccess tonken = new U9TokenAccess();
|
||||
String token = tonken.getCorpAccessU9Token().getData();
|
||||
|
||||
map1.put("token",token);
|
||||
String delUrl = "http://192.168.1.21/U9C/webapi/"+keyWord+"/Delete";
|
||||
JSONObject delData = new JSONObject();
|
||||
JSONArray delArray = new JSONArray();
|
||||
delData.put("ID",dataId);
|
||||
delArray.add(delData);
|
||||
System.out.println("delArray ========== " +keyWord +"ID : "+delArray);
|
||||
HttpClientResult rtn = HttpClientUtils.doPostJson(delUrl,map1, delArray.toJSONString());
|
||||
delReslut = rtn.getContent();
|
||||
} catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
log.info("删除接口传输错误"+e);
|
||||
}
|
||||
return delReslut;
|
||||
}
|
||||
|
||||
public static String getCreateReturnData (String methodName,String content ,String dataId ,String apiName ,
|
||||
String U9ID_CrmApiName, String U9Code_CrmApiName ,FXHTTP fxapi){
|
||||
JSONObject contentJson = JSON.parseObject(content);
|
||||
JSONObject getReData = contentJson.getJSONArray("Data").getJSONObject(0);
|
||||
String U9ID = "";
|
||||
try {
|
||||
U9ID = GcjJson.getNodeStrValue(getReData,"JSON.ID");
|
||||
String U9Code = GcjJson.getNodeStrValue(getReData,"JSON.Code");
|
||||
Map<String, Object> dataMap = new HashMap<>();
|
||||
dataMap.put(U9ID_CrmApiName,U9ID);
|
||||
dataMap.put(U9Code_CrmApiName,U9Code);
|
||||
fxapi.upSynZDYFieldParam(methodName, apiName,dataId,dataMap);
|
||||
if (U9ID.equals("")){
|
||||
return null;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(methodName+"数据回写异常",e);
|
||||
}
|
||||
return U9ID;
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package org.ssssssss.magicboot.zdyutils;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.ssssssss.magicboot.fxapi.HttpClientResult;
|
||||
import org.ssssssss.magicboot.fxapi.HttpClientUtils;
|
||||
|
||||
import org.ssssssss.magicboot.fxapi.model.CorpAccessToken;
|
||||
import org.ssssssss.magicboot.fxapi.model.XKopenAPI;
|
||||
import org.ssssssss.magicboot.model.CorpAccessU9Token;
|
||||
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* u9请求token
|
||||
*/
|
||||
public class U9TokenAccess {
|
||||
/**
|
||||
* 验证连接
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
System.out.println(new U9TokenAccess().getCorpAccessU9Token());
|
||||
}
|
||||
private final Logger log = LoggerFactory.getLogger(U9TokenAccess.class);
|
||||
|
||||
private static final String KEY_TOKEN = "token";
|
||||
private static final String clientid = "crm";
|
||||
|
||||
//测试
|
||||
// private static final String clientsecret = "00dcb146d019426f9ccf6889c6d26624";
|
||||
|
||||
private static final String clientsecret = "765f536b447e4960b0bcc07851e87936"; //正式
|
||||
|
||||
private static final String entCode = "03";
|
||||
private static final String userCode = "admin";
|
||||
private static final String orgCode = "01";
|
||||
private static final String CORP_ACCESS_TOKEN_KEY_PREX = "corpAccessU9Token_";
|
||||
private static final String KEY_EXPIRES_IN = "expiresIn";
|
||||
|
||||
// private static final String prefix = "http://60.211.244.254:9111/U9C/webapi/OAuth2/AuthLogin";//测试
|
||||
|
||||
private static final String prefix = "http://192.168.1.21/U9C/webapi/OAuth2/AuthLogin";
|
||||
|
||||
private static Map<String,Map<String, Object>> accessTokenMap= new HashMap();
|
||||
|
||||
public static Map<String,Map<String, Object>> accessTokenMap() {
|
||||
return accessTokenMap;
|
||||
}
|
||||
|
||||
public CorpAccessU9Token getCorpAccessU9Token() {
|
||||
String key = CORP_ACCESS_TOKEN_KEY_PREX;
|
||||
Map<String, Object> token = accessTokenMap.get(key);
|
||||
if(token != null){
|
||||
long expiresIn = (Long) token.get(KEY_EXPIRES_IN);
|
||||
|
||||
if (System.currentTimeMillis() < expiresIn) {
|
||||
return (CorpAccessU9Token) token.get(KEY_TOKEN);
|
||||
}
|
||||
accessTokenMap.remove(key);
|
||||
}
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("clientid",clientid);
|
||||
map.put("clientsecret",clientsecret);
|
||||
map.put("entCode",entCode);
|
||||
map.put("userCode",userCode);
|
||||
map.put("orgCode",orgCode);
|
||||
// String param = JSON.toJSONString(map);
|
||||
CorpAccessU9Token corpToken =null;
|
||||
|
||||
try {
|
||||
String url = prefix;
|
||||
HttpClientResult result = HttpClientUtils.doGet(url,map);
|
||||
System.out.println(result);
|
||||
corpToken = JSON.toJavaObject(JSONObject.parseObject(result.getContent()),CorpAccessU9Token.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
token = new HashMap();
|
||||
// 减去10分钟,以免过时
|
||||
token.put(KEY_EXPIRES_IN, (300 - 60) * 1000 + System.currentTimeMillis());
|
||||
if (corpToken != null) {
|
||||
token.put(KEY_TOKEN, corpToken);
|
||||
}
|
||||
accessTokenMap.put(key, token);
|
||||
return corpToken;
|
||||
}
|
||||
}
|
118
magic-boot/src/main/resources/application.yml
Normal file
118
magic-boot/src/main/resources/application.yml
Normal file
@ -0,0 +1,118 @@
|
||||
server:
|
||||
port: 18088
|
||||
compression:
|
||||
enabled: true
|
||||
min-response-size: 128
|
||||
|
||||
spring:
|
||||
profiles:
|
||||
active: dev
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 200MB
|
||||
max-request-size: 200MB
|
||||
jackson:
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
time-zone: GMT+8
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
url: jdbc:mysql://116.204.34.35:13300/zycx?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8
|
||||
username: root
|
||||
password: root
|
||||
druid:
|
||||
# 下面为连接池的补充设置,应用到上面所有数据源中
|
||||
# 初始化大小,最小,最大
|
||||
initial-size: 5
|
||||
min-idle: 5
|
||||
max-active: 1000
|
||||
# 配置获取连接等待超时的时间
|
||||
max-wait: 360000
|
||||
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||||
time-between-eviction-runs-millis: 60000
|
||||
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
||||
min-evictable-idle-time-millis: 300000
|
||||
validation-query: SELECT 1
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
# 打开PSCache,并且指定每个连接上PSCache的大小
|
||||
pool-prepared-statements: true
|
||||
# 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
|
||||
max-pool-prepared-statement-per-connection-size: 20
|
||||
filters: stat,wall
|
||||
use-global-data-source-stat: true
|
||||
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
|
||||
connect-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
|
||||
# 配置监控服务器
|
||||
stat-view-servlet:
|
||||
login-username: admin
|
||||
login-password: 123456
|
||||
reset-enable: false
|
||||
url-pattern: /druid/*
|
||||
# 添加IP白名单
|
||||
#allow:
|
||||
# 添加IP黑名单,当白名单和黑名单重复时,黑名单优先级更高
|
||||
#deny:
|
||||
web-stat-filter:
|
||||
# 添加过滤规则
|
||||
url-pattern: /*
|
||||
# 忽略过滤格式
|
||||
exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
|
||||
# 上传路径
|
||||
upload:
|
||||
dir: D:/mb/
|
||||
|
||||
magic-api:
|
||||
web: /magic/web
|
||||
show-sql: true #配置打印SQL
|
||||
sql-column-case: camel
|
||||
resource:
|
||||
location: data/magic-api
|
||||
backup: #备份相关配置
|
||||
enable: true #是否启用
|
||||
max-history: -1 #备份保留天数,-1为永久保留
|
||||
table-name: magic_backup_record_v2 #使用数据库存储备份时的表名
|
||||
page:
|
||||
page: current
|
||||
size: size
|
||||
cache:
|
||||
enable: true #开启缓存,默认是不开启的
|
||||
ttl: 3600000 #有效期1小时,默认-1 即永不过期
|
||||
response-code:
|
||||
success: 200 #执行成功的code值
|
||||
invalid: 400 #参数验证未通过的code值
|
||||
exception: 500 #执行出现异常的code值
|
||||
crud: # CRUD相关配置
|
||||
logic-delete-column: is_del #逻辑删除列
|
||||
logic-delete-value: 1 #逻辑删除值
|
||||
# security:
|
||||
# username: admin
|
||||
# password: 123456
|
||||
|
||||
# Sa-Token配置
|
||||
sa-token:
|
||||
# token名称 (同时也是cookie名称)
|
||||
token-name: token
|
||||
# token有效期,单位s 默认30天, -1代表永不过期
|
||||
timeout: 2592000
|
||||
# token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
|
||||
activity-timeout: -1
|
||||
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
|
||||
is-concurrent: true
|
||||
# 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
|
||||
is-share: false
|
||||
# token风格
|
||||
token-style: uuid
|
||||
# 是否输出操作日志
|
||||
is-log: false
|
||||
|
||||
oss:
|
||||
enable: false
|
||||
endpoint: ""
|
||||
accessKeyId: ""
|
||||
accessKeySecret: ""
|
||||
roleArn: ""
|
||||
roleSessionName: ""
|
||||
bucket: ""
|
||||
bucketDomain: ""
|
94
magic-boot/src/main/resources/logback-spring.xml
Normal file
94
magic-boot/src/main/resources/logback-spring.xml
Normal file
@ -0,0 +1,94 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<!-- 日志存放路径 -->
|
||||
<!-- <property name="log.path" value="/home/sdzw/Desktop/log" />-->
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/sys-info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/sys-error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>ERROR</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 用户访问日志输出 -->
|
||||
<appender name="sys-api" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/sys-api.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 按天回滚 daily -->
|
||||
<fileNamePattern>${log.path}/sys-api.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="com" level="info" />
|
||||
<!-- Spring日志级别控制 -->
|
||||
<logger name="org.springframework" level="warn" />
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="file_info" />
|
||||
<appender-ref ref="file_error" />
|
||||
</root>
|
||||
|
||||
<!--系统用户操作日志-->
|
||||
<logger name="sys-api" level="info">
|
||||
<appender-ref ref="sys-api"/>
|
||||
</logger>
|
||||
|
||||
</configuration>
|
42
magic-boot/src/main/resources/logback.xml
Normal file
42
magic-boot/src/main/resources/logback.xml
Normal file
@ -0,0 +1,42 @@
|
||||
<configuration debug="false">
|
||||
<logger name="org.apache" level="INFO" />
|
||||
<logger name="org.ssssssss" level="INFO" />
|
||||
<logger name="org.apache.http.wire" level="INFO" />
|
||||
<logger name="org.apache.http.headers" level="INFO" />
|
||||
<!-- <property name="CONSOLE_LOG_PATTERN"-->
|
||||
<!-- value="%date{yyyy-MM-dd HH:mm:ss} %highlight(%-5level) %magenta(%-4relative) --- [%yellow(thread)] %cyan(logger{39}) : %msg%n"/>-->
|
||||
<property name="CONSOLE_LOG_PATTERN" value="%date{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/main/sys-info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/main/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>ACCEPT</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
<root level="info">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
<appender-ref ref="file_info"/>
|
||||
</root>
|
||||
</configuration>
|
118
magic-boot/target/classes/application.yml
Normal file
118
magic-boot/target/classes/application.yml
Normal file
@ -0,0 +1,118 @@
|
||||
server:
|
||||
port: 18088
|
||||
compression:
|
||||
enabled: true
|
||||
min-response-size: 128
|
||||
|
||||
spring:
|
||||
profiles:
|
||||
active: dev
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 200MB
|
||||
max-request-size: 200MB
|
||||
jackson:
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
time-zone: GMT+8
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
url: jdbc:mysql://116.204.34.35:13300/zycx?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8
|
||||
username: root
|
||||
password: root
|
||||
druid:
|
||||
# 下面为连接池的补充设置,应用到上面所有数据源中
|
||||
# 初始化大小,最小,最大
|
||||
initial-size: 5
|
||||
min-idle: 5
|
||||
max-active: 1000
|
||||
# 配置获取连接等待超时的时间
|
||||
max-wait: 360000
|
||||
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||||
time-between-eviction-runs-millis: 60000
|
||||
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
||||
min-evictable-idle-time-millis: 300000
|
||||
validation-query: SELECT 1
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
# 打开PSCache,并且指定每个连接上PSCache的大小
|
||||
pool-prepared-statements: true
|
||||
# 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
|
||||
max-pool-prepared-statement-per-connection-size: 20
|
||||
filters: stat,wall
|
||||
use-global-data-source-stat: true
|
||||
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
|
||||
connect-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
|
||||
# 配置监控服务器
|
||||
stat-view-servlet:
|
||||
login-username: admin
|
||||
login-password: 123456
|
||||
reset-enable: false
|
||||
url-pattern: /druid/*
|
||||
# 添加IP白名单
|
||||
#allow:
|
||||
# 添加IP黑名单,当白名单和黑名单重复时,黑名单优先级更高
|
||||
#deny:
|
||||
web-stat-filter:
|
||||
# 添加过滤规则
|
||||
url-pattern: /*
|
||||
# 忽略过滤格式
|
||||
exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
|
||||
# 上传路径
|
||||
upload:
|
||||
dir: D:/mb/
|
||||
|
||||
magic-api:
|
||||
web: /magic/web
|
||||
show-sql: true #配置打印SQL
|
||||
sql-column-case: camel
|
||||
resource:
|
||||
location: data/magic-api
|
||||
backup: #备份相关配置
|
||||
enable: true #是否启用
|
||||
max-history: -1 #备份保留天数,-1为永久保留
|
||||
table-name: magic_backup_record_v2 #使用数据库存储备份时的表名
|
||||
page:
|
||||
page: current
|
||||
size: size
|
||||
cache:
|
||||
enable: true #开启缓存,默认是不开启的
|
||||
ttl: 3600000 #有效期1小时,默认-1 即永不过期
|
||||
response-code:
|
||||
success: 200 #执行成功的code值
|
||||
invalid: 400 #参数验证未通过的code值
|
||||
exception: 500 #执行出现异常的code值
|
||||
crud: # CRUD相关配置
|
||||
logic-delete-column: is_del #逻辑删除列
|
||||
logic-delete-value: 1 #逻辑删除值
|
||||
# security:
|
||||
# username: admin
|
||||
# password: 123456
|
||||
|
||||
# Sa-Token配置
|
||||
sa-token:
|
||||
# token名称 (同时也是cookie名称)
|
||||
token-name: token
|
||||
# token有效期,单位s 默认30天, -1代表永不过期
|
||||
timeout: 2592000
|
||||
# token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
|
||||
activity-timeout: -1
|
||||
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
|
||||
is-concurrent: true
|
||||
# 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
|
||||
is-share: false
|
||||
# token风格
|
||||
token-style: uuid
|
||||
# 是否输出操作日志
|
||||
is-log: false
|
||||
|
||||
oss:
|
||||
enable: false
|
||||
endpoint: ""
|
||||
accessKeyId: ""
|
||||
accessKeySecret: ""
|
||||
roleArn: ""
|
||||
roleSessionName: ""
|
||||
bucket: ""
|
||||
bucketDomain: ""
|
94
magic-boot/target/classes/logback-spring.xml
Normal file
94
magic-boot/target/classes/logback-spring.xml
Normal file
@ -0,0 +1,94 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<!-- 日志存放路径 -->
|
||||
<!-- <property name="log.path" value="/home/sdzw/Desktop/log" />-->
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/sys-info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/sys-error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>ERROR</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 用户访问日志输出 -->
|
||||
<appender name="sys-api" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/sys-api.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 按天回滚 daily -->
|
||||
<fileNamePattern>${log.path}/sys-api.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="com" level="info" />
|
||||
<!-- Spring日志级别控制 -->
|
||||
<logger name="org.springframework" level="warn" />
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="file_info" />
|
||||
<appender-ref ref="file_error" />
|
||||
</root>
|
||||
|
||||
<!--系统用户操作日志-->
|
||||
<logger name="sys-api" level="info">
|
||||
<appender-ref ref="sys-api"/>
|
||||
</logger>
|
||||
|
||||
</configuration>
|
42
magic-boot/target/classes/logback.xml
Normal file
42
magic-boot/target/classes/logback.xml
Normal file
@ -0,0 +1,42 @@
|
||||
<configuration debug="false">
|
||||
<logger name="org.apache" level="INFO" />
|
||||
<logger name="org.ssssssss" level="INFO" />
|
||||
<logger name="org.apache.http.wire" level="INFO" />
|
||||
<logger name="org.apache.http.headers" level="INFO" />
|
||||
<!-- <property name="CONSOLE_LOG_PATTERN"-->
|
||||
<!-- value="%date{yyyy-MM-dd HH:mm:ss} %highlight(%-5level) %magenta(%-4relative) --- [%yellow(thread)] %cyan(logger{39}) : %msg%n"/>-->
|
||||
<property name="CONSOLE_LOG_PATTERN" value="%date{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/main/sys-info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/main/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>ACCEPT</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
<root level="info">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
<appender-ref ref="file_info"/>
|
||||
</root>
|
||||
</configuration>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user