ap-dev 1.1.9 → 1.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dev/ApiPanel/menus.js +3 -9
- package/dev/ApiPanel/modules/ApiJavaCommon.vue +47 -12
- package/dev/ApiPanel/{modules → tabs}/ApiPaging.vue +0 -0
- package/dev/ApiPanel/{modules → tabs}/ApiServiceUtil.vue +0 -0
- package/dev/ApiPanel/tabs/ApiStringUtil.vue +78 -72
- package/dev/ApiPanel/tabs/ApiTask.vue +80 -0
- package/package.json +1 -1
package/dev/ApiPanel/menus.js
CHANGED
|
@@ -80,21 +80,15 @@ const menus = [
|
|
|
80
80
|
}, {
|
|
81
81
|
id: 'ApiApSql',
|
|
82
82
|
label: '5.2 动态SQL'
|
|
83
|
-
}, {
|
|
84
|
-
id: 'ApiServiceUtil',
|
|
85
|
-
label: '5.3 生成通用代码'
|
|
86
83
|
}, {
|
|
87
84
|
id: 'ApiMybatis',
|
|
88
|
-
label: '5.
|
|
89
|
-
}, {
|
|
90
|
-
id: 'ApiPaging',
|
|
91
|
-
label: '5.5 表格分页'
|
|
85
|
+
label: '5.3 Mybatis规范'
|
|
92
86
|
}, {
|
|
93
87
|
id: 'ApiJavaUtils',
|
|
94
|
-
label: '5.
|
|
88
|
+
label: '5.4 常用工具类'
|
|
95
89
|
}, {
|
|
96
90
|
id: 'ApiOtherJava',
|
|
97
|
-
label: '5.
|
|
91
|
+
label: '5.5 其他'
|
|
98
92
|
}]
|
|
99
93
|
}]
|
|
100
94
|
export default menus
|
|
@@ -1,24 +1,50 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<el-tabs v-model="activeName" tabPosition="left" class="api-tabs">
|
|
3
|
+
<template v-for="(item,index) in opts">
|
|
4
|
+
<el-tab-pane :label="item.label" :name="'tab' + index" class="api-tab">
|
|
5
|
+
<component :is="item.component"></component>
|
|
6
|
+
</el-tab-pane>
|
|
7
|
+
</template>
|
|
8
|
+
</el-tabs>
|
|
3
9
|
</template>
|
|
4
10
|
|
|
5
11
|
<script>
|
|
6
|
-
import
|
|
12
|
+
import ApiServiceUtil from './../tabs/ApiServiceUtil'
|
|
13
|
+
import ApiException from './../tabs/ApiException'
|
|
14
|
+
import ApiPermission from './../tabs/ApiPermission'
|
|
15
|
+
import ApiPaging from './../tabs/ApiPaging'
|
|
16
|
+
import ApiTask from './../tabs/ApiTask'
|
|
7
17
|
|
|
8
18
|
export default {
|
|
9
|
-
name: "
|
|
10
|
-
components: {
|
|
19
|
+
name: "ApiJavaCommonUtil",
|
|
20
|
+
components: {
|
|
21
|
+
ApiServiceUtil,
|
|
22
|
+
ApiException,
|
|
23
|
+
ApiPermission,
|
|
24
|
+
ApiPaging,
|
|
25
|
+
ApiTask
|
|
26
|
+
},
|
|
11
27
|
data() {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
28
|
+
|
|
29
|
+
let opts = [{
|
|
30
|
+
label: "代码生成",
|
|
31
|
+
component: "ApiServiceUtil"
|
|
32
|
+
}, {
|
|
33
|
+
label: "异常处理",
|
|
34
|
+
component: "ApiException"
|
|
35
|
+
}, {
|
|
36
|
+
label: "权限判断",
|
|
37
|
+
component: "ApiPermission"
|
|
38
|
+
}, {
|
|
39
|
+
label: "表格分页",
|
|
40
|
+
component: "ApiPaging"
|
|
41
|
+
}, {
|
|
42
|
+
label: "调度管理",
|
|
43
|
+
component: "ApiTask"
|
|
44
|
+
}
|
|
20
45
|
];
|
|
21
46
|
return {
|
|
47
|
+
activeName: 'tab0',
|
|
22
48
|
opts: opts
|
|
23
49
|
}
|
|
24
50
|
}
|
|
@@ -26,4 +52,13 @@ export default {
|
|
|
26
52
|
</script>
|
|
27
53
|
|
|
28
54
|
<style scoped>
|
|
55
|
+
.api-tabs {
|
|
56
|
+
display: flex;
|
|
57
|
+
height: 100%;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.api-tabs /deep/ .el-tabs__content {
|
|
61
|
+
flex: 1;
|
|
62
|
+
overflow: scroll;
|
|
63
|
+
}
|
|
29
64
|
</style>
|
|
File without changes
|
|
File without changes
|
|
@@ -1,101 +1,107 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
<div style="height: 100%">
|
|
3
|
+
<h3>字符串工具类 - StringUtil</h3>
|
|
4
|
+
<api-table :data="methodData" :columns="methodCols"/>
|
|
5
|
+
</div>
|
|
6
6
|
</template>
|
|
7
7
|
|
|
8
8
|
<script>
|
|
9
|
-
import {
|
|
9
|
+
import {ApiCode, ApiContent, ApiTable, ApiTittle1, ApiTittle2} from './../components'
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
12
|
+
name: 'ApiStringUtil',
|
|
13
|
+
components: {
|
|
14
|
+
ApiTable, ApiCode, ApiTittle1, ApiContent, ApiTittle2
|
|
15
|
+
},
|
|
16
|
+
data() {
|
|
17
|
+
const methodCols = [
|
|
18
|
+
{label: '方法名', prop: 'name', width: '220px'},
|
|
19
|
+
{label: '说明', prop: 'memo', width: '300px'},
|
|
20
|
+
{label: '示例代码', prop: 'code', minWidth: '100px'}]
|
|
21
|
+
const methodData = [
|
|
22
|
+
{
|
|
23
|
+
name: 'isEmpty',
|
|
24
|
+
memo: `判断是否为空<br><span class="api-memo">注:null和"" 均为空。</span>`,
|
|
25
|
+
code: `<span class="api-code">// 1、为空:返回true
|
|
26
26
|
boolean a = StringUtil.isEmpty("");
|
|
27
27
|
boolean a = StringUtil.isEmpty(null);
|
|
28
28
|
// 2、不为空:false
|
|
29
29
|
boolean a = StringUtil.isEmpty("xx");
|
|
30
30
|
</span>`
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'isNotEmpty',
|
|
34
|
+
memo: `判断是否不为空<br><span class="api-memo">注:null和"" 均为空。</span>`,
|
|
35
|
+
code: `<span class="api-code">// 1、不为空:返回true
|
|
36
36
|
boolean a = StringUtil.isNotEmpty("xx");
|
|
37
37
|
// 2、为空:返回false
|
|
38
38
|
boolean a = StringUtil.isNotEmpty("");
|
|
39
39
|
boolean a = StringUtil.isNotEmpty(null);
|
|
40
40
|
</span>`
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'convertStringToDB',
|
|
44
|
+
memo: '将驼峰属性转为DB形式<br>userName -> user_name',
|
|
45
|
+
code: `<span class="api-code">// 转换:返回 user_name
|
|
46
46
|
String a= StringUtil.convertStringToDB("userName")
|
|
47
47
|
</span>`
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: 'convertDBStrToParam',
|
|
51
|
+
memo: '将DB形式转为驼峰属性<br>user_name -> userName',
|
|
52
|
+
code: `<span class="api-code">// 转换:返回 userName
|
|
53
53
|
String a= StringUtil.convertDBStrToParam("user_name")</span>`
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'convertDBStrToBean',
|
|
57
|
+
memo: '将DB形式转为驼峰属性<br>user_name -> UserName',
|
|
58
|
+
code: `<span class="api-code">// 转换:返回 UserName
|
|
59
59
|
String a= StringUtil.convertDBStrToBean("user_name")</span>`
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'convertSqlParam',
|
|
63
|
+
memo: '字符串转为引号拼接形式<br> a,b,c -> \'a\',\'b\',\'c\'<br> <span class="api-memo">注:转换后,数据库形式逗号拼接的字符串。</span>',
|
|
64
|
+
code: `<span class="api-code">// 转换:返回 'a','b','c'
|
|
65
65
|
String a= StringUtil.convertDBStrToBean("a,b,c")</span>`
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: 'convertToList',
|
|
69
|
+
memo: '","拼接的字符串转为list',
|
|
70
|
+
code: `<span class="api-code">// 转换:返回list
|
|
71
71
|
List<String> a= StringUtil.convertToList("a,b,c")</span>`
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: 'asList',
|
|
75
|
+
memo: '","拼接的字符串转为list',
|
|
76
|
+
code: `<span class="api-code">// 转换:返回list
|
|
77
|
+
List<Object> a= StringUtil.asList("a,b,c")</span>`
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'getSuffix',
|
|
81
|
+
memo: '获取文件的后缀名',
|
|
82
|
+
code: `<span class="api-code">// 返回 .jpg
|
|
77
83
|
String a= StringUtil.getSuffix("aaa.jgp")</span>`
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: 'initialUpperCase',
|
|
87
|
+
memo: '字符串首字母转为大写',
|
|
88
|
+
code: `<span class="api-code">// 返回 Abc
|
|
83
89
|
String a= StringUtil.initialUpperCase("abc")</span>`
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: 'deleteLastChar',
|
|
93
|
+
memo: '删除最后一个字符',
|
|
94
|
+
code: `<span class="api-code">// 返回 ab
|
|
89
95
|
String a= StringUtil.deleteLastChar("abc")</span>`
|
|
90
|
-
|
|
91
|
-
|
|
96
|
+
}
|
|
97
|
+
]
|
|
92
98
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
+
return {
|
|
100
|
+
methodData,
|
|
101
|
+
methodCols
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
methods: {}
|
|
99
105
|
}
|
|
100
106
|
</script>
|
|
101
107
|
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="line-height: 1.5;">
|
|
3
|
+
<api-tittle-1>任务调度管理:</api-tittle-1>
|
|
4
|
+
<api-tittle-2>一、【调度任务】定义任务</api-tittle-2>
|
|
5
|
+
<api-content>
|
|
6
|
+
<b>表格列说明:</b><br>
|
|
7
|
+
<b>任务类型:</b>任务分组类型<br>
|
|
8
|
+
<b>接口类型:</b>kettle、java接口。<br>
|
|
9
|
+
<b>路径(java接口):</b>/项目名/xx/xxx。如:/bi/test/getXxx<br>
|
|
10
|
+
<b>路径(kettle):</b>kettle需要上传kettle文件,上传成功自动生成路径<br>
|
|
11
|
+
<div class="api-memo">注:1、java接口即为controller接口。<br>
|
|
12
|
+
2、kettle接口,支持转换(*.ktr)和job(*.kjb)<br>
|
|
13
|
+
3、kettle文件使用Spoon生成,对应的spoon版本:pdi-ce-9.2.0.0-290<br>
|
|
14
|
+
4、需要kettle执行本地文件时,可手动将路径临时改为本地路径。例:"E:\kettle\test.ktr"<br>
|
|
15
|
+
</div>
|
|
16
|
+
</api-content>
|
|
17
|
+
<br>
|
|
18
|
+
<api-tittle-2>二、【调度环境】定义任务可执行的环境ip</api-tittle-2>
|
|
19
|
+
<api-content>
|
|
20
|
+
<b>表格列说明:</b><br>
|
|
21
|
+
<b>ip地址:</b>调度计划的配置项,具体参考调度计划。<br>
|
|
22
|
+
</api-content>
|
|
23
|
+
<br>
|
|
24
|
+
<api-tittle-2>三、【调度计划】定义任务可执行的时间</api-tittle-2>
|
|
25
|
+
<api-content>
|
|
26
|
+
<b>操作说明:</b><br>
|
|
27
|
+
<b>立即执行:</b>立即执行调度计划任务<br>
|
|
28
|
+
<b>加载:</b>将调度计划加载到spring中,只有加载到spring中的计划定时才生效<br>
|
|
29
|
+
<b>移除:</b>将调度计划从spring中移除<br>
|
|
30
|
+
<br>
|
|
31
|
+
<b>表格列说明:</b><br>
|
|
32
|
+
<b>调度任务:</b>选择需要执行的任务<br>
|
|
33
|
+
<b>定时表达式:</b>cron表达式<br>
|
|
34
|
+
<b>执行环境:</b>选择允许执行的环境。eg:如果想要本地执行定时任务,那么执行环境必须有选择本地的ip项<br>
|
|
35
|
+
<b>开始时间、结束时间:</b>不填表示长期执行的计划。有填写,在任务调度时会校验时间<br>
|
|
36
|
+
<b>加载状态:</b>调度计划是否已经加载到spring中<br>
|
|
37
|
+
<div class="api-memo">注:1、调度计划不执行:定时任务失效、调度计划失效、调度时间不在调度计划的区间内,调度计划会终止执行。<br>
|
|
38
|
+
</div>
|
|
39
|
+
</api-content>
|
|
40
|
+
<br>
|
|
41
|
+
<api-tittle-2>四、【同步时间戳】记录数据库表的最后同步时间</api-tittle-2>
|
|
42
|
+
<api-content>
|
|
43
|
+
<b>表格列说明:</b><br>
|
|
44
|
+
<b>编码:</b>编码,用于获取和更新时间戳<br>
|
|
45
|
+
<b>名称:</b>同步名称<br>
|
|
46
|
+
<b>表:</b>同步的数据库表<br>
|
|
47
|
+
<b>数据源:</b>同步的数据源<br>
|
|
48
|
+
<api-code>
|
|
49
|
+
// 更新时间戳:code-> 编码、lastTime-> 最后更新时间<br>
|
|
50
|
+
TaskUtil.updateTimeStamp(code, lastTime)<br>
|
|
51
|
+
// 更新时间戳:code-> 编码<br>
|
|
52
|
+
TaskUtil.getTimeStamp(code)<br>
|
|
53
|
+
</api-code>
|
|
54
|
+
<div class="api-memo">
|
|
55
|
+
注:同步时间戳需要在各自接口中手动调用<br>
|
|
56
|
+
</div>
|
|
57
|
+
</api-content>
|
|
58
|
+
<br>
|
|
59
|
+
<api-tittle-2>五、【调度日志】</api-tittle-2>
|
|
60
|
+
<api-content>
|
|
61
|
+
查看调度计划执行的情况
|
|
62
|
+
</api-content>
|
|
63
|
+
<br>
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
66
|
+
|
|
67
|
+
<script>
|
|
68
|
+
import {ApiCode, ApiContent, ApiTable, ApiTittle1, ApiTittle2} from './../components'
|
|
69
|
+
|
|
70
|
+
export default {
|
|
71
|
+
name: 'ApiLoginUser',
|
|
72
|
+
components: {
|
|
73
|
+
ApiTable, ApiCode, ApiTittle1, ApiContent, ApiTittle2
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
</script>
|
|
77
|
+
|
|
78
|
+
<style scoped>
|
|
79
|
+
|
|
80
|
+
</style>
|