|
@@ -13,6 +13,7 @@ import com.lc.ibps.cloud.entity.APIResult;
|
|
|
import com.lc.ibps.cloud.message.util.MessageQueueProductorUtil;
|
|
import com.lc.ibps.cloud.message.util.MessageQueueProductorUtil;
|
|
|
import com.lc.ibps.common.api.INewsMgrService;
|
|
import com.lc.ibps.common.api.INewsMgrService;
|
|
|
import com.lc.ibps.common.system.persistence.entity.NewsPo;
|
|
import com.lc.ibps.common.system.persistence.entity.NewsPo;
|
|
|
|
|
+import com.lc.ibps.untils.JsonUtils;
|
|
|
import com.lc.ibps.untils.SqlUtil;
|
|
import com.lc.ibps.untils.SqlUtil;
|
|
|
import lombok.extern.log4j.Log4j2;
|
|
import lombok.extern.log4j.Log4j2;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -337,8 +338,9 @@ public class AuditServiceImpl implements AuditService {
|
|
|
replaceAll("\"\\[","[").replaceAll("]\"","]");
|
|
replaceAll("\"\\[","[").replaceAll("]\"","]");
|
|
|
//预处理,去除空格和换行符导致json转换失败问题
|
|
//预处理,去除空格和换行符导致json转换失败问题
|
|
|
replaceSql = replaceSql.trim().replace("\r\n", "\\r\\n").replace("\n", "\\n");
|
|
replaceSql = replaceSql.trim().replace("\r\n", "\\r\\n").replace("\n", "\\n");
|
|
|
- JSONArray jsonArray = JSONUtil.parseArray(replaceSql);
|
|
|
|
|
- //JSONArray jsonArray = JSONUtil.parseArray(map.get("data_").toString());
|
|
|
|
|
|
|
+ JSONArray jsonArray = JsonUtils.parseToArray(replaceSql); //解决json字符串中包含json对象报错问题
|
|
|
|
|
+// JSONArray jsonArray = JSONUtil.parseArray(replaceSql);
|
|
|
|
|
+// JSONArray jsonArray = JSONUtil.parseArray(map.get("data_").toString());
|
|
|
StringBuilder sqlBuilder = new StringBuilder();
|
|
StringBuilder sqlBuilder = new StringBuilder();
|
|
|
for (int i = 0; i < jsonArray.size(); i++) {
|
|
for (int i = 0; i < jsonArray.size(); i++) {
|
|
|
JSONObject jsonObject = jsonArray.getJSONObject(i);
|
|
JSONObject jsonObject = jsonArray.getJSONObject(i);
|