From aa99d7214b758f166c6460d976ec0f1cb652777c Mon Sep 17 00:00:00 2001 From: xiaoguangbin Date: Wed, 24 Jul 2024 17:12:44 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9updateROI?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/jeecg/modules/controller/SelfStationController.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/controller/SelfStationController.java b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/controller/SelfStationController.java index e072f946..c0d7d799 100644 --- a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/controller/SelfStationController.java +++ b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/controller/SelfStationController.java @@ -1,6 +1,8 @@ package org.jeecg.modules.controller; +import com.alibaba.fastjson.JSONArray; import com.google.gson.Gson; +import com.google.gson.JsonArray; import com.google.gson.JsonObject; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -17,6 +19,7 @@ import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.lang.reflect.Type; import java.util.ArrayList; import java.util.List; @@ -55,7 +58,7 @@ public class SelfStationController { @PutMapping("updateROI") @ApiOperation(value = "更新ROI范围", notes = "更新ROI范围") public Result updateROI(@RequestParam String roiParams, @RequestParam String sampleFileName, HttpServletRequest request) { - ArrayList roiParamList = (ArrayList) new Gson().fromJson(roiParams, List.class); + List roiParamList = JSONArray.parseArray(roiParams, ROIParam.class); return selfStationService.updateROI(roiParamList, sampleFileName, request); }