magic-boot/data/magic-api/api/后台/文件管理/排序.ms

31 lines
833 B
Plaintext
Raw Normal View History

2021-10-24 20:09:53 +08:00
{
"properties" : { },
"id" : "1d736fb0b9b54566943a0ea6696492c6",
"script" : null,
"groupId" : "fd3d225a1cf141bf9998c4ec4bf4a6ab",
"name" : "排序",
"createTime" : 1646490239454,
2022-02-01 18:26:42 +08:00
"updateTime" : 1643706726137,
2021-10-24 20:09:53 +08:00
"lock" : "0",
"createBy" : null,
"updateBy" : null,
2021-10-24 20:09:53 +08:00
"path" : "/resort",
"method" : "GET",
2021-10-24 20:09:53 +08:00
"parameters" : [ ],
"options" : [ ],
2021-10-24 20:09:53 +08:00
"requestBody" : "",
"headers" : [ ],
"paths" : [ ],
"responseBody" : null,
"description" : null,
"requestBodyDefinition" : null,
"responseBodyDefinition" : null
2021-10-24 20:09:53 +08:00
}
================================
2022-02-01 18:26:42 +08:00
import java.net.URLDecoder
2021-10-24 20:09:53 +08:00
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()
}