Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
谢明辉
/
fanxing3
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 69a2b4d8
authored
Nov 30, 2021
by
xmh
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
<feat> 导出任务批量删除接口
1 parent
f3a5e598
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
2 deletions
fanxing-forward/src/main/java/com/viontech/fanxing/forward/runner/PicKeepRunner.java
fanxing-query/src/main/java/com/viontech/fanxing/query/controller/web/ExportDataController.java
fanxing-query/src/main/java/com/viontech/fanxing/query/service/impl/ExportDataServiceImpl.java
fanxing-forward/src/main/java/com/viontech/fanxing/forward/runner/PicKeepRunner.java
View file @
69a2b4d
...
...
@@ -38,7 +38,7 @@ public class PicKeepRunner {
private
VionConfig
vionConfig
;
@Scheduled
(
cron
=
"
0 1 8
* * ?"
)
@Scheduled
(
cron
=
"
13 05 01
* * ?"
)
public
void
run
()
{
JsonMessageUtil
.
JsonMessage
<
ImageKeepConfig
>
imageKeepConfigData
=
opsFeignClient
.
getImageKeepConfig
();
ImageKeepConfig
config
=
imageKeepConfigData
.
getData
();
...
...
fanxing-query/src/main/java/com/viontech/fanxing/query/controller/web/ExportDataController.java
View file @
69a2b4d
...
...
@@ -4,8 +4,12 @@ import com.viontech.fanxing.commons.base.BaseExample;
import
com.viontech.fanxing.commons.model.ExportDataExample
;
import
com.viontech.fanxing.commons.vo.ExportDataVo
;
import
com.viontech.fanxing.query.controller.base.ExportDataBaseController
;
import
com.viontech.keliu.util.JsonMessageUtil
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
@Controller
@RequestMapping
(
"/exportDatas"
)
...
...
@@ -16,4 +20,13 @@ public class ExportDataController extends ExportDataBaseController {
ExportDataExample
exportDataExample
=
(
ExportDataExample
)
super
.
getExample
(
exportDataVo
,
type
);
return
exportDataExample
;
}
@DeleteMapping
(
"/batch"
)
@ResponseBody
public
Object
batchDelete
(
@RequestParam
Long
[]
idArr
)
{
for
(
Long
id
:
idArr
)
{
exportDataService
.
deleteByPrimaryKey
(
id
);
}
return
JsonMessageUtil
.
getSuccessJsonMsg
(
"成功"
);
}
}
\ No newline at end of file
fanxing-query/src/main/java/com/viontech/fanxing/query/service/impl/ExportDataServiceImpl.java
View file @
69a2b4d
...
...
@@ -33,7 +33,9 @@ public class ExportDataServiceImpl extends BaseServiceImpl<ExportData> implement
int
i
=
super
.
deleteByPrimaryKey
(
b
);
File
file
=
new
File
(
vionConfig
.
getImage
().
getPath
()
+
"/export/"
+
b
.
toString
());
try
{
FileUtils
.
deleteDirectory
(
file
);
if
(
file
.
exists
())
{
FileUtils
.
deleteDirectory
(
file
);
}
}
catch
(
Exception
e
)
{
throw
new
FanXingException
(
"无法删除目录:{[]}"
,
file
.
getPath
());
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment