|
@@ -7,9 +7,11 @@ import com.alibaba.fastjson2.TypeReference;
|
|
|
import com.zkqy.business.entity.DragTable;
|
|
|
import com.zkqy.business.service.IDragTableService;
|
|
|
import com.zkqy.common.annotation.Anonymous;
|
|
|
+import com.zkqy.common.annotation.Log;
|
|
|
import com.zkqy.common.config.ZkqyConfig;
|
|
|
import com.zkqy.common.constant.Constants;
|
|
|
import com.zkqy.common.core.domain.AjaxResult;
|
|
|
+import com.zkqy.common.enums.BusinessType;
|
|
|
import com.zkqy.common.utils.StringUtils;
|
|
|
import com.zkqy.common.utils.file.FileUploadUtils;
|
|
|
import com.zkqy.common.utils.file.FileUtils;
|
|
@@ -66,6 +68,7 @@ public class CommonFileController {
|
|
|
/**
|
|
|
* 通用导出excel
|
|
|
*/
|
|
|
+ @Log(title = "动态表格", businessType = BusinessType.EXPORT)
|
|
|
@PostMapping("/export")
|
|
|
public void export(HttpServletResponse response, CommonEntity commonEntity) throws Exception {
|
|
|
commonService.export(response, commonEntity);
|
|
@@ -78,6 +81,7 @@ public class CommonFileController {
|
|
|
* @param tableName
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
+ @Log(title = "动态表格", businessType = BusinessType.EXPORT)
|
|
|
@PostMapping("/exportTemplate")
|
|
|
public void exportTemplate(HttpServletResponse response, String tableName, String sqlkey) throws Exception {
|
|
|
commonService.exportTemplate(response, tableName, sqlkey);
|
|
@@ -89,6 +93,7 @@ public class CommonFileController {
|
|
|
* @param fileName 文件名称
|
|
|
* @param delete 是否删除
|
|
|
*/
|
|
|
+ @Log(title = "动态表格", businessType = BusinessType.EXPORT)
|
|
|
@GetMapping("/download")
|
|
|
public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request) {
|
|
|
try {
|
|
@@ -112,6 +117,7 @@ public class CommonFileController {
|
|
|
/**
|
|
|
* 通用上传请求(单个)
|
|
|
*/
|
|
|
+ @Log(title = "动态表格", businessType = BusinessType.IMPORT)
|
|
|
@PostMapping("/upload")
|
|
|
public AjaxResult uploadFile(MultipartFile file) throws Exception {
|
|
|
try {
|
|
@@ -134,6 +140,7 @@ public class CommonFileController {
|
|
|
/**
|
|
|
* 通用上传请求(多个)
|
|
|
*/
|
|
|
+ @Log(title = "动态表格", businessType = BusinessType.IMPORT)
|
|
|
@PostMapping("/uploads")
|
|
|
public AjaxResult uploadFiles(List<MultipartFile> files) throws Exception {
|
|
|
try {
|
|
@@ -166,6 +173,7 @@ public class CommonFileController {
|
|
|
/**
|
|
|
* 本地资源通用下载
|
|
|
*/
|
|
|
+ @Log(title = "动态表格", businessType = BusinessType.EXPORT)
|
|
|
@GetMapping("/download/resource")
|
|
|
public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)
|
|
|
throws Exception {
|
|
@@ -191,6 +199,7 @@ public class CommonFileController {
|
|
|
* 导入execl数据(单个文件)文件名即表名
|
|
|
*/
|
|
|
|
|
|
+ @Log(title = "动态表格", businessType = BusinessType.IMPORT)
|
|
|
@Anonymous
|
|
|
@ApiOperation("上传文件")
|
|
|
@PostMapping(value = "/uploadData", headers = "content-type=multipart/form-data")
|