From d6f12f429c9b080906f224025206556b4d85eb52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E4=B8=89=E7=82=AE?= <15856818120@163.com> Date: Tue, 29 Apr 2025 14:13:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basic/controller/TbTowerController.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/bonus/digitalSignage/basic/controller/TbTowerController.java b/src/main/java/com/bonus/digitalSignage/basic/controller/TbTowerController.java index 513333b..174819d 100644 --- a/src/main/java/com/bonus/digitalSignage/basic/controller/TbTowerController.java +++ b/src/main/java/com/bonus/digitalSignage/basic/controller/TbTowerController.java @@ -5,13 +5,13 @@ import com.bonus.digitalSignage.annotation.LogAnnotation; import com.bonus.digitalSignage.basic.service.TbTowerService; import com.bonus.digitalSignage.basic.vo.TbTowerVo; import com.bonus.digitalSignage.system.vo.EncryptedReq; +import com.bonus.digitalSignage.system.vo.dto.FileStorageDto; import com.bonus.digitalSignage.utils.ExcelUtil; +import com.bonus.digitalSignage.utils.FastJsonHelper; import com.bonus.digitalSignage.utils.ServerResponse; import com.github.pagehelper.PageHelper; import lombok.extern.slf4j.Slf4j; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; @@ -134,9 +134,8 @@ public class TbTowerController { * @throws IOException */ @PostMapping(value = "/tbTowerImport") - @DecryptAndVerify(decryptedClass = TbTowerVo.class) @LogAnnotation(operModul = "杆塔管理-导入", operation = "导入", operDesc = "系统级事件",operType="导入") - public ServerResponse tbTowerExport(MultipartFile file, TbTowerVo tbTowerVo) throws IOException { + public ServerResponse tbTowerExport(@RequestPart(value = "file") MultipartFile file, @RequestParam(value = "params")String params) throws IOException { String fileName = file.getOriginalFilename(); if (fileName != null) { String fileExtension = fileName.substring(fileName.lastIndexOf(".") + 1); @@ -154,6 +153,7 @@ public class TbTowerController { if (tbTowerVoList.size()>3000){ return ServerResponse.createErroe("文件条数超过3000"); } + TbTowerVo tbTowerVo = FastJsonHelper.jsonStrToBean(params, TbTowerVo.class); String message = tbTowerService.tbTowerExport(tbTowerVoList, tbTowerVo); return ServerResponse.createSuccess(message); }