升级fastjson到最新版2.0.4
This commit is contained in:
@ -21,8 +21,8 @@ import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.constant.GenConstants;
|
||||
import com.ruoyi.common.core.text.CharsetKit;
|
||||
@ -401,7 +401,7 @@ public class GenTableServiceImpl implements IGenTableService
|
||||
if (GenConstants.TPL_TREE.equals(genTable.getTplCategory()))
|
||||
{
|
||||
String options = JSON.toJSONString(genTable.getParams());
|
||||
JSONObject paramsObj = JSONObject.parseObject(options);
|
||||
JSONObject paramsObj = JSON.parseObject(options);
|
||||
if (StringUtils.isEmpty(paramsObj.getString(GenConstants.TREE_CODE)))
|
||||
{
|
||||
throw new ServiceException("树编码字段不能为空");
|
||||
@ -485,7 +485,7 @@ public class GenTableServiceImpl implements IGenTableService
|
||||
*/
|
||||
public void setTableFromOptions(GenTable genTable)
|
||||
{
|
||||
JSONObject paramsObj = JSONObject.parseObject(genTable.getOptions());
|
||||
JSONObject paramsObj = JSON.parseObject(genTable.getOptions());
|
||||
if (StringUtils.isNotNull(paramsObj))
|
||||
{
|
||||
String treeCode = paramsObj.getString(GenConstants.TREE_CODE);
|
||||
|
@ -5,7 +5,8 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import org.apache.velocity.VelocityContext;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.ruoyi.common.constant.GenConstants;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
@ -75,7 +76,7 @@ public class VelocityUtils
|
||||
public static void setMenuVelocityContext(VelocityContext context, GenTable genTable)
|
||||
{
|
||||
String options = genTable.getOptions();
|
||||
JSONObject paramsObj = JSONObject.parseObject(options);
|
||||
JSONObject paramsObj = JSON.parseObject(options);
|
||||
String parentMenuId = getParentMenuId(paramsObj);
|
||||
context.put("parentMenuId", parentMenuId);
|
||||
}
|
||||
@ -83,7 +84,7 @@ public class VelocityUtils
|
||||
public static void setTreeVelocityContext(VelocityContext context, GenTable genTable)
|
||||
{
|
||||
String options = genTable.getOptions();
|
||||
JSONObject paramsObj = JSONObject.parseObject(options);
|
||||
JSONObject paramsObj = JSON.parseObject(options);
|
||||
String treeCode = getTreecode(paramsObj);
|
||||
String treeParentCode = getTreeParentCode(paramsObj);
|
||||
String treeName = getTreeName(paramsObj);
|
||||
@ -381,7 +382,7 @@ public class VelocityUtils
|
||||
public static int getExpandColumn(GenTable genTable)
|
||||
{
|
||||
String options = genTable.getOptions();
|
||||
JSONObject paramsObj = JSONObject.parseObject(options);
|
||||
JSONObject paramsObj = JSON.parseObject(options);
|
||||
String treeName = paramsObj.getString(GenConstants.TREE_NAME);
|
||||
int num = 0;
|
||||
for (GenTableColumn column : genTable.getColumns())
|
||||
|
Reference in New Issue
Block a user