Merge pull request #8979 from dataease/pr@dev_export_data
Pr@dev export data
This commit is contained in:
commit
0a0513a688
@ -27,13 +27,13 @@ import io.dataease.plugins.common.dto.dataset.SqlVariableDetails;
|
||||
import io.dataease.plugins.common.dto.datasource.TableField;
|
||||
import io.dataease.service.authModel.VAuthModelService;
|
||||
import io.dataease.service.dataset.DataSetTableService;
|
||||
import io.dataease.service.exportCenter.ExportCenterService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -53,6 +53,8 @@ public class DataSetTableController {
|
||||
|
||||
@Resource
|
||||
private VAuthModelService vAuthModelService;
|
||||
@Resource
|
||||
private ExportCenterService exportCenterService;
|
||||
|
||||
@DePermissions(value = {
|
||||
@DePermission(type = DePermissionType.DATASET, value = "id"),
|
||||
@ -269,7 +271,7 @@ public class DataSetTableController {
|
||||
@ApiOperation("数据集导出")
|
||||
@PostMapping("/exportDataset")
|
||||
@I18n
|
||||
public void exportDataset(@RequestBody DataSetExportRequest request, HttpServletResponse response) throws Exception {
|
||||
dataSetTableService.exportDataset(request, response);
|
||||
public void exportDataset(@RequestBody DataSetExportRequest request) {
|
||||
exportCenterService.addTask(request.getId(), "dataset", request);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,41 @@
|
||||
package io.dataease.controller.exportCenter;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.dataease.dto.ExportTaskDTO;
|
||||
import io.dataease.service.exportCenter.ExportCenterService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
@ApiSupport(order = 31)
|
||||
@RequestMapping("exportCenter")
|
||||
@RestController
|
||||
public class ExportCenterController {
|
||||
|
||||
@Resource
|
||||
private ExportCenterService exportCenterService;
|
||||
|
||||
|
||||
|
||||
@PostMapping("/exportTasks/{status}")
|
||||
public List<ExportTaskDTO> exportTasks(@PathVariable String status) {
|
||||
return exportCenterService.exportTasks(status);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
public void delete(@PathVariable String id){
|
||||
exportCenterService.delete(id);
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
public void delete(@RequestBody List<String> ids){
|
||||
exportCenterService.delete(ids);
|
||||
}
|
||||
|
||||
@GetMapping("/download/{id}")
|
||||
public void download(@PathVariable String id, HttpServletResponse response) throws Exception {
|
||||
exportCenterService.download(id, response);
|
||||
}
|
||||
}
|
||||
@ -18,6 +18,7 @@ import io.dataease.dto.authModel.VAuthModelDTO;
|
||||
import io.dataease.dto.panel.PanelExport2App;
|
||||
import io.dataease.dto.panel.PanelGroupDTO;
|
||||
import io.dataease.plugins.common.base.domain.PanelGroup;
|
||||
import io.dataease.service.exportCenter.ExportCenterService;
|
||||
import io.dataease.service.panel.PanelGroupService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@ -50,6 +51,8 @@ public class PanelGroupController {
|
||||
private PanelGroupService panelGroupService;
|
||||
@Resource
|
||||
private ExtAuthServiceImpl authService;
|
||||
@Resource
|
||||
private ExportCenterService exportCenterService;
|
||||
|
||||
@ApiOperation("查询树")
|
||||
@PostMapping("/tree")
|
||||
@ -170,7 +173,7 @@ public class PanelGroupController {
|
||||
@DePermissionProxy(value = "proxy")
|
||||
@I18n
|
||||
public void innerExportDetails(@RequestBody PanelViewDetailsRequest request, HttpServletResponse response) throws IOException {
|
||||
panelGroupService.exportPanelViewDetails(request, response);
|
||||
exportCenterService.addTask(request.getViewId(), "chart", request);
|
||||
}
|
||||
|
||||
@ApiOperation("更新仪表板状态")
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
package io.dataease.dto;
|
||||
|
||||
import io.dataease.plugins.common.base.domain.ExportTask;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ExportTaskDTO extends ExportTask {
|
||||
private String exportFromName;
|
||||
}
|
||||
@ -7,6 +7,7 @@ import io.dataease.plugins.common.base.domain.DatasetTableTask;
|
||||
import io.dataease.commons.constants.ScheduleType;
|
||||
import io.dataease.service.ScheduleService;
|
||||
import io.dataease.service.dataset.DataSetTableTaskService;
|
||||
import io.dataease.service.exportCenter.ExportCenterService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.boot.context.event.ApplicationReadyEvent;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
@ -22,6 +23,8 @@ public class AppStartListener implements ApplicationListener<ApplicationReadyEve
|
||||
@Resource
|
||||
private ScheduleService scheduleService;
|
||||
@Resource
|
||||
private ExportCenterService exportCenterService;
|
||||
@Resource
|
||||
private DataSetTableTaskService dataSetTableTaskService;
|
||||
|
||||
@Override
|
||||
@ -51,5 +54,6 @@ public class AppStartListener implements ApplicationListener<ApplicationReadyEve
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
exportCenterService.reInitExportTask();
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,6 +18,7 @@ import io.dataease.i18n.Translator;
|
||||
import io.dataease.listener.util.CacheUtils;
|
||||
import io.dataease.plugins.common.base.domain.DatasetGroup;
|
||||
import io.dataease.plugins.common.base.domain.DatasetGroupExample;
|
||||
import io.dataease.plugins.common.base.domain.DatasetTable;
|
||||
import io.dataease.plugins.common.base.mapper.DatasetGroupMapper;
|
||||
import io.dataease.service.sys.SysAuthService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
@ -158,6 +159,24 @@ public class DataSetGroupService {
|
||||
}
|
||||
}
|
||||
|
||||
public String getAbsPath(String id){
|
||||
DatasetTable datasetTable = dataSetTableService.get(id);
|
||||
if(datasetTable == null){
|
||||
return null;
|
||||
}
|
||||
if(datasetTable.getSceneId() == null){
|
||||
return datasetTable.getName();
|
||||
}
|
||||
List<DatasetGroup> parents = getParents(datasetTable.getSceneId());
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
parents.forEach(ele -> {
|
||||
if (ObjectUtils.isNotEmpty(ele)) {
|
||||
stringBuilder.append(ele.getName()).append("/");
|
||||
}
|
||||
});
|
||||
stringBuilder.append(datasetTable.getName());
|
||||
return stringBuilder.toString();
|
||||
}
|
||||
public List<DatasetGroup> getParents(String id) {
|
||||
List<DatasetGroup> list = new ArrayList<>();
|
||||
DatasetGroup datasetGroup = datasetGroupMapper.selectByPrimaryKey(id);
|
||||
|
||||
@ -512,7 +512,7 @@ public class DatasourceService {
|
||||
|
||||
public void updateDatasourceStatus() {
|
||||
List<Datasource> datasources = datasourceMapper.selectByExampleWithBLOBs(new DatasourceExample());
|
||||
datasources.forEach(datasource -> checkAndUpdateDatasourceStatus(datasource, true));
|
||||
datasources.parallelStream().forEach(datasource -> checkAndUpdateDatasourceStatus(datasource, true));
|
||||
}
|
||||
|
||||
public ApiDefinition checkApiDatasource(ApiDefinition apiDefinition) throws Exception {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1225,4 +1225,43 @@ public class PanelGroupService {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public String getAbsPath(String id) {
|
||||
ChartViewWithBLOBs chartViewWithBLOBs = chartViewMapper.selectByPrimaryKey(id);
|
||||
if (chartViewWithBLOBs == null) {
|
||||
return null;
|
||||
}
|
||||
if (chartViewWithBLOBs.getSceneId() == null) {
|
||||
return chartViewWithBLOBs.getName();
|
||||
}
|
||||
List<PanelGroupWithBLOBs> parents = getParents(chartViewWithBLOBs.getSceneId());
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
parents.forEach(ele -> {
|
||||
if (ObjectUtils.isNotEmpty(ele)) {
|
||||
stringBuilder.append(ele.getName()).append("/");
|
||||
}
|
||||
});
|
||||
stringBuilder.append(chartViewWithBLOBs.getName());
|
||||
return stringBuilder.toString();
|
||||
}
|
||||
|
||||
public List<PanelGroupWithBLOBs> getParents(String id) {
|
||||
List<PanelGroupWithBLOBs> list = new ArrayList<>();
|
||||
PanelGroupWithBLOBs panelGroupWithBLOBs = panelGroupMapper.selectByPrimaryKey(id);
|
||||
list.add(panelGroupWithBLOBs);
|
||||
getParent(list, panelGroupWithBLOBs);
|
||||
Collections.reverse(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
public void getParent(List<PanelGroupWithBLOBs> list, PanelGroupWithBLOBs panelGroupWithBLOBs) {
|
||||
if (ObjectUtils.isNotEmpty(panelGroupWithBLOBs)) {
|
||||
if (StringUtils.isNotEmpty(panelGroupWithBLOBs.getPid()) && !panelGroupWithBLOBs.getPid().equalsIgnoreCase("panel_list")) {
|
||||
PanelGroupWithBLOBs d = panelGroupMapper.selectByPrimaryKey(panelGroupWithBLOBs.getPid());
|
||||
list.add(d);
|
||||
getParent(list, d);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,15 @@
|
||||
DROP TABLE IF EXISTS `export_task`;
|
||||
CREATE TABLE `export_task` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`user_id` bigint(20) NOT NULL ,
|
||||
`file_name` varchar(2048) DEFAULT NULL,
|
||||
`file_size` DOUBLE DEFAULT NULL,
|
||||
`export_from` varchar(255) DEFAULT NULL,
|
||||
`export_status` varchar(255) DEFAULT NULL,
|
||||
`export_from_type` varchar(255) DEFAULT NULL,
|
||||
`export_time` bigint(20) DEFAULT NULL,
|
||||
`export_pogress` varchar(255) DEFAULT NULL,
|
||||
`export_machine_name` varchar(512) DEFAULT NULL,
|
||||
`params` longtext NOT NULL COMMENT '过滤参数',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci;
|
||||
@ -290,6 +290,15 @@ export function exportDataset(data) {
|
||||
method: 'post',
|
||||
data: data,
|
||||
loading: true,
|
||||
})
|
||||
}
|
||||
|
||||
export function downloadFile(id) {
|
||||
// 初始化仪表板视图缓存
|
||||
return request({
|
||||
url: 'exportCenter/download/' + id,
|
||||
method: 'get',
|
||||
loading: true,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
BIN
core/frontend/src/assets/none-data.png
Normal file
BIN
core/frontend/src/assets/none-data.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
@ -532,14 +532,6 @@ export function exportExcelDownload(chart, snapshot, width, height, loadingWrapp
|
||||
request.proxy = { userId: panelInfo.proxy }
|
||||
}
|
||||
method(request).then((res) => {
|
||||
const blob = new Blob([res], { type: 'application/vnd.ms-excel' })
|
||||
const link = document.createElement('a')
|
||||
link.style.display = 'none'
|
||||
link.href = URL.createObjectURL(blob)
|
||||
link.download = excelName + '.xlsx' // 下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
loadingWrapper && (loadingWrapper.val = false)
|
||||
callBack && callBack()
|
||||
}).catch(() => {
|
||||
|
||||
5
core/frontend/src/icons/svg/icon_file-excel_colorful.svg
Normal file
5
core/frontend/src/icons/svg/icon_file-excel_colorful.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4 2.5C4 1.94772 4.44772 1.5 5 1.5H14.7929C14.9255 1.5 15.0527 1.55268 15.1464 1.64645L19.8536 6.35355C19.9473 6.44732 20 6.5745 20 6.70711V21.5C20 22.0523 19.5523 22.5 19 22.5H5C4.44772 22.5 4 22.0523 4 21.5V2.5Z" fill="#34C724"/>
|
||||
<path d="M15 1.54492C15.054 1.56949 15.1037 1.6037 15.1464 1.64646L19.8536 6.35357C19.8963 6.39632 19.9305 6.44602 19.9551 6.50001H16C15.4477 6.50001 15 6.0523 15 5.50001V1.54492Z" fill="#2CA91F"/>
|
||||
<path d="M11.308 13.5956L8.33203 17.9996H9.60403L11.98 14.4596L14.284 17.9996H15.676L12.664 13.5956L15.496 9.43164H14.224L11.992 12.7796L9.85603 9.43164H8.48803L11.308 13.5956Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 735 B |
@ -45,6 +45,12 @@
|
||||
class="right-menu"
|
||||
style="color: var(--TopTextColor)"
|
||||
>
|
||||
<div class="download-export">
|
||||
<svg-icon
|
||||
@click="downloadClick"
|
||||
icon-class="icon_download_outlined"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
v-if="aiBaseUrl"
|
||||
style="height: 100%;padding: 0 8px;"
|
||||
@ -117,6 +123,9 @@
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
|
||||
<ExportExcel ref="ExportExcelRef"></ExportExcel>
|
||||
|
||||
<ai-component v-if="aiBaseUrl" :base-url="aiBaseUrl"/>
|
||||
|
||||
<!--模板市场全屏显示框-->
|
||||
@ -139,6 +148,7 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import ExportExcel from '@/views/dataset/exportExcel/index.vue'
|
||||
import AppLink from './Sidebar/Link'
|
||||
import variables from '@/styles/variables.scss'
|
||||
import { isExternal } from '@/utils/validate'
|
||||
@ -159,8 +169,8 @@ export default {
|
||||
TemplateMarket,
|
||||
AppLink,
|
||||
Notification,
|
||||
LangSelect
|
||||
|
||||
LangSelect,
|
||||
ExportExcel
|
||||
},
|
||||
props: {
|
||||
showTips: {
|
||||
@ -307,13 +317,15 @@ export default {
|
||||
beforeunloadHandler() {
|
||||
this.beforeUnload_time = new Date().getTime()
|
||||
},
|
||||
downloadClick() {
|
||||
this.$refs.ExportExcelRef.init()
|
||||
},
|
||||
unloadHandler(e) {
|
||||
this.gap_time = new Date().getTime() - this.beforeUnload_time
|
||||
if (this.gap_time <= 5) {
|
||||
// this.logout().then(res => {})
|
||||
}
|
||||
},
|
||||
|
||||
// 通过当前路径找到二级菜单对应项,存到store,用来渲染左侧菜单
|
||||
initCurrentRoutes() {
|
||||
const {
|
||||
@ -460,6 +472,20 @@ export default {
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.download-export {
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
padding: 4px;
|
||||
color: #646A73;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
|
||||
&:hover {
|
||||
background: #1F23291A;
|
||||
}
|
||||
}
|
||||
.el-dropdown-link {
|
||||
cursor: pointer;
|
||||
color: #1e212a;
|
||||
|
||||
@ -915,6 +915,59 @@ div:focus {
|
||||
}
|
||||
}
|
||||
|
||||
.de-message-export {
|
||||
min-width: 20px !important;
|
||||
padding: 16px 20px !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-shadow: 0px 4px 8px 0px #1f23291a;
|
||||
|
||||
& > p {
|
||||
font-family: AlibabaPuHuiTi;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
line-height: 22px;
|
||||
letter-spacing: 0px;
|
||||
text-align: left;
|
||||
color: #1f2329;
|
||||
}
|
||||
|
||||
.btn-text {
|
||||
padding: 2px 4px;
|
||||
&:hover {
|
||||
background: var(--primary10, #3370FF1A);
|
||||
}
|
||||
}
|
||||
|
||||
.el-message__closeBtn {
|
||||
margin-left: 28px;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
position: relative;
|
||||
margin-right: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
transform: translateY(0);
|
||||
color: #646A73;
|
||||
}
|
||||
|
||||
.el-icon-success,
|
||||
.el-icon-error,
|
||||
.el-icon-loading {
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.de-message-loading {
|
||||
border: 1px solid var(--primary, #3370FF) !important;
|
||||
background: #F0F4FF !important;
|
||||
.el-icon-loading {
|
||||
color: var(--primary, #3370FF);
|
||||
}
|
||||
}
|
||||
|
||||
.de-message-error {
|
||||
border: 1px solid var(--deDanger, #f54a45) !important;
|
||||
background: var(--deWhitemsgDeDanger, #fef1f1) !important;
|
||||
|
||||
@ -259,6 +259,7 @@ import { pluginLoaded } from '@/api/user'
|
||||
import PluginCom from '@/views/system/plugin/PluginCom'
|
||||
import UpdateRecords from './UpdateRecords'
|
||||
import rowAuth from './components/rowAuth.vue'
|
||||
import {Button} from "element-ui";
|
||||
|
||||
export default {
|
||||
name: 'ViewTable',
|
||||
@ -489,6 +490,35 @@ export default {
|
||||
closeExport() {
|
||||
this.showExport = false
|
||||
},
|
||||
openMessageSuccess(text, type, cb) {
|
||||
const h = this.$createElement;
|
||||
const iconClass = `el-icon-${type || "success"}`;
|
||||
const customClass = `de-message-${type || "success"} de-message-export`;
|
||||
this.$message({
|
||||
message: h("p", null, [
|
||||
h("span", null, text),
|
||||
h(
|
||||
Button,
|
||||
{
|
||||
props: {
|
||||
type: "text",
|
||||
size: "mini",
|
||||
},
|
||||
class: "btn-text",
|
||||
on: {
|
||||
click: () => {
|
||||
cb();
|
||||
},
|
||||
},
|
||||
},
|
||||
"数据导出中心",
|
||||
),
|
||||
]),
|
||||
iconClass,
|
||||
showClose: true,
|
||||
customClass,
|
||||
});
|
||||
},
|
||||
exportDatasetRequest() {
|
||||
this.$refs['exportForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
@ -507,16 +537,10 @@ export default {
|
||||
this.table.expressionTree = JSON.stringify({ items, logic })
|
||||
this.exportDatasetLoading = true
|
||||
exportDataset(this.table).then((res) => {
|
||||
const blob = new Blob([res], { type: 'application/vnd.ms-excel' })
|
||||
const link = document.createElement('a')
|
||||
link.style.display = 'none'
|
||||
link.href = URL.createObjectURL(blob)
|
||||
link.download = this.exportForm.name + '.xlsx' // 下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
this.openMessageSuccess('后台导出中,查看进度可前往', 'info')
|
||||
}).finally(() => {
|
||||
this.exportDatasetLoading = false
|
||||
this.showExport = false
|
||||
})
|
||||
}
|
||||
} else {
|
||||
|
||||
253
core/frontend/src/views/dataset/exportExcel/index.vue
Normal file
253
core/frontend/src/views/dataset/exportExcel/index.vue
Normal file
@ -0,0 +1,253 @@
|
||||
<template>
|
||||
<el-drawer
|
||||
custom-class="de-user-drawer de-export-excel"
|
||||
title="数据导出中心"
|
||||
:visible.sync="drawer"
|
||||
direction="rtl"
|
||||
size="1000px"
|
||||
append-to-body
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane
|
||||
v-for="tab in tabList"
|
||||
:key="tab.name"
|
||||
:label="tab.label"
|
||||
:name="tab.name"
|
||||
></el-tab-pane>
|
||||
</el-tabs>
|
||||
<de-btn secondary icon="el-icon-delete" @click="delAll"
|
||||
>{{ $t("全部删除") }}
|
||||
</de-btn>
|
||||
<div class="table-container" :class="!tableData.length && 'hidden-bottom'">
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="tableData"
|
||||
@selection-change="handleSelectionChange"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="selection" width="50"> </el-table-column>
|
||||
<el-table-column prop="fileName" label="文件名" width="320">
|
||||
<template slot-scope="scope">
|
||||
<div class="name-excel">
|
||||
<svg-icon style="font-size: 24px;" icon-class="icon_file-excel_colorful"> </svg-icon>
|
||||
<span style="margin-left: 8px">{{ scope.row.fileName }}</span>
|
||||
</div>
|
||||
<el-progress v-show="activeName==='IN_PROGRESS'" :percentage="scope.row.exportPogress"></el-progress>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column prop="exportFromName" label="导出对象" width="200">
|
||||
</el-table-column>
|
||||
<el-table-column prop="exportFromType" width="120" label="导出来源">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.exportFromType === 'dataset'">数据集</span>
|
||||
<span v-if="scope.row.exportFromType === 'chart'">视图</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="exportTime" width="180" label="导出时间">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.exportTime | timestampFormatDate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="operate" width="80" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.exportStatus === 'SUCCESS'" type="text" size="mini" @click="downloadClick(scope.row)">
|
||||
<div class="download-export">
|
||||
<svg-icon
|
||||
icon-class="icon_download_outlined"
|
||||
/>
|
||||
</div>
|
||||
</el-button>
|
||||
<el-button type="text" size="mini" @click="deleteField(scope.row)"
|
||||
>{{ $t("dataset.delete") }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-empty
|
||||
slot="empty"
|
||||
v-if="!tableData.length"
|
||||
style="padding-top: 80px"
|
||||
:image-size="125"
|
||||
:image="errImg"
|
||||
:description="description"
|
||||
/>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import msgCfm from "@/components/msgCfm/index";
|
||||
import { Button } from "element-ui";
|
||||
import request from "@/utils/request";
|
||||
import {downloadFile, post} from '@/api/dataset/dataset'
|
||||
export default {
|
||||
mixins: [msgCfm],
|
||||
data() {
|
||||
return {
|
||||
activeName: "IN_PROGRESS",
|
||||
multipleSelection: [],
|
||||
errImg: require("@/assets/none-data.png"),
|
||||
tableData: [{ name: "附件名称" }],
|
||||
drawer: false,
|
||||
description: this.$t("暂无任务"),
|
||||
tabList: [
|
||||
{
|
||||
label: "导出中(0)",
|
||||
name: "IN_PROGRESS",
|
||||
},
|
||||
{
|
||||
label: "成功(0)",
|
||||
name: "SUCCESS",
|
||||
},
|
||||
{
|
||||
label: "失败(0)",
|
||||
name: "FAILED",
|
||||
},
|
||||
{
|
||||
label: "等待中(0)",
|
||||
name: "PENDING",
|
||||
},
|
||||
{
|
||||
label: "全部(0)",
|
||||
name: "ALL",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.handleClick()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.drawer = true;
|
||||
this.handleClick()
|
||||
this.timer = setInterval(() => {
|
||||
if(this.activeName === 'IN_PROGRESS'){
|
||||
this.handleClick()
|
||||
}
|
||||
}, 5000);
|
||||
},
|
||||
handleClick() {
|
||||
request({
|
||||
url: '/exportCenter/exportTasks/' + this.activeName,
|
||||
method: 'post'
|
||||
}).then(
|
||||
(res) => {
|
||||
this.tabList.forEach( item => {
|
||||
if(item.name === 'ALL'){
|
||||
item.label = '全部' + '(' + res.data.length + ')'
|
||||
}
|
||||
if(item.name === 'IN_PROGRESS'){
|
||||
item.label = '导出中' + '(' + res.data.filter(task => task.exportStatus === 'IN_PROGRESS').length + ')'
|
||||
}
|
||||
if(item.name === 'SUCCESS'){
|
||||
item.label = '成功' + '(' + res.data.filter(task => task.exportStatus === 'SUCCESS').length + ')'
|
||||
}
|
||||
if(item.name === 'FAILED'){
|
||||
item.label = '失败' + '(' + res.data.filter(task => task.exportStatus === 'FAILED').length + ')'
|
||||
}
|
||||
if(item.name === 'PENDING'){
|
||||
item.label = '等待中' + '(' + res.data.filter(task => task.exportStatus === 'PENDING').length + ')'
|
||||
}
|
||||
})
|
||||
if(this.activeName === 'ALL'){
|
||||
this.tableData = res.data
|
||||
}else {
|
||||
this.tableData = res.data.filter(task => task.exportStatus === this.activeName)
|
||||
}
|
||||
}
|
||||
)
|
||||
},
|
||||
downloadClick(item) {
|
||||
downloadFile(item.id).then((res) => {
|
||||
const blob = new Blob([res], { type: 'application/vnd.ms-excel' })
|
||||
const link = document.createElement('a')
|
||||
link.style.display = 'none'
|
||||
link.href = URL.createObjectURL(blob)
|
||||
link.download = item.fileName // 下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
}).finally(() => {
|
||||
this.exportDatasetLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
deleteField(item) {
|
||||
request({
|
||||
url: '/exportCenter/delete/' + item.id,
|
||||
method: 'get'
|
||||
}).then(
|
||||
(res) => {
|
||||
this.handleClick()
|
||||
}
|
||||
)
|
||||
this.openMessageSuccess("commons.delete_success");
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
confirmDelete() {
|
||||
const options = {
|
||||
title: "确定删除该任务吗?",
|
||||
type: "primary",
|
||||
cb: this.deleteField,
|
||||
};
|
||||
this.handlerConfirm(options);
|
||||
},
|
||||
delAll() {
|
||||
post(
|
||||
'/exportCenter/delete',
|
||||
this.multipleSelection.map((ele) => ele.id),
|
||||
false
|
||||
).then(
|
||||
(res) => {
|
||||
this.handleClick()
|
||||
}
|
||||
)
|
||||
this.openMessageSuccess("commons.delete_success");
|
||||
},
|
||||
|
||||
handleClose() {
|
||||
this.drawer = false;
|
||||
clearInterval(this.timer);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less">
|
||||
.de-export-excel {
|
||||
.el-drawer__header {
|
||||
border-bottom: none;
|
||||
}
|
||||
.el-tabs {
|
||||
margin-top: -25px;
|
||||
.el-tabs__header {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.table-container {
|
||||
margin-top: 16px;
|
||||
&.hidden-bottom {
|
||||
.el-table::before {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.name-excel {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.el-table__header {
|
||||
border-top: 1px solid #1f232926;
|
||||
}
|
||||
|
||||
th.el-table__cell.is-leaf {
|
||||
border-color: #1f232926;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -15,6 +15,7 @@ services:
|
||||
- ${DE_BASE}/dataease/data/static-resource:/opt/dataease/data/static-resource
|
||||
- ${DE_BASE}/dataease/custom-drivers:/opt/dataease/custom-drivers
|
||||
- ${DE_BASE}/dataease/data/custom:/opt/dataease/data/custom
|
||||
- ${DE_BASE}/dataease/data/exportData:/opt/dataease/data/exportData
|
||||
- ${DE_BASE}/dataease/data/business:/opt/dataease/data/business
|
||||
- ${DE_BASE}/dataease/data/ehcache:/opt/dataease/data/ehcache
|
||||
shm_size: 1gb
|
||||
|
||||
@ -162,8 +162,10 @@ mkdir -p ${DE_RUN_BASE}/data/kettle
|
||||
mkdir -p ${DE_RUN_BASE}/data/fe
|
||||
mkdir -p ${DE_RUN_BASE}/data/be
|
||||
mkdir -p ${DE_RUN_BASE}/data/mysql
|
||||
mkdir -p ${DE_RUN_BASE}/data/exportData
|
||||
mkdir -p ${DE_RUN_BASE}/data/static-resource
|
||||
mkdir -p ${DE_RUN_BASE}/custom-drivers
|
||||
mkdir -p ${DE_RUN_BASE}/custom-drivers
|
||||
mkdir -p ${DE_RUN_BASE}/data/business
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
package io.dataease.plugins.common.base.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ExportTask implements Serializable {
|
||||
private String id;
|
||||
|
||||
private Long userId;
|
||||
|
||||
private String fileName;
|
||||
|
||||
private Double fileSize;
|
||||
|
||||
private String exportFrom;
|
||||
|
||||
private String exportStatus;
|
||||
|
||||
private String exportFromType;
|
||||
|
||||
private Long exportTime;
|
||||
|
||||
private String exportPogress;
|
||||
|
||||
private String exportMachineName;
|
||||
|
||||
private String params;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@ -0,0 +1,870 @@
|
||||
package io.dataease.plugins.common.base.domain;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ExportTaskExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public ExportTaskExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(String value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(String value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(String value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(String value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLike(String value) {
|
||||
addCriterion("id like", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotLike(String value) {
|
||||
addCriterion("id not like", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<String> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<String> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(String value1, String value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(String value1, String value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdIsNull() {
|
||||
addCriterion("user_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdIsNotNull() {
|
||||
addCriterion("user_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdEqualTo(Long value) {
|
||||
addCriterion("user_id =", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdNotEqualTo(Long value) {
|
||||
addCriterion("user_id <>", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdGreaterThan(Long value) {
|
||||
addCriterion("user_id >", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("user_id >=", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdLessThan(Long value) {
|
||||
addCriterion("user_id <", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("user_id <=", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdIn(List<Long> values) {
|
||||
addCriterion("user_id in", values, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdNotIn(List<Long> values) {
|
||||
addCriterion("user_id not in", values, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdBetween(Long value1, Long value2) {
|
||||
addCriterion("user_id between", value1, value2, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("user_id not between", value1, value2, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameIsNull() {
|
||||
addCriterion("file_name is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameIsNotNull() {
|
||||
addCriterion("file_name is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameEqualTo(String value) {
|
||||
addCriterion("file_name =", value, "fileName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameNotEqualTo(String value) {
|
||||
addCriterion("file_name <>", value, "fileName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameGreaterThan(String value) {
|
||||
addCriterion("file_name >", value, "fileName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("file_name >=", value, "fileName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameLessThan(String value) {
|
||||
addCriterion("file_name <", value, "fileName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameLessThanOrEqualTo(String value) {
|
||||
addCriterion("file_name <=", value, "fileName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameLike(String value) {
|
||||
addCriterion("file_name like", value, "fileName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameNotLike(String value) {
|
||||
addCriterion("file_name not like", value, "fileName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameIn(List<String> values) {
|
||||
addCriterion("file_name in", values, "fileName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameNotIn(List<String> values) {
|
||||
addCriterion("file_name not in", values, "fileName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameBetween(String value1, String value2) {
|
||||
addCriterion("file_name between", value1, value2, "fileName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileNameNotBetween(String value1, String value2) {
|
||||
addCriterion("file_name not between", value1, value2, "fileName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileSizeIsNull() {
|
||||
addCriterion("file_size is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileSizeIsNotNull() {
|
||||
addCriterion("file_size is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileSizeEqualTo(Double value) {
|
||||
addCriterion("file_size =", value, "fileSize");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileSizeNotEqualTo(Double value) {
|
||||
addCriterion("file_size <>", value, "fileSize");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileSizeGreaterThan(Double value) {
|
||||
addCriterion("file_size >", value, "fileSize");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileSizeGreaterThanOrEqualTo(Double value) {
|
||||
addCriterion("file_size >=", value, "fileSize");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileSizeLessThan(Double value) {
|
||||
addCriterion("file_size <", value, "fileSize");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileSizeLessThanOrEqualTo(Double value) {
|
||||
addCriterion("file_size <=", value, "fileSize");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileSizeIn(List<Double> values) {
|
||||
addCriterion("file_size in", values, "fileSize");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileSizeNotIn(List<Double> values) {
|
||||
addCriterion("file_size not in", values, "fileSize");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileSizeBetween(Double value1, Double value2) {
|
||||
addCriterion("file_size between", value1, value2, "fileSize");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andFileSizeNotBetween(Double value1, Double value2) {
|
||||
addCriterion("file_size not between", value1, value2, "fileSize");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromIsNull() {
|
||||
addCriterion("export_from is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromIsNotNull() {
|
||||
addCriterion("export_from is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromEqualTo(String value) {
|
||||
addCriterion("export_from =", value, "exportFrom");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromNotEqualTo(String value) {
|
||||
addCriterion("export_from <>", value, "exportFrom");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromGreaterThan(String value) {
|
||||
addCriterion("export_from >", value, "exportFrom");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("export_from >=", value, "exportFrom");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromLessThan(String value) {
|
||||
addCriterion("export_from <", value, "exportFrom");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromLessThanOrEqualTo(String value) {
|
||||
addCriterion("export_from <=", value, "exportFrom");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromLike(String value) {
|
||||
addCriterion("export_from like", value, "exportFrom");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromNotLike(String value) {
|
||||
addCriterion("export_from not like", value, "exportFrom");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromIn(List<String> values) {
|
||||
addCriterion("export_from in", values, "exportFrom");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromNotIn(List<String> values) {
|
||||
addCriterion("export_from not in", values, "exportFrom");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromBetween(String value1, String value2) {
|
||||
addCriterion("export_from between", value1, value2, "exportFrom");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromNotBetween(String value1, String value2) {
|
||||
addCriterion("export_from not between", value1, value2, "exportFrom");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportStatusIsNull() {
|
||||
addCriterion("export_status is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportStatusIsNotNull() {
|
||||
addCriterion("export_status is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportStatusEqualTo(String value) {
|
||||
addCriterion("export_status =", value, "exportStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportStatusNotEqualTo(String value) {
|
||||
addCriterion("export_status <>", value, "exportStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportStatusGreaterThan(String value) {
|
||||
addCriterion("export_status >", value, "exportStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportStatusGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("export_status >=", value, "exportStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportStatusLessThan(String value) {
|
||||
addCriterion("export_status <", value, "exportStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportStatusLessThanOrEqualTo(String value) {
|
||||
addCriterion("export_status <=", value, "exportStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportStatusLike(String value) {
|
||||
addCriterion("export_status like", value, "exportStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportStatusNotLike(String value) {
|
||||
addCriterion("export_status not like", value, "exportStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportStatusIn(List<String> values) {
|
||||
addCriterion("export_status in", values, "exportStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportStatusNotIn(List<String> values) {
|
||||
addCriterion("export_status not in", values, "exportStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportStatusBetween(String value1, String value2) {
|
||||
addCriterion("export_status between", value1, value2, "exportStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportStatusNotBetween(String value1, String value2) {
|
||||
addCriterion("export_status not between", value1, value2, "exportStatus");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromTypeIsNull() {
|
||||
addCriterion("export_from_type is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromTypeIsNotNull() {
|
||||
addCriterion("export_from_type is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromTypeEqualTo(String value) {
|
||||
addCriterion("export_from_type =", value, "exportFromType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromTypeNotEqualTo(String value) {
|
||||
addCriterion("export_from_type <>", value, "exportFromType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromTypeGreaterThan(String value) {
|
||||
addCriterion("export_from_type >", value, "exportFromType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromTypeGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("export_from_type >=", value, "exportFromType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromTypeLessThan(String value) {
|
||||
addCriterion("export_from_type <", value, "exportFromType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromTypeLessThanOrEqualTo(String value) {
|
||||
addCriterion("export_from_type <=", value, "exportFromType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromTypeLike(String value) {
|
||||
addCriterion("export_from_type like", value, "exportFromType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromTypeNotLike(String value) {
|
||||
addCriterion("export_from_type not like", value, "exportFromType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromTypeIn(List<String> values) {
|
||||
addCriterion("export_from_type in", values, "exportFromType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromTypeNotIn(List<String> values) {
|
||||
addCriterion("export_from_type not in", values, "exportFromType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromTypeBetween(String value1, String value2) {
|
||||
addCriterion("export_from_type between", value1, value2, "exportFromType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportFromTypeNotBetween(String value1, String value2) {
|
||||
addCriterion("export_from_type not between", value1, value2, "exportFromType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportTimeIsNull() {
|
||||
addCriterion("export_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportTimeIsNotNull() {
|
||||
addCriterion("export_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportTimeEqualTo(Long value) {
|
||||
addCriterion("export_time =", value, "exportTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportTimeNotEqualTo(Long value) {
|
||||
addCriterion("export_time <>", value, "exportTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportTimeGreaterThan(Long value) {
|
||||
addCriterion("export_time >", value, "exportTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportTimeGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("export_time >=", value, "exportTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportTimeLessThan(Long value) {
|
||||
addCriterion("export_time <", value, "exportTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportTimeLessThanOrEqualTo(Long value) {
|
||||
addCriterion("export_time <=", value, "exportTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportTimeIn(List<Long> values) {
|
||||
addCriterion("export_time in", values, "exportTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportTimeNotIn(List<Long> values) {
|
||||
addCriterion("export_time not in", values, "exportTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportTimeBetween(Long value1, Long value2) {
|
||||
addCriterion("export_time between", value1, value2, "exportTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportTimeNotBetween(Long value1, Long value2) {
|
||||
addCriterion("export_time not between", value1, value2, "exportTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportPogressIsNull() {
|
||||
addCriterion("export_pogress is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportPogressIsNotNull() {
|
||||
addCriterion("export_pogress is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportPogressEqualTo(String value) {
|
||||
addCriterion("export_pogress =", value, "exportPogress");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportPogressNotEqualTo(String value) {
|
||||
addCriterion("export_pogress <>", value, "exportPogress");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportPogressGreaterThan(String value) {
|
||||
addCriterion("export_pogress >", value, "exportPogress");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportPogressGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("export_pogress >=", value, "exportPogress");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportPogressLessThan(String value) {
|
||||
addCriterion("export_pogress <", value, "exportPogress");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportPogressLessThanOrEqualTo(String value) {
|
||||
addCriterion("export_pogress <=", value, "exportPogress");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportPogressLike(String value) {
|
||||
addCriterion("export_pogress like", value, "exportPogress");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportPogressNotLike(String value) {
|
||||
addCriterion("export_pogress not like", value, "exportPogress");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportPogressIn(List<String> values) {
|
||||
addCriterion("export_pogress in", values, "exportPogress");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportPogressNotIn(List<String> values) {
|
||||
addCriterion("export_pogress not in", values, "exportPogress");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportPogressBetween(String value1, String value2) {
|
||||
addCriterion("export_pogress between", value1, value2, "exportPogress");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportPogressNotBetween(String value1, String value2) {
|
||||
addCriterion("export_pogress not between", value1, value2, "exportPogress");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportMachineNameIsNull() {
|
||||
addCriterion("export_machine_name is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportMachineNameIsNotNull() {
|
||||
addCriterion("export_machine_name is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportMachineNameEqualTo(String value) {
|
||||
addCriterion("export_machine_name =", value, "exportMachineName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportMachineNameNotEqualTo(String value) {
|
||||
addCriterion("export_machine_name <>", value, "exportMachineName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportMachineNameGreaterThan(String value) {
|
||||
addCriterion("export_machine_name >", value, "exportMachineName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportMachineNameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("export_machine_name >=", value, "exportMachineName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportMachineNameLessThan(String value) {
|
||||
addCriterion("export_machine_name <", value, "exportMachineName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportMachineNameLessThanOrEqualTo(String value) {
|
||||
addCriterion("export_machine_name <=", value, "exportMachineName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportMachineNameLike(String value) {
|
||||
addCriterion("export_machine_name like", value, "exportMachineName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportMachineNameNotLike(String value) {
|
||||
addCriterion("export_machine_name not like", value, "exportMachineName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportMachineNameIn(List<String> values) {
|
||||
addCriterion("export_machine_name in", values, "exportMachineName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportMachineNameNotIn(List<String> values) {
|
||||
addCriterion("export_machine_name not in", values, "exportMachineName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportMachineNameBetween(String value1, String value2) {
|
||||
addCriterion("export_machine_name between", value1, value2, "exportMachineName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExportMachineNameNotBetween(String value1, String value2) {
|
||||
addCriterion("export_machine_name not between", value1, value2, "exportMachineName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
package io.dataease.plugins.common.base.mapper;
|
||||
|
||||
import io.dataease.plugins.common.base.domain.ExportTask;
|
||||
import io.dataease.plugins.common.base.domain.ExportTaskExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface ExportTaskMapper {
|
||||
long countByExample(ExportTaskExample example);
|
||||
|
||||
int deleteByExample(ExportTaskExample example);
|
||||
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
int insert(ExportTask record);
|
||||
|
||||
int insertSelective(ExportTask record);
|
||||
|
||||
List<ExportTask> selectByExampleWithBLOBs(ExportTaskExample example);
|
||||
|
||||
List<ExportTask> selectByExample(ExportTaskExample example);
|
||||
|
||||
ExportTask selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") ExportTask record, @Param("example") ExportTaskExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") ExportTask record, @Param("example") ExportTaskExample example);
|
||||
|
||||
int updateByExample(@Param("record") ExportTask record, @Param("example") ExportTaskExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(ExportTask record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(ExportTask record);
|
||||
|
||||
int updateByPrimaryKey(ExportTask record);
|
||||
}
|
||||
@ -0,0 +1,358 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="io.dataease.plugins.common.base.mapper.ExportTaskMapper">
|
||||
<resultMap id="BaseResultMap" type="io.dataease.plugins.common.base.domain.ExportTask">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||
<result column="file_name" jdbcType="VARCHAR" property="fileName" />
|
||||
<result column="file_size" jdbcType="DOUBLE" property="fileSize" />
|
||||
<result column="export_from" jdbcType="VARCHAR" property="exportFrom" />
|
||||
<result column="export_status" jdbcType="VARCHAR" property="exportStatus" />
|
||||
<result column="export_from_type" jdbcType="VARCHAR" property="exportFromType" />
|
||||
<result column="export_time" jdbcType="BIGINT" property="exportTime" />
|
||||
<result column="export_pogress" jdbcType="VARCHAR" property="exportPogress" />
|
||||
<result column="export_machine_name" jdbcType="VARCHAR" property="exportMachineName" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.dataease.plugins.common.base.domain.ExportTask">
|
||||
<result column="params" jdbcType="LONGVARCHAR" property="params" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, user_id, file_name, file_size, export_from, export_status, export_from_type,
|
||||
export_time, export_pogress, export_machine_name
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
params
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.dataease.plugins.common.base.domain.ExportTaskExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from export_task
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="io.dataease.plugins.common.base.domain.ExportTaskExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from export_task
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from export_task
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from export_task
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.dataease.plugins.common.base.domain.ExportTaskExample">
|
||||
delete from export_task
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.dataease.plugins.common.base.domain.ExportTask">
|
||||
insert into export_task (id, user_id, file_name,
|
||||
file_size, export_from, export_status,
|
||||
export_from_type, export_time, export_pogress,
|
||||
export_machine_name, params)
|
||||
values (#{id,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, #{fileName,jdbcType=VARCHAR},
|
||||
#{fileSize,jdbcType=DOUBLE}, #{exportFrom,jdbcType=VARCHAR}, #{exportStatus,jdbcType=VARCHAR},
|
||||
#{exportFromType,jdbcType=VARCHAR}, #{exportTime,jdbcType=BIGINT}, #{exportPogress,jdbcType=VARCHAR},
|
||||
#{exportMachineName,jdbcType=VARCHAR}, #{params,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.dataease.plugins.common.base.domain.ExportTask">
|
||||
insert into export_task
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="fileName != null">
|
||||
file_name,
|
||||
</if>
|
||||
<if test="fileSize != null">
|
||||
file_size,
|
||||
</if>
|
||||
<if test="exportFrom != null">
|
||||
export_from,
|
||||
</if>
|
||||
<if test="exportStatus != null">
|
||||
export_status,
|
||||
</if>
|
||||
<if test="exportFromType != null">
|
||||
export_from_type,
|
||||
</if>
|
||||
<if test="exportTime != null">
|
||||
export_time,
|
||||
</if>
|
||||
<if test="exportPogress != null">
|
||||
export_pogress,
|
||||
</if>
|
||||
<if test="exportMachineName != null">
|
||||
export_machine_name,
|
||||
</if>
|
||||
<if test="params != null">
|
||||
params,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="fileName != null">
|
||||
#{fileName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="fileSize != null">
|
||||
#{fileSize,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="exportFrom != null">
|
||||
#{exportFrom,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="exportStatus != null">
|
||||
#{exportStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="exportFromType != null">
|
||||
#{exportFromType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="exportTime != null">
|
||||
#{exportTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="exportPogress != null">
|
||||
#{exportPogress,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="exportMachineName != null">
|
||||
#{exportMachineName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="params != null">
|
||||
#{params,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.dataease.plugins.common.base.domain.ExportTaskExample" resultType="java.lang.Long">
|
||||
select count(*) from export_task
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update export_task
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.fileName != null">
|
||||
file_name = #{record.fileName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.fileSize != null">
|
||||
file_size = #{record.fileSize,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="record.exportFrom != null">
|
||||
export_from = #{record.exportFrom,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.exportStatus != null">
|
||||
export_status = #{record.exportStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.exportFromType != null">
|
||||
export_from_type = #{record.exportFromType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.exportTime != null">
|
||||
export_time = #{record.exportTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.exportPogress != null">
|
||||
export_pogress = #{record.exportPogress,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.exportMachineName != null">
|
||||
export_machine_name = #{record.exportMachineName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.params != null">
|
||||
params = #{record.params,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update export_task
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
file_name = #{record.fileName,jdbcType=VARCHAR},
|
||||
file_size = #{record.fileSize,jdbcType=DOUBLE},
|
||||
export_from = #{record.exportFrom,jdbcType=VARCHAR},
|
||||
export_status = #{record.exportStatus,jdbcType=VARCHAR},
|
||||
export_from_type = #{record.exportFromType,jdbcType=VARCHAR},
|
||||
export_time = #{record.exportTime,jdbcType=BIGINT},
|
||||
export_pogress = #{record.exportPogress,jdbcType=VARCHAR},
|
||||
export_machine_name = #{record.exportMachineName,jdbcType=VARCHAR},
|
||||
params = #{record.params,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update export_task
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
file_name = #{record.fileName,jdbcType=VARCHAR},
|
||||
file_size = #{record.fileSize,jdbcType=DOUBLE},
|
||||
export_from = #{record.exportFrom,jdbcType=VARCHAR},
|
||||
export_status = #{record.exportStatus,jdbcType=VARCHAR},
|
||||
export_from_type = #{record.exportFromType,jdbcType=VARCHAR},
|
||||
export_time = #{record.exportTime,jdbcType=BIGINT},
|
||||
export_pogress = #{record.exportPogress,jdbcType=VARCHAR},
|
||||
export_machine_name = #{record.exportMachineName,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.dataease.plugins.common.base.domain.ExportTask">
|
||||
update export_task
|
||||
<set>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="fileName != null">
|
||||
file_name = #{fileName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="fileSize != null">
|
||||
file_size = #{fileSize,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="exportFrom != null">
|
||||
export_from = #{exportFrom,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="exportStatus != null">
|
||||
export_status = #{exportStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="exportFromType != null">
|
||||
export_from_type = #{exportFromType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="exportTime != null">
|
||||
export_time = #{exportTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="exportPogress != null">
|
||||
export_pogress = #{exportPogress,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="exportMachineName != null">
|
||||
export_machine_name = #{exportMachineName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="params != null">
|
||||
params = #{params,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.dataease.plugins.common.base.domain.ExportTask">
|
||||
update export_task
|
||||
set user_id = #{userId,jdbcType=BIGINT},
|
||||
file_name = #{fileName,jdbcType=VARCHAR},
|
||||
file_size = #{fileSize,jdbcType=DOUBLE},
|
||||
export_from = #{exportFrom,jdbcType=VARCHAR},
|
||||
export_status = #{exportStatus,jdbcType=VARCHAR},
|
||||
export_from_type = #{exportFromType,jdbcType=VARCHAR},
|
||||
export_time = #{exportTime,jdbcType=BIGINT},
|
||||
export_pogress = #{exportPogress,jdbcType=VARCHAR},
|
||||
export_machine_name = #{exportMachineName,jdbcType=VARCHAR},
|
||||
params = #{params,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.dataease.plugins.common.base.domain.ExportTask">
|
||||
update export_task
|
||||
set user_id = #{userId,jdbcType=BIGINT},
|
||||
file_name = #{fileName,jdbcType=VARCHAR},
|
||||
file_size = #{fileSize,jdbcType=DOUBLE},
|
||||
export_from = #{exportFrom,jdbcType=VARCHAR},
|
||||
export_status = #{exportStatus,jdbcType=VARCHAR},
|
||||
export_from_type = #{exportFromType,jdbcType=VARCHAR},
|
||||
export_time = #{exportTime,jdbcType=BIGINT},
|
||||
export_pogress = #{exportPogress,jdbcType=VARCHAR},
|
||||
export_machine_name = #{exportMachineName,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
||||
@ -101,4 +101,25 @@ public class FileUtil {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static boolean deleteDirectoryRecursively(String directoryPath) {
|
||||
File directory = new File(directoryPath);
|
||||
if (!directory.exists()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
File[] files = directory.listFiles();
|
||||
if (files != null) {
|
||||
for (File file : files) {
|
||||
if (file.isDirectory()) {
|
||||
deleteDirectoryRecursively(file.getAbsolutePath());
|
||||
} else {
|
||||
boolean deletionSuccess = file.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
return directory.delete();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user