Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
d1687d5d
提交
d1687d5d
authored
6月 01, 2021
作者:
fit2cloud-chenyw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: xpack插件默认安装表记录
上级
e677788a
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
227 行增加
和
120 行删除
+227
-120
MyPlugin.java
backend/src/main/java/io/dataease/base/domain/MyPlugin.java
+4
-2
MyPluginExample.java
...rc/main/java/io/dataease/base/domain/MyPluginExample.java
+140
-70
MyPluginMapper.xml
.../src/main/java/io/dataease/base/mapper/MyPluginMapper.xml
+42
-27
PluginRunner.java
...rc/main/java/io/dataease/plugins/config/PluginRunner.java
+14
-6
PluginService.java
.../src/main/java/io/dataease/service/sys/PluginService.java
+15
-7
V2__dataease_ddl.sql
backend/src/main/resources/db/migration/V2__dataease_ddl.sql
+3
-2
V3__init_data.sql
backend/src/main/resources/db/migration/V3__init_data.sql
+3
-1
index.vue
frontend/src/views/system/plugin/index.vue
+6
-5
没有找到文件。
backend/src/main/java/io/dataease/base/domain/MyPlugin.java
浏览文件 @
d1687d5d
...
...
@@ -9,10 +9,14 @@ public class MyPlugin implements Serializable {
private
String
name
;
private
String
store
;
private
Boolean
free
;
private
Integer
cost
;
private
String
category
;
private
String
descript
;
private
String
version
;
...
...
@@ -29,8 +33,6 @@ public class MyPlugin implements Serializable {
private
String
moduleName
;
private
String
beanName
;
private
String
icon
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
backend/src/main/java/io/dataease/base/domain/MyPluginExample.java
浏览文件 @
d1687d5d
...
...
@@ -234,6 +234,76 @@ public class MyPluginExample {
return
(
Criteria
)
this
;
}
public
Criteria
andStoreIsNull
()
{
addCriterion
(
"store is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStoreIsNotNull
()
{
addCriterion
(
"store is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStoreEqualTo
(
String
value
)
{
addCriterion
(
"store ="
,
value
,
"store"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStoreNotEqualTo
(
String
value
)
{
addCriterion
(
"store <>"
,
value
,
"store"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStoreGreaterThan
(
String
value
)
{
addCriterion
(
"store >"
,
value
,
"store"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStoreGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"store >="
,
value
,
"store"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStoreLessThan
(
String
value
)
{
addCriterion
(
"store <"
,
value
,
"store"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStoreLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"store <="
,
value
,
"store"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStoreLike
(
String
value
)
{
addCriterion
(
"store like"
,
value
,
"store"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStoreNotLike
(
String
value
)
{
addCriterion
(
"store not like"
,
value
,
"store"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStoreIn
(
List
<
String
>
values
)
{
addCriterion
(
"store in"
,
values
,
"store"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStoreNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"store not in"
,
values
,
"store"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStoreBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"store between"
,
value1
,
value2
,
"store"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStoreNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"store not between"
,
value1
,
value2
,
"store"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFreeIsNull
()
{
addCriterion
(
"`free` is null"
);
return
(
Criteria
)
this
;
...
...
@@ -354,6 +424,76 @@ public class MyPluginExample {
return
(
Criteria
)
this
;
}
public
Criteria
andCategoryIsNull
()
{
addCriterion
(
"category is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCategoryIsNotNull
()
{
addCriterion
(
"category is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCategoryEqualTo
(
String
value
)
{
addCriterion
(
"category ="
,
value
,
"category"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCategoryNotEqualTo
(
String
value
)
{
addCriterion
(
"category <>"
,
value
,
"category"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCategoryGreaterThan
(
String
value
)
{
addCriterion
(
"category >"
,
value
,
"category"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCategoryGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"category >="
,
value
,
"category"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCategoryLessThan
(
String
value
)
{
addCriterion
(
"category <"
,
value
,
"category"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCategoryLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"category <="
,
value
,
"category"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCategoryLike
(
String
value
)
{
addCriterion
(
"category like"
,
value
,
"category"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCategoryNotLike
(
String
value
)
{
addCriterion
(
"category not like"
,
value
,
"category"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCategoryIn
(
List
<
String
>
values
)
{
addCriterion
(
"category in"
,
values
,
"category"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCategoryNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"category not in"
,
values
,
"category"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCategoryBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"category between"
,
value1
,
value2
,
"category"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCategoryNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"category not between"
,
value1
,
value2
,
"category"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptIsNull
()
{
addCriterion
(
"descript is null"
);
return
(
Criteria
)
this
;
...
...
@@ -874,76 +1014,6 @@ public class MyPluginExample {
return
(
Criteria
)
this
;
}
public
Criteria
andBeanNameIsNull
()
{
addCriterion
(
"bean_name is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeanNameIsNotNull
()
{
addCriterion
(
"bean_name is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeanNameEqualTo
(
String
value
)
{
addCriterion
(
"bean_name ="
,
value
,
"beanName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeanNameNotEqualTo
(
String
value
)
{
addCriterion
(
"bean_name <>"
,
value
,
"beanName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeanNameGreaterThan
(
String
value
)
{
addCriterion
(
"bean_name >"
,
value
,
"beanName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeanNameGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"bean_name >="
,
value
,
"beanName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeanNameLessThan
(
String
value
)
{
addCriterion
(
"bean_name <"
,
value
,
"beanName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeanNameLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"bean_name <="
,
value
,
"beanName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeanNameLike
(
String
value
)
{
addCriterion
(
"bean_name like"
,
value
,
"beanName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeanNameNotLike
(
String
value
)
{
addCriterion
(
"bean_name not like"
,
value
,
"beanName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeanNameIn
(
List
<
String
>
values
)
{
addCriterion
(
"bean_name in"
,
values
,
"beanName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeanNameNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"bean_name not in"
,
values
,
"beanName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeanNameBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"bean_name between"
,
value1
,
value2
,
"beanName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeanNameNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"bean_name not between"
,
value1
,
value2
,
"beanName"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIconIsNull
()
{
addCriterion
(
"icon is null"
);
return
(
Criteria
)
this
;
...
...
backend/src/main/java/io/dataease/base/mapper/MyPluginMapper.xml
浏览文件 @
d1687d5d
...
...
@@ -4,8 +4,10 @@
<resultMap
id=
"BaseResultMap"
type=
"io.dataease.base.domain.MyPlugin"
>
<id
column=
"plugin_id"
jdbcType=
"BIGINT"
property=
"pluginId"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"store"
jdbcType=
"VARCHAR"
property=
"store"
/>
<result
column=
"free"
jdbcType=
"BIT"
property=
"free"
/>
<result
column=
"cost"
jdbcType=
"INTEGER"
property=
"cost"
/>
<result
column=
"category"
jdbcType=
"VARCHAR"
property=
"category"
/>
<result
column=
"descript"
jdbcType=
"VARCHAR"
property=
"descript"
/>
<result
column=
"version"
jdbcType=
"VARCHAR"
property=
"version"
/>
<result
column=
"install_type"
jdbcType=
"INTEGER"
property=
"installType"
/>
...
...
@@ -14,7 +16,6 @@
<result
column=
"release_time"
jdbcType=
"BIGINT"
property=
"releaseTime"
/>
<result
column=
"install_time"
jdbcType=
"BIGINT"
property=
"installTime"
/>
<result
column=
"module_name"
jdbcType=
"VARCHAR"
property=
"moduleName"
/>
<result
column=
"bean_name"
jdbcType=
"VARCHAR"
property=
"beanName"
/>
<result
column=
"icon"
jdbcType=
"VARCHAR"
property=
"icon"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
...
...
@@ -76,8 +77,8 @@
</where>
</sql>
<sql
id=
"Base_Column_List"
>
plugin_id, `name`,
`free`, cost, descript, version, install_type, creator, load_mybatis
,
release_time, install_time, module_name, bean
_name, icon
plugin_id, `name`,
store, `free`, cost, category, descript, version, install_type
,
creator, load_mybatis, release_time, install_time, module
_name, icon
</sql>
<select
id=
"selectByExample"
parameterType=
"io.dataease.base.domain.MyPluginExample"
resultMap=
"BaseResultMap"
>
select
...
...
@@ -110,16 +111,16 @@
</if>
</delete>
<insert
id=
"insert"
parameterType=
"io.dataease.base.domain.MyPlugin"
>
insert into my_plugin (plugin_id, `name`,
`free`
,
cost, descript, version
,
install_type, creator, load_mybatis
,
release_time, install_time, module_na
me,
bean
_name, icon)
values (#{pluginId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{
free,jdbcType=BIT
},
#{
cost,jdbcType=INTEGER}, #{descript,jdbcType=VARCHAR}, #{version
,jdbcType=VARCHAR},
#{
installType,jdbcType=INTEGER}, #{creator,jdbcType=VARCHAR}, #{loadMybatis,jdbcType=BIT
},
#{
releaseTime,jdbcType=BIGINT}, #{installTime,jdbcType=BIGINT}, #{moduleName,jdbcType=VARCHAR
},
#{
bean
Name,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR})
insert into my_plugin (plugin_id, `name`,
store
,
`free`, cost, category, descript
,
version, install_type, creator
,
load_mybatis, release_time, install_ti
me,
module
_name, icon)
values (#{pluginId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{
store,jdbcType=VARCHAR
},
#{
free,jdbcType=BIT}, #{cost,jdbcType=INTEGER}, #{category,jdbcType=VARCHAR}, #{descript
,jdbcType=VARCHAR},
#{
version,jdbcType=VARCHAR}, #{installType,jdbcType=INTEGER}, #{creator,jdbcType=VARCHAR
},
#{
loadMybatis,jdbcType=BIT}, #{releaseTime,jdbcType=BIGINT}, #{installTime,jdbcType=BIGINT
},
#{
module
Name,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"io.dataease.base.domain.MyPlugin"
>
insert into my_plugin
...
...
@@ -130,12 +131,18 @@
<if
test=
"name != null"
>
`name`,
</if>
<if
test=
"store != null"
>
store,
</if>
<if
test=
"free != null"
>
`free`,
</if>
<if
test=
"cost != null"
>
cost,
</if>
<if
test=
"category != null"
>
category,
</if>
<if
test=
"descript != null"
>
descript,
</if>
...
...
@@ -160,9 +167,6 @@
<if
test=
"moduleName != null"
>
module_name,
</if>
<if
test=
"beanName != null"
>
bean_name,
</if>
<if
test=
"icon != null"
>
icon,
</if>
...
...
@@ -174,12 +178,18 @@
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"store != null"
>
#{store,jdbcType=VARCHAR},
</if>
<if
test=
"free != null"
>
#{free,jdbcType=BIT},
</if>
<if
test=
"cost != null"
>
#{cost,jdbcType=INTEGER},
</if>
<if
test=
"category != null"
>
#{category,jdbcType=VARCHAR},
</if>
<if
test=
"descript != null"
>
#{descript,jdbcType=VARCHAR},
</if>
...
...
@@ -204,9 +214,6 @@
<if
test=
"moduleName != null"
>
#{moduleName,jdbcType=VARCHAR},
</if>
<if
test=
"beanName != null"
>
#{beanName,jdbcType=VARCHAR},
</if>
<if
test=
"icon != null"
>
#{icon,jdbcType=VARCHAR},
</if>
...
...
@@ -227,12 +234,18 @@
<if
test=
"record.name != null"
>
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if
test=
"record.store != null"
>
store = #{record.store,jdbcType=VARCHAR},
</if>
<if
test=
"record.free != null"
>
`free` = #{record.free,jdbcType=BIT},
</if>
<if
test=
"record.cost != null"
>
cost = #{record.cost,jdbcType=INTEGER},
</if>
<if
test=
"record.category != null"
>
category = #{record.category,jdbcType=VARCHAR},
</if>
<if
test=
"record.descript != null"
>
descript = #{record.descript,jdbcType=VARCHAR},
</if>
...
...
@@ -257,9 +270,6 @@
<if
test=
"record.moduleName != null"
>
module_name = #{record.moduleName,jdbcType=VARCHAR},
</if>
<if
test=
"record.beanName != null"
>
bean_name = #{record.beanName,jdbcType=VARCHAR},
</if>
<if
test=
"record.icon != null"
>
icon = #{record.icon,jdbcType=VARCHAR},
</if>
...
...
@@ -272,8 +282,10 @@
update my_plugin
set plugin_id = #{record.pluginId,jdbcType=BIGINT},
`name` = #{record.name,jdbcType=VARCHAR},
store = #{record.store,jdbcType=VARCHAR},
`free` = #{record.free,jdbcType=BIT},
cost = #{record.cost,jdbcType=INTEGER},
category = #{record.category,jdbcType=VARCHAR},
descript = #{record.descript,jdbcType=VARCHAR},
version = #{record.version,jdbcType=VARCHAR},
install_type = #{record.installType,jdbcType=INTEGER},
...
...
@@ -282,7 +294,6 @@
release_time = #{record.releaseTime,jdbcType=BIGINT},
install_time = #{record.installTime,jdbcType=BIGINT},
module_name = #{record.moduleName,jdbcType=VARCHAR},
bean_name = #{record.beanName,jdbcType=VARCHAR},
icon = #{record.icon,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
...
@@ -294,12 +305,18 @@
<if
test=
"name != null"
>
`name` = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"store != null"
>
store = #{store,jdbcType=VARCHAR},
</if>
<if
test=
"free != null"
>
`free` = #{free,jdbcType=BIT},
</if>
<if
test=
"cost != null"
>
cost = #{cost,jdbcType=INTEGER},
</if>
<if
test=
"category != null"
>
category = #{category,jdbcType=VARCHAR},
</if>
<if
test=
"descript != null"
>
descript = #{descript,jdbcType=VARCHAR},
</if>
...
...
@@ -324,9 +341,6 @@
<if
test=
"moduleName != null"
>
module_name = #{moduleName,jdbcType=VARCHAR},
</if>
<if
test=
"beanName != null"
>
bean_name = #{beanName,jdbcType=VARCHAR},
</if>
<if
test=
"icon != null"
>
icon = #{icon,jdbcType=VARCHAR},
</if>
...
...
@@ -336,8 +350,10 @@
<update
id=
"updateByPrimaryKey"
parameterType=
"io.dataease.base.domain.MyPlugin"
>
update my_plugin
set `name` = #{name,jdbcType=VARCHAR},
store = #{store,jdbcType=VARCHAR},
`free` = #{free,jdbcType=BIT},
cost = #{cost,jdbcType=INTEGER},
category = #{category,jdbcType=VARCHAR},
descript = #{descript,jdbcType=VARCHAR},
version = #{version,jdbcType=VARCHAR},
install_type = #{installType,jdbcType=INTEGER},
...
...
@@ -346,7 +362,6 @@
release_time = #{releaseTime,jdbcType=BIGINT},
install_time = #{installTime,jdbcType=BIGINT},
module_name = #{moduleName,jdbcType=VARCHAR},
bean_name = #{beanName,jdbcType=VARCHAR},
icon = #{icon,jdbcType=VARCHAR}
where plugin_id = #{pluginId,jdbcType=BIGINT}
</update>
...
...
backend/src/main/java/io/dataease/plugins/config/PluginRunner.java
浏览文件 @
d1687d5d
...
...
@@ -2,6 +2,7 @@ package io.dataease.plugins.config;
import
io.dataease.base.domain.MyPlugin
;
import
io.dataease.commons.utils.DeFileUtils
;
import
io.dataease.commons.utils.LogUtil
;
import
io.dataease.controller.sys.base.BaseGridRequest
;
import
io.dataease.service.sys.PluginService
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -30,15 +31,22 @@ public class PluginRunner implements ApplicationRunner {
BaseGridRequest
request
=
new
BaseGridRequest
();
List
<
MyPlugin
>
plugins
=
pluginService
.
query
(
request
);
plugins
.
stream
().
forEach
(
plugin
->
{
String
name
=
plugin
.
getNam
e
();
String
store
=
plugin
.
getStor
e
();
String
version
=
plugin
.
getVersion
();
String
versionDir
=
pluginDir
+
name
+
"/"
+
version
+
"/"
;
File
fileDir
=
new
File
(
versionDir
);
File
[]
jarFiles
=
fileDir
.
listFiles
(
this
::
isPluginJar
);
File
jarFile
=
jarFiles
[
0
];
String
moduleName
=
plugin
.
getModuleName
();
String
fileName
=
moduleName
+
"-"
+
version
+
".jar"
;
String
path
=
pluginDir
+
store
+
"/"
+
fileName
;
File
jarFile
=
new
File
(
path
);
String
jarPath
=
jarFile
.
getAbsolutePath
();
try
{
pluginService
.
loadJar
(
jarPath
,
plugin
);
if
(
jarFile
.
exists
())
{
pluginService
.
loadJar
(
jarPath
,
plugin
);
}
else
{
LogUtil
.
error
(
"插件错误"
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
backend/src/main/java/io/dataease/service/sys/PluginService.java
浏览文件 @
d1687d5d
...
...
@@ -81,18 +81,17 @@ public class PluginService {
DeFileUtils
.
deleteFile
(
folder
);
throw
new
RuntimeException
(
"缺少插件jar文件"
);
}
String
version
Dir
=
null
;
String
target
Dir
=
null
;
try
{
File
jarFile
=
jarFiles
[
0
];
versionDir
=
makeVersion
Dir
(
myPlugin
);
targetDir
=
makeTarget
Dir
(
myPlugin
);
String
jarPath
=
null
;
jarPath
=
DeFileUtils
.
copy
(
jarFile
,
versionDir
);
//DeFileUtils.copy(folderFile, versionDir);
jarPath
=
DeFileUtils
.
copy
(
jarFile
,
targetDir
);
loadJar
(
jarPath
,
myPlugin
);
myPluginMapper
.
insert
(
myPlugin
);
}
catch
(
Exception
e
)
{
if
(
StringUtils
.
isNotEmpty
(
version
Dir
))
{
DeFileUtils
.
deleteFile
(
version
Dir
);
if
(
StringUtils
.
isNotEmpty
(
target
Dir
))
{
DeFileUtils
.
deleteFile
(
target
Dir
);
}
e
.
printStackTrace
();
}
finally
{
...
...
@@ -113,7 +112,7 @@ public class PluginService {
private
String
makeVersion
Dir
(
MyPlugin
myPlugin
)
{
/*private String makeTarget
Dir(MyPlugin myPlugin) {
String name = myPlugin.getName();
String dir = pluginDir + name + "/" + myPlugin.getVersion() + "/";
File fileDir = new File(dir);
...
...
@@ -121,6 +120,15 @@ public class PluginService {
fileDir.mkdirs();
}
return dir;
}*/
private
String
makeTargetDir
(
MyPlugin
myPlugin
)
{
String
store
=
myPlugin
.
getStore
();
String
dir
=
pluginDir
+
store
+
"/"
;
File
fileDir
=
new
File
(
dir
);
if
(!
fileDir
.
exists
())
{
fileDir
.
mkdirs
();
}
return
dir
;
}
/**
...
...
backend/src/main/resources/db/migration/V2__dataease_ddl.sql
浏览文件 @
d1687d5d
...
...
@@ -166,8 +166,10 @@ DROP TABLE IF EXISTS `my_plugin`;
CREATE
TABLE
`my_plugin`
(
`plugin_id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'插件名称'
,
`store`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'商家'
,
`free`
tinyint
(
1
)
DEFAULT
'0'
COMMENT
'是否免费'
,
`cost`
int
(
10
)
DEFAULT
NULL
COMMENT
'费用'
,
`category`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'列别'
,
`descript`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'描述'
,
`version`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'版本号'
,
`install_type`
int
(
4
)
DEFAULT
NULL
COMMENT
'安装类型'
,
...
...
@@ -176,10 +178,9 @@ CREATE TABLE `my_plugin` (
`release_time`
bigint
(
13
)
DEFAULT
NULL
COMMENT
'发布时间'
,
`install_time`
bigint
(
13
)
DEFAULT
NULL
COMMENT
'安装时间'
,
`module_name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'jar包名称'
,
`bean_name`
varchar
(
40
)
DEFAULT
NULL
COMMENT
'bean名称'
,
`icon`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'图标'
,
PRIMARY
KEY
(
`plugin_id`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
10
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
COMPACT
COMMENT
=
'插件表'
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
2
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
COMPACT
COMMENT
=
'插件表'
;
DROP
TABLE
IF
EXISTS
`license`
;
CREATE
TABLE
`license`
(
...
...
backend/src/main/resources/db/migration/V3__init_data.sql
浏览文件 @
d1687d5d
...
...
@@ -164,7 +164,9 @@ COMMIT;
INSERT
INTO
`panel_template`
(
`id`
,
`name`
,
`pid`
,
`level`
,
`node_type`
,
`create_by`
,
`create_time`
,
`snapshot`
,
`template_type`
,
`template_style`
,
`template_data`
,
`dynamic_data`
)
VALUES
(
'self'
,
'用户模板'
,
''
,
-
1
,
'folder'
,
NULL
,
NULL
,
''
,
'self'
,
''
,
''
,
NULL
);
INSERT
INTO
`panel_template`
(
`id`
,
`name`
,
`pid`
,
`level`
,
`node_type`
,
`create_by`
,
`create_time`
,
`snapshot`
,
`template_type`
,
`template_style`
,
`template_data`
,
`dynamic_data`
)
VALUES
(
'system'
,
'系统模板'
,
''
,
-
1
,
'folder'
,
NULL
,
NULL
,
NULL
,
'system'
,
NULL
,
NULL
,
NULL
);
BEGIN
;
INSERT
INTO
`my_plugin`
VALUES
(
1
,
'xpakc默认插件'
,
'default'
,
0
,
20000
,
'xpack'
,
'请购买正式许可'
,
'1.0-SNAPSHOT'
,
NULL
,
'fit2cloud-chenyw'
,
1
,
1620624387327
,
NULL
,
'deplugin-xpack-backend'
,
NULL
);
COMMIT
;
-- ----------------------------
frontend/src/views/system/plugin/index.vue
浏览文件 @
d1687d5d
...
...
@@ -52,7 +52,7 @@
import
LayoutContent
from
'@/components/business/LayoutContent'
import
ComplexTable
from
'@/components/business/complex-table'
import
{
checkPermission
}
from
'@/utils/permission'
//
import { checkPermission } from '@/utils/permission'
import
{
formatCondition
}
from
'@/utils/index'
import
{
pluginLists
,
uninstall
}
from
'@/api/system/plugin'
import
{
getToken
}
from
'@/utils/auth'
...
...
@@ -64,10 +64,10 @@ export default {
header
:
''
,
columns
:
[],
buttons
:
[
{
label
:
this
.
$t
(
'commons.delete'
),
icon
:
'el-icon-delete'
,
type
:
'danger'
,
click
:
this
.
del
,
show
:
checkPermission
([
'user:del'
])
}
//
{
//
label: this.$t('commons.delete'), icon: 'el-icon-delete', type: 'danger', click: this.del,
//
show: checkPermission(['user:del'])
//
}
],
searchConfig
:
{
useQuickSearch
:
false
,
...
...
@@ -123,6 +123,7 @@ export default {
},
uploadSuccess
(
response
,
file
,
fileList
)
{
this
.
uploading
=
false
this
.
search
()
},
del
(
row
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论