upgrade
This commit is contained in:
@@ -40,15 +40,17 @@ function DBAttachment.releaseTimeout()
|
||||
end
|
||||
|
||||
-- 删掉超时的文件
|
||||
local files = FileEx.GetFiles(downloadDir)
|
||||
local count = files.Length
|
||||
for i = 0, count - 1 do
|
||||
---@type System.IO.FileInfo
|
||||
local fi = FileInfo(files[i])
|
||||
if fi then
|
||||
local diff = (DateTime.Now:ToFileTime() - fi.LastAccessTime:ToFileTime()) / 10000
|
||||
if diff > _TimeOutSec then
|
||||
FileEx.Delete(files[i])
|
||||
if Directory.Exists(downloadDir) then
|
||||
local files = FileEx.GetFiles(downloadDir)
|
||||
local count = files.Length
|
||||
for i = 0, count - 1 do
|
||||
---@type System.IO.FileInfo
|
||||
local fi = FileInfo(files[i])
|
||||
if fi then
|
||||
local diff = (DateTime.Now:ToFileTime() - fi.LastAccessTime:ToFileTime()) / 10000
|
||||
if diff > _TimeOutSec then
|
||||
FileEx.Delete(files[i])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -91,6 +91,15 @@ DBCust.onGetFilter = function(data)
|
||||
]]
|
||||
end
|
||||
|
||||
DBCust.getTaskName = function(taskId)
|
||||
local list = DBCust.getFilter(DBCust.FilterGroup.taskList)
|
||||
for i, v in ipairs(list) do
|
||||
if tostring(v.value) == tostring(taskId) then
|
||||
return v.name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
DBCust.getFieldsByTask = function(taskValue)
|
||||
if not taskValue then
|
||||
return {}
|
||||
|
||||
Reference in New Issue
Block a user