diff --git a/pom.xml b/pom.xml
index 8cb5d29..5a77010 100644
--- a/pom.xml
+++ b/pom.xml
@@ -35,11 +35,6 @@
mybatis-plus-generator
3.3.2
-
- com.alibaba
- fastjson
- 1.2.80
-
cn.hutool
hutool-extra
@@ -55,6 +50,11 @@
hutool-crypto
${hutool.version}
+
+ cn.hutool
+ hutool-json
+ ${hutool.version}
+
diff --git a/src/main/java/com/ydool/boot/api/controller/ApiAuthController.java b/src/main/java/com/ydool/boot/api/controller/ApiAuthController.java
index bacd7f2..0352b2b 100644
--- a/src/main/java/com/ydool/boot/api/controller/ApiAuthController.java
+++ b/src/main/java/com/ydool/boot/api/controller/ApiAuthController.java
@@ -3,8 +3,8 @@ package com.ydool.boot.api.controller;
import cn.hutool.core.codec.Base64;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.core.util.StrUtil;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
+import cn.hutool.json.JSONObject;
+import cn.hutool.json.JSONUtil;
import com.alibaba.xxpt.gateway.shared.client.http.ExecutableClient;
import com.alibaba.xxpt.gateway.shared.client.http.GetClient;
import com.alibaba.xxpt.gateway.shared.client.http.PostClient;
@@ -463,11 +463,11 @@ public class ApiAuthController extends ApiBaseController {
String apiResult = getClient.get();
executableClient.destroy();
try {
- JSONObject jsonObject = JSON.parseObject(apiResult);
+ JSONObject jsonObject = JSONUtil.parseObj(apiResult);
System.out.println(jsonObject);
JSONObject content = jsonObject.getJSONObject("content");
- if (content.getBoolean("success")) {
- return content.getJSONObject("data").getString("accessToken");
+ if (content.getBool("success")) {
+ return content.getJSONObject("data").getStr("accessToken");
}
} catch (Exception e) {
e.printStackTrace();
@@ -492,11 +492,11 @@ public class ApiAuthController extends ApiBaseController {
String apiResult = postClient.post();
executableClient.destroy();
try {
- JSONObject jsonObject = JSON.parseObject(apiResult);
+ JSONObject jsonObject = JSONUtil.parseObj(apiResult);
System.out.println("jsonObject:"+jsonObject);
JSONObject content = jsonObject.getJSONObject("content");
- if (content.getBoolean("success")) {
- return content.getJSONObject("data").getString("openid");
+ if (content.getBool("success")) {
+ return content.getJSONObject("data").getStr("openid");
}
} catch (Exception e) {
e.printStackTrace();
@@ -521,10 +521,10 @@ public class ApiAuthController extends ApiBaseController {
String apiResult = postClient.post();
executableClient.destroy();
try {
- JSONObject jsonObject = JSON.parseObject(apiResult);
+ JSONObject jsonObject = JSONUtil.parseObj(apiResult);
JSONObject content = jsonObject.getJSONObject("content");
- if (content.getBoolean("success")) {
- return content.getJSONObject("data").getString("accountId");
+ if (content.getBool("success")) {
+ return content.getJSONObject("data").getStr("accountId");
}
} catch (Exception e) {
e.printStackTrace();
diff --git a/src/main/java/com/ydool/boot/modules/rddb/service/AppointService.java b/src/main/java/com/ydool/boot/modules/rddb/service/AppointService.java
index 79987f6..3a71a68 100644
--- a/src/main/java/com/ydool/boot/modules/rddb/service/AppointService.java
+++ b/src/main/java/com/ydool/boot/modules/rddb/service/AppointService.java
@@ -4,7 +4,8 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil;
-import com.alibaba.fastjson.JSONObject;
+import cn.hutool.json.JSONArray;
+import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -323,7 +324,8 @@ public class AppointService extends BaseService {
.eq(AppointAttachment::getAppointId, appointId)
.eq(AppointAttachment::getType, state));
if (StrUtil.isNotBlank(appointAttachmentArrStr)) {
- List appointAttachmentList = JSONObject.parseArray(appointAttachmentArrStr, AppointAttachment.class);
+ JSONArray objects = JSONUtil.parseArray(appointAttachmentArrStr);
+ List appointAttachmentList = JSONUtil.toList(objects, AppointAttachment.class);
appointAttachmentList.forEach(item -> {
item.setAppointId(appointId);
item.setType(state);
diff --git a/src/main/java/com/ydool/boot/modules/rddb/service/ConferenceService.java b/src/main/java/com/ydool/boot/modules/rddb/service/ConferenceService.java
index 6017571..4895439 100644
--- a/src/main/java/com/ydool/boot/modules/rddb/service/ConferenceService.java
+++ b/src/main/java/com/ydool/boot/modules/rddb/service/ConferenceService.java
@@ -2,15 +2,13 @@ package com.ydool.boot.modules.rddb.service;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.StrUtil;
-import com.alibaba.fastjson.JSONArray;
+import cn.hutool.json.JSONArray;
+import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ydool.boot.common.result.Ret;
import com.ydool.boot.core.service.BaseService;
-import com.ydool.boot.modules.rddb.entity.Conference;
-import com.ydool.boot.modules.rddb.entity.ConferenceAttachment;
-import com.ydool.boot.modules.rddb.entity.ConferenceUser;
-import com.ydool.boot.modules.rddb.entity.Message;
+import com.ydool.boot.modules.rddb.entity.*;
import com.ydool.boot.modules.rddb.mapper.ConferenceMapper;
import com.ydool.boot.modules.sys.entity.User;
import com.ydool.boot.modules.sys.service.UserService;
@@ -97,7 +95,8 @@ public class ConferenceService extends BaseService
if (StringUtils.isNotBlank(fileJson)) {
//之前指定的全删掉
conferenceAttachmentService.remove(new QueryWrapper().eq("conference_id", conference.getId()));
- List conferenceAttachments = JSONArray.parseArray(fileJson, ConferenceAttachment.class);
+ JSONArray objects = JSONUtil.parseArray(fileJson);
+ List conferenceAttachments = JSONUtil.toList(objects, ConferenceAttachment.class);
//重新指定
Iterator iterator = conferenceAttachments.iterator();
int sortNo = 1;
diff --git a/src/main/java/com/ydool/boot/modules/rddb/service/ContactDbService.java b/src/main/java/com/ydool/boot/modules/rddb/service/ContactDbService.java
index 9ee67b5..82a8fea 100644
--- a/src/main/java/com/ydool/boot/modules/rddb/service/ContactDbService.java
+++ b/src/main/java/com/ydool/boot/modules/rddb/service/ContactDbService.java
@@ -4,7 +4,8 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil;
-import com.alibaba.fastjson.JSONObject;
+import cn.hutool.json.JSONArray;
+import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -336,7 +337,9 @@ public class ContactDbService extends BaseService {
private void saveAttachment(String contactDbId, String attachmentArrStr, User loginUser, String type) {
contactDbAttachmentService.remove(new LambdaQueryWrapper().eq(ContactDbAttachment::getContactDbId, contactDbId).eq(ContactDbAttachment::getType, type));
if (StrUtil.isNotBlank(attachmentArrStr)) {
- List attachmentList = JSONObject.parseArray(attachmentArrStr, ContactDbAttachment.class);
+ JSONArray objects = JSONUtil.parseArray(attachmentArrStr);
+ List attachmentList = JSONUtil.toList(objects, ContactDbAttachment.class);
+
attachmentList.forEach(item -> {
item.setContactDbId(contactDbId);
item.setType(type);
diff --git a/src/main/java/com/ydool/boot/modules/rddb/service/NoticeService.java b/src/main/java/com/ydool/boot/modules/rddb/service/NoticeService.java
index 38ae335..770fd5e 100644
--- a/src/main/java/com/ydool/boot/modules/rddb/service/NoticeService.java
+++ b/src/main/java/com/ydool/boot/modules/rddb/service/NoticeService.java
@@ -2,7 +2,8 @@ package com.ydool.boot.modules.rddb.service;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
-import com.alibaba.fastjson.JSONObject;
+import cn.hutool.json.JSONArray;
+import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -16,7 +17,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-import java.lang.reflect.Type;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
@@ -100,7 +100,9 @@ public class NoticeService extends ServiceImpl {
.eq(NoticeAttachment::getType,type)
);
if (StrUtil.isNotBlank(attachmentArrStr)) {
- List attachmentList = JSONObject.parseArray(attachmentArrStr, NoticeAttachment.class);
+ JSONArray objects = JSONUtil.parseArray(attachmentArrStr);
+ List attachmentList = JSONUtil.toList(objects, NoticeAttachment.class);
+
attachmentList.forEach(item -> {
item.setNoticeId(noticeId);
item.setCreatedId(loginUser.getId());
diff --git a/src/main/java/com/ydool/boot/modules/rddb/service/RdNoticeService.java b/src/main/java/com/ydool/boot/modules/rddb/service/RdNoticeService.java
index 4e4bec3..4755c5a 100644
--- a/src/main/java/com/ydool/boot/modules/rddb/service/RdNoticeService.java
+++ b/src/main/java/com/ydool/boot/modules/rddb/service/RdNoticeService.java
@@ -2,7 +2,8 @@ package com.ydool.boot.modules.rddb.service;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
-import com.alibaba.fastjson.JSONObject;
+import cn.hutool.json.JSONArray;
+import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ydool.boot.core.service.BaseService;
import com.ydool.boot.modules.rddb.entity.RdNotice;
@@ -69,7 +70,8 @@ public class RdNoticeService extends BaseService {
.eq(RdNoticeAttachment::getRdNoticeId, noticeId)
);
if (StrUtil.isNotBlank(attachmentArrStr)) {
- List attachmentList = JSONObject.parseArray(attachmentArrStr, RdNoticeAttachment.class);
+ JSONArray objects = JSONUtil.parseArray(attachmentArrStr);
+ List attachmentList = JSONUtil.toList(objects, RdNoticeAttachment.class);
attachmentList.forEach(item -> {
item.setRdNoticeId(noticeId);
item.setCreatedId(loginUser.getId());
diff --git a/src/main/java/com/ydool/boot/modules/rddb/service/ResearchArticleService.java b/src/main/java/com/ydool/boot/modules/rddb/service/ResearchArticleService.java
index e595009..eafb38e 100644
--- a/src/main/java/com/ydool/boot/modules/rddb/service/ResearchArticleService.java
+++ b/src/main/java/com/ydool/boot/modules/rddb/service/ResearchArticleService.java
@@ -2,7 +2,8 @@ package com.ydool.boot.modules.rddb.service;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.StrUtil;
-import com.alibaba.fastjson.JSONArray;
+import cn.hutool.json.JSONArray;
+import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ydool.boot.common.result.Ret;
import com.ydool.boot.core.service.BaseService;
@@ -65,7 +66,10 @@ public class ResearchArticleService extends BaseService().eq("research_article_id", researchArticle.getId()));
- List researchArticleAttachments = JSONArray.parseArray(fileJson, ResearchArticleAttachment.class);
+
+ JSONArray objects = JSONUtil.parseArray(fileJson);
+ List researchArticleAttachments = JSONUtil.toList(objects, ResearchArticleAttachment.class);
+
//重新指定
Iterator iterator = researchArticleAttachments.iterator();
int sortNo = 1;
diff --git a/src/main/java/com/ydool/boot/modules/rddb/service/ReviewOfficerService.java b/src/main/java/com/ydool/boot/modules/rddb/service/ReviewOfficerService.java
index ad39c5f..a5f912c 100644
--- a/src/main/java/com/ydool/boot/modules/rddb/service/ReviewOfficerService.java
+++ b/src/main/java/com/ydool/boot/modules/rddb/service/ReviewOfficerService.java
@@ -5,7 +5,8 @@ import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil;
-import com.alibaba.fastjson.JSONObject;
+import cn.hutool.json.JSONArray;
+import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -385,7 +386,8 @@ public class ReviewOfficerService extends BaseService reviewAttachmentList = JSONObject.parseArray(reviewAttachmentArrStr, ReviewOfficerAttachment.class);
+ JSONArray objects = JSONUtil.parseArray(reviewAttachmentArrStr);
+ List reviewAttachmentList = JSONUtil.toList(objects, ReviewOfficerAttachment.class);
reviewAttachmentList.forEach(item -> {
item.setReviewId(reviewId);
item.setType(state);
diff --git a/src/main/java/com/ydool/boot/modules/rddb/service/ReviewService.java b/src/main/java/com/ydool/boot/modules/rddb/service/ReviewService.java
index afb2c5a..c42e9b1 100644
--- a/src/main/java/com/ydool/boot/modules/rddb/service/ReviewService.java
+++ b/src/main/java/com/ydool/boot/modules/rddb/service/ReviewService.java
@@ -4,7 +4,8 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil;
-import com.alibaba.fastjson.JSONObject;
+import cn.hutool.json.JSONArray;
+import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ydool.boot.common.result.Ret;
@@ -378,7 +379,8 @@ public class ReviewService extends BaseService {
.eq(ReviewAttachment::getReviewId, reviewId)
.eq(ReviewAttachment::getType, state));
if (StrUtil.isNotBlank(reviewAttachmentArrStr)) {
- List reviewAttachmentList = JSONObject.parseArray(reviewAttachmentArrStr, ReviewAttachment.class);
+ JSONArray objects = JSONUtil.parseArray(reviewAttachmentArrStr);
+ List reviewAttachmentList = JSONUtil.toList(objects, ReviewAttachment.class);
reviewAttachmentList.forEach(item -> {
item.setReviewId(reviewId);
item.setType(state);
diff --git a/src/main/java/com/ydool/boot/modules/rddb/service/ReviewSubjectService.java b/src/main/java/com/ydool/boot/modules/rddb/service/ReviewSubjectService.java
index de615e7..17ebae7 100644
--- a/src/main/java/com/ydool/boot/modules/rddb/service/ReviewSubjectService.java
+++ b/src/main/java/com/ydool/boot/modules/rddb/service/ReviewSubjectService.java
@@ -5,7 +5,8 @@ import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil;
-import com.alibaba.fastjson.JSONObject;
+import cn.hutool.json.JSONArray;
+import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -385,7 +386,8 @@ public class ReviewSubjectService extends BaseService reviewAttachmentList = JSONObject.parseArray(reviewAttachmentArrStr, ReviewSubjectAttachment.class);
+ JSONArray objects = JSONUtil.parseArray(reviewAttachmentArrStr);
+ List reviewAttachmentList = JSONUtil.toList(objects, ReviewSubjectAttachment.class);
reviewAttachmentList.forEach(item -> {
item.setReviewId(reviewId);
item.setType(state);
diff --git a/src/main/java/com/ydool/boot/modules/rddb/service/ReviewSuperviseService.java b/src/main/java/com/ydool/boot/modules/rddb/service/ReviewSuperviseService.java
index ea79897..f368abd 100644
--- a/src/main/java/com/ydool/boot/modules/rddb/service/ReviewSuperviseService.java
+++ b/src/main/java/com/ydool/boot/modules/rddb/service/ReviewSuperviseService.java
@@ -4,7 +4,8 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil;
-import com.alibaba.fastjson.JSONObject;
+import cn.hutool.json.JSONArray;
+import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -248,7 +249,9 @@ public class ReviewSuperviseService extends BaseService().eq(ReviewSuperviseAttachment::getReviewSuperviseId, reviewSuperviseId).eq(ReviewSuperviseAttachment::getType, type));
if (StrUtil.isNotBlank(attachmentArrStr)) {
- List attachmentList = JSONObject.parseArray(attachmentArrStr, ReviewSuperviseAttachment.class);
+ JSONArray objects = JSONUtil.parseArray(attachmentArrStr);
+ List attachmentList = JSONUtil.toList(objects, ReviewSuperviseAttachment.class);
+
attachmentList.forEach(item -> {
item.setReviewSuperviseId(reviewSuperviseId);
item.setType(type);
diff --git a/src/main/java/com/ydool/boot/modules/rddb/service/ReviewWorkService.java b/src/main/java/com/ydool/boot/modules/rddb/service/ReviewWorkService.java
index f347f87..c6f0620 100644
--- a/src/main/java/com/ydool/boot/modules/rddb/service/ReviewWorkService.java
+++ b/src/main/java/com/ydool/boot/modules/rddb/service/ReviewWorkService.java
@@ -5,7 +5,8 @@ import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil;
-import com.alibaba.fastjson.JSONObject;
+import cn.hutool.json.JSONArray;
+import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -14,7 +15,6 @@ import com.ydool.boot.core.exception.ResultException;
import com.ydool.boot.core.service.BaseService;
import com.ydool.boot.modules.rddb.entity.*;
import com.ydool.boot.modules.rddb.entity.bo.ReviewWorkBo;
-
import com.ydool.boot.modules.rddb.entity.request.review_work.ReviewWorkAuditRequest;
import com.ydool.boot.modules.rddb.entity.request.review_work.ReviewWorkCheckRequest;
import com.ydool.boot.modules.rddb.entity.request.review_work.ReviewWorkCommentRequest;
@@ -386,7 +386,8 @@ public class ReviewWorkService extends BaseService
.eq(ReviewWorkAttachment::getReviewId, reviewId)
.eq(ReviewWorkAttachment::getType, state));
if (StrUtil.isNotBlank(reviewAttachmentArrStr)) {
- List reviewAttachmentList = JSONObject.parseArray(reviewAttachmentArrStr, ReviewWorkAttachment.class);
+ JSONArray objects = JSONUtil.parseArray(reviewAttachmentArrStr);
+ List reviewAttachmentList = JSONUtil.toList(objects, ReviewWorkAttachment.class);
reviewAttachmentList.forEach(item -> {
item.setReviewId(reviewId);
item.setType(state);
diff --git a/src/main/java/com/ydool/boot/modules/rddb/service/SSOService.java b/src/main/java/com/ydool/boot/modules/rddb/service/SSOService.java
index 143daf1..1f7a49d 100644
--- a/src/main/java/com/ydool/boot/modules/rddb/service/SSOService.java
+++ b/src/main/java/com/ydool/boot/modules/rddb/service/SSOService.java
@@ -4,7 +4,8 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.crypto.SecureUtil;
import cn.hutool.http.HttpUtil;
-import com.alibaba.fastjson.JSONObject;
+import cn.hutool.json.JSONObject;
+import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ydool.boot.api.util.CodecUtils;
import com.ydool.boot.api.util.Kv;
@@ -49,22 +50,22 @@ public class SSOService extends BaseService {
params.put("st",ticket);
params.put("datatype","json");
String result = HttpUtil.get("https://appapi.zjzwfw.gov.cn/sso/servlet/simpleauth", params);
- JSONObject jsonObject = JSONObject.parseObject(result);
- if("0".equals(jsonObject.getString("result"))){
+ JSONObject jsonObject = JSONUtil.parseObj(result);
+ if("0".equals(jsonObject.getStr("result"))){
params.remove("st");
params.put("method","getUserInfo");
- params.put("token",jsonObject.getString("token"));
+ params.put("token",jsonObject.getStr("token"));
String userInfo = HttpUtil.get("https://appapi.zjzwfw.gov.cn/sso/servlet/simpleauth", params);
- JSONObject userInfoObj = JSONObject.parseObject(userInfo);
- String userid = userInfoObj.getString("userid");
+ JSONObject userInfoObj = JSONUtil.parseObj(userInfo);
+ String userid = userInfoObj.getStr("userid");
User zlbUser = userService.getOne(new QueryWrapper().eq("zlb_user_id", userid));
if(zlbUser==null){
- String mobile = userInfoObj.getString("mobile");
+ String mobile = userInfoObj.getStr("mobile");
String encryptMobile = CodecUtils.encrypt(mobile);
zlbUser = userService.getOne(new QueryWrapper().eq("login_name", encryptMobile));
if(zlbUser==null){
- String username = userInfoObj.getString("username");
- String sex = userInfoObj.getString("sex");
+ String username = userInfoObj.getStr("username");
+ String sex = userInfoObj.getStr("sex");
if("0".equals(sex)) sex = "1";
if("1".equals(sex)) sex = "0";
zlbUser = new User();
diff --git a/src/main/java/com/ydool/boot/modules/rddb/service/SuperviseThingService.java b/src/main/java/com/ydool/boot/modules/rddb/service/SuperviseThingService.java
index 359ebc9..d53cd0f 100644
--- a/src/main/java/com/ydool/boot/modules/rddb/service/SuperviseThingService.java
+++ b/src/main/java/com/ydool/boot/modules/rddb/service/SuperviseThingService.java
@@ -1,7 +1,8 @@
package com.ydool.boot.modules.rddb.service;
import cn.hutool.core.util.StrUtil;
-import com.alibaba.fastjson.JSONArray;
+import cn.hutool.json.JSONArray;
+import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ydool.boot.common.result.Ret;
@@ -178,7 +179,10 @@ public class SuperviseThingService extends BaseService().eq("supervise_thing_id", superviseThing.getId()));
- List SuperviseThingAttachments = JSONArray.parseArray(fileJson, SuperviseThingAttachment.class);
+
+ JSONArray objects = JSONUtil.parseArray(fileJson);
+ List SuperviseThingAttachments = JSONUtil.toList(objects, SuperviseThingAttachment.class);
+
//重新指定
Iterator iterator = SuperviseThingAttachments.iterator();
int sortNo = 1;