mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2026-04-26 00:00:04 +08:00
删除quarz
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "fd3d225a1cf141bf9998c4ec4bf4a6ab",
|
||||
"name" : "文件管理",
|
||||
"type" : "1",
|
||||
"parentId" : "02df51e4d7184780a98b632f43dc5848",
|
||||
"path" : "/file",
|
||||
"paths" : [ ],
|
||||
"options" : [ ]
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "cc20896df1c546fba56929cc75cb0309",
|
||||
"script" : null,
|
||||
"groupId" : "fd3d225a1cf141bf9998c4ec4bf4a6ab",
|
||||
"name" : "上传",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1635075982440,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"path" : "/upload",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
}
|
||||
================================
|
||||
import 'org.ssssssss.magicboot.utils.FileUtils'
|
||||
import request;
|
||||
|
||||
var map = FileUtils.saveFile(request.getFile('file'));
|
||||
|
||||
db.table("sys_file").primary("id").saveOrUpdate({
|
||||
url: map.url,
|
||||
externalId: externalId,
|
||||
externalType: externalType
|
||||
})
|
||||
|
||||
return map;
|
||||
@@ -1,33 +0,0 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "a18a418e9d2a437dbdb51191340086c9",
|
||||
"script" : null,
|
||||
"groupId" : "fd3d225a1cf141bf9998c4ec4bf4a6ab",
|
||||
"name" : "删除",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1635075573670,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"path" : "/delete",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
}
|
||||
================================
|
||||
import 'java.net.URLDecoder'
|
||||
import 'org.ssssssss.magicboot.model.Global'
|
||||
import 'org.ssssssss.magicboot.utils.FileUtils'
|
||||
|
||||
url = URLDecoder.decode(url, "UTF-8");
|
||||
|
||||
db.table("sys_file").where().eq("url",url).delete()
|
||||
|
||||
String realPath = Global.getUserFilesBaseDir() + "/" + url;
|
||||
FileUtil.del(realPath);
|
||||
@@ -1,30 +0,0 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "1d736fb0b9b54566943a0ea6696492c6",
|
||||
"script" : null,
|
||||
"groupId" : "fd3d225a1cf141bf9998c4ec4bf4a6ab",
|
||||
"name" : "排序",
|
||||
"createTime" : 1635074732708,
|
||||
"updateTime" : 1635074732708,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"path" : "/resort",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
}
|
||||
================================
|
||||
import 'java.net.URLDecoder'
|
||||
|
||||
for(index,url in urls.split(',')){
|
||||
url = URLDecoder.decode(url, "UTF-8")
|
||||
var id = db.selectValue("select id from sys_file where url = #{url}")
|
||||
db.table("sys_file").column("sort",index + 1).where().eq("id",id).update()
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,35 +0,0 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "874aea2c17ca4c79bcdff3d4cc458c87",
|
||||
"script" : null,
|
||||
"groupId" : "fd3d225a1cf141bf9998c4ec4bf4a6ab",
|
||||
"name" : "裁剪",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1635075977442,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"path" : "/cropper",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
}
|
||||
================================
|
||||
import 'org.ssssssss.magicboot.model.Global'
|
||||
import 'org.ssssssss.magicboot.utils.FileUtils'
|
||||
|
||||
url = URLDecoder.decode(url, "UTF-8");
|
||||
String realPath = Global.getUserFilesBaseDir() + "/" + url;
|
||||
FileUtil.del(realPath);
|
||||
|
||||
var map = FileUtils.saveFile(request.getFile('file'));
|
||||
|
||||
db.table("sys_file").column("url", map.url).where().eq("url", url).update()
|
||||
|
||||
return map
|
||||
Reference in New Issue
Block a user