mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-12-25 23:26:20 +08:00
update 修改失效配置
This commit is contained in:
parent
a460a23149
commit
5aa45e7a92
@ -27,11 +27,13 @@ dubbo:
|
||||
address: nacos://${spring.cloud.nacos.server-addr}
|
||||
group: DUBBO_GROUP
|
||||
consumer:
|
||||
cache: true
|
||||
validation: true
|
||||
timeout: 3000
|
||||
check: false
|
||||
scan:
|
||||
base-packages: com.ruoyi
|
||||
base-packages: com.ruoyi.**.dubbo
|
||||
cloud:
|
||||
# 规避警告 无其他作用 后续升级3.X删除
|
||||
subscribed-services: ${dubbo.application.name}
|
||||
|
||||
spring:
|
||||
@ -124,25 +126,6 @@ security:
|
||||
- /*/v2/api-docs
|
||||
- /csrf
|
||||
|
||||
# feign 配置
|
||||
feign:
|
||||
sentinel:
|
||||
enabled: true
|
||||
okhttp:
|
||||
enabled: true
|
||||
httpclient:
|
||||
enabled: false
|
||||
client:
|
||||
config:
|
||||
default:
|
||||
connectTimeout: 10000
|
||||
readTimeout: 10000
|
||||
compression:
|
||||
request:
|
||||
enabled: true
|
||||
response:
|
||||
enabled: true
|
||||
|
||||
# 暴露监控端点
|
||||
management:
|
||||
endpoints:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.ruoyi.gateway.filter;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.core.utils.JsonUtils;
|
||||
import com.ruoyi.common.core.utils.ServletUtils;
|
||||
import com.ruoyi.common.core.utils.StringUtils;
|
||||
import com.ruoyi.gateway.config.properties.CaptchaProperties;
|
||||
@ -16,6 +16,7 @@ import reactor.core.publisher.Flux;
|
||||
|
||||
import java.nio.CharBuffer;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
/**
|
||||
@ -49,8 +50,8 @@ public class ValidateCodeFilter extends AbstractGatewayFilterFactory<Object> {
|
||||
|
||||
try {
|
||||
String rspStr = resolveBodyFromRequest(request);
|
||||
JSONObject obj = JSONObject.parseObject(rspStr);
|
||||
validateCodeService.checkCapcha(obj.getString(CODE), obj.getString(UUID));
|
||||
Map<String, String> obj = JsonUtils.parseMap(rspStr);
|
||||
validateCodeService.checkCapcha(obj.get(CODE), obj.get(UUID));
|
||||
} catch (Exception e) {
|
||||
return ServletUtils.webFluxResponseWriter(exchange.getResponse(), e.getMessage());
|
||||
}
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
package com.ruoyi.gen.service;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.core.constant.Constants;
|
||||
import com.ruoyi.common.core.constant.GenConstants;
|
||||
import com.ruoyi.common.core.exception.ServiceException;
|
||||
import com.ruoyi.common.core.utils.JsonUtils;
|
||||
import com.ruoyi.common.core.utils.StringUtils;
|
||||
import com.ruoyi.common.security.utils.SecurityUtils;
|
||||
import com.ruoyi.gen.domain.GenTable;
|
||||
@ -115,7 +114,7 @@ public class GenTableServiceImpl implements IGenTableService {
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateGenTable(GenTable genTable) {
|
||||
String options = JSON.toJSONString(genTable.getParams());
|
||||
String options = JsonUtils.toJsonString(genTable.getParams());
|
||||
genTable.setOptions(options);
|
||||
int row = genTableMapper.updateGenTable(genTable);
|
||||
if (row > 0) {
|
||||
@ -339,13 +338,13 @@ public class GenTableServiceImpl implements IGenTableService {
|
||||
@Override
|
||||
public void validateEdit(GenTable genTable) {
|
||||
if (GenConstants.TPL_TREE.equals(genTable.getTplCategory())) {
|
||||
String options = JSON.toJSONString(genTable.getParams());
|
||||
JSONObject paramsObj = JSONObject.parseObject(options);
|
||||
if (StringUtils.isEmpty(paramsObj.getString(GenConstants.TREE_CODE))) {
|
||||
String options = JsonUtils.toJsonString(genTable.getParams());
|
||||
Map<String, String> paramsObj = JsonUtils.parseMap(options);
|
||||
if (StringUtils.isEmpty(paramsObj.get(GenConstants.TREE_CODE))) {
|
||||
throw new ServiceException("树编码字段不能为空");
|
||||
} else if (StringUtils.isEmpty(paramsObj.getString(GenConstants.TREE_PARENT_CODE))) {
|
||||
} else if (StringUtils.isEmpty(paramsObj.get(GenConstants.TREE_PARENT_CODE))) {
|
||||
throw new ServiceException("树父编码字段不能为空");
|
||||
} else if (StringUtils.isEmpty(paramsObj.getString(GenConstants.TREE_NAME))) {
|
||||
} else if (StringUtils.isEmpty(paramsObj.get(GenConstants.TREE_NAME))) {
|
||||
throw new ServiceException("树名称字段不能为空");
|
||||
} else if (GenConstants.TPL_SUB.equals(genTable.getTplCategory())) {
|
||||
if (StringUtils.isEmpty(genTable.getSubTableName())) {
|
||||
@ -403,13 +402,13 @@ public class GenTableServiceImpl implements IGenTableService {
|
||||
* @param genTable 设置后的生成对象
|
||||
*/
|
||||
public void setTableFromOptions(GenTable genTable) {
|
||||
JSONObject paramsObj = JSONObject.parseObject(genTable.getOptions());
|
||||
Map<String, String> paramsObj = JsonUtils.parseMap(genTable.getOptions());
|
||||
if (StringUtils.isNotNull(paramsObj)) {
|
||||
String treeCode = paramsObj.getString(GenConstants.TREE_CODE);
|
||||
String treeParentCode = paramsObj.getString(GenConstants.TREE_PARENT_CODE);
|
||||
String treeName = paramsObj.getString(GenConstants.TREE_NAME);
|
||||
String parentMenuId = paramsObj.getString(GenConstants.PARENT_MENU_ID);
|
||||
String parentMenuName = paramsObj.getString(GenConstants.PARENT_MENU_NAME);
|
||||
String treeCode = paramsObj.get(GenConstants.TREE_CODE);
|
||||
String treeParentCode = paramsObj.get(GenConstants.TREE_PARENT_CODE);
|
||||
String treeName = paramsObj.get(GenConstants.TREE_NAME);
|
||||
String parentMenuId = paramsObj.get(GenConstants.PARENT_MENU_ID);
|
||||
String parentMenuName = paramsObj.get(GenConstants.PARENT_MENU_NAME);
|
||||
|
||||
genTable.setTreeCode(treeCode);
|
||||
genTable.setTreeParentCode(treeParentCode);
|
||||
|
||||
@ -1,17 +1,14 @@
|
||||
package com.ruoyi.gen.util;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.core.constant.GenConstants;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.common.core.utils.JsonUtils;
|
||||
import com.ruoyi.common.core.utils.StringUtils;
|
||||
import com.ruoyi.gen.domain.GenTable;
|
||||
import com.ruoyi.gen.domain.GenTableColumn;
|
||||
import org.apache.velocity.VelocityContext;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 模板工具类
|
||||
@ -77,14 +74,14 @@ public class VelocityUtils {
|
||||
|
||||
public static void setMenuVelocityContext(VelocityContext context, GenTable genTable) {
|
||||
String options = genTable.getOptions();
|
||||
JSONObject paramsObj = JSONObject.parseObject(options);
|
||||
Map<String, String> paramsObj = JsonUtils.parseMap(options);
|
||||
String parentMenuId = getParentMenuId(paramsObj);
|
||||
context.put("parentMenuId", parentMenuId);
|
||||
}
|
||||
|
||||
public static void setTreeVelocityContext(VelocityContext context, GenTable genTable) {
|
||||
String options = genTable.getOptions();
|
||||
JSONObject paramsObj = JSONObject.parseObject(options);
|
||||
Map<String, String> paramsObj = JsonUtils.parseMap(options);
|
||||
String treeCode = getTreecode(paramsObj);
|
||||
String treeParentCode = getTreeParentCode(paramsObj);
|
||||
String treeName = getTreeName(paramsObj);
|
||||
@ -94,10 +91,10 @@ public class VelocityUtils {
|
||||
context.put("treeName", treeName);
|
||||
context.put("expandColumn", getExpandColumn(genTable));
|
||||
if (paramsObj.containsKey(GenConstants.TREE_PARENT_CODE)) {
|
||||
context.put("tree_parent_code", paramsObj.getString(GenConstants.TREE_PARENT_CODE));
|
||||
context.put("tree_parent_code", paramsObj.get(GenConstants.TREE_PARENT_CODE));
|
||||
}
|
||||
if (paramsObj.containsKey(GenConstants.TREE_NAME)) {
|
||||
context.put("tree_name", paramsObj.getString(GenConstants.TREE_NAME));
|
||||
context.put("tree_name", paramsObj.get(GenConstants.TREE_NAME));
|
||||
}
|
||||
}
|
||||
|
||||
@ -261,10 +258,10 @@ public class VelocityUtils {
|
||||
* @param paramsObj 生成其他选项
|
||||
* @return 上级菜单ID字段
|
||||
*/
|
||||
public static String getParentMenuId(JSONObject paramsObj) {
|
||||
public static String getParentMenuId(Map<String, String> paramsObj) {
|
||||
if (StringUtils.isNotEmpty(paramsObj) && paramsObj.containsKey(GenConstants.PARENT_MENU_ID)
|
||||
&& StringUtils.isNotEmpty(paramsObj.getString(GenConstants.PARENT_MENU_ID))) {
|
||||
return paramsObj.getString(GenConstants.PARENT_MENU_ID);
|
||||
&& StringUtils.isNotEmpty(paramsObj.get(GenConstants.PARENT_MENU_ID))) {
|
||||
return paramsObj.get(GenConstants.PARENT_MENU_ID);
|
||||
}
|
||||
return DEFAULT_PARENT_MENU_ID;
|
||||
}
|
||||
@ -275,9 +272,9 @@ public class VelocityUtils {
|
||||
* @param paramsObj 生成其他选项
|
||||
* @return 树编码
|
||||
*/
|
||||
public static String getTreecode(JSONObject paramsObj) {
|
||||
public static String getTreecode(Map<String, String> paramsObj) {
|
||||
if (paramsObj.containsKey(GenConstants.TREE_CODE)) {
|
||||
return StringUtils.toCamelCase(paramsObj.getString(GenConstants.TREE_CODE));
|
||||
return StringUtils.toCamelCase(paramsObj.get(GenConstants.TREE_CODE));
|
||||
}
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
@ -288,9 +285,9 @@ public class VelocityUtils {
|
||||
* @param paramsObj 生成其他选项
|
||||
* @return 树父编码
|
||||
*/
|
||||
public static String getTreeParentCode(JSONObject paramsObj) {
|
||||
public static String getTreeParentCode(Map<String, String> paramsObj) {
|
||||
if (paramsObj.containsKey(GenConstants.TREE_PARENT_CODE)) {
|
||||
return StringUtils.toCamelCase(paramsObj.getString(GenConstants.TREE_PARENT_CODE));
|
||||
return StringUtils.toCamelCase(paramsObj.get(GenConstants.TREE_PARENT_CODE));
|
||||
}
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
@ -301,9 +298,9 @@ public class VelocityUtils {
|
||||
* @param paramsObj 生成其他选项
|
||||
* @return 树名称
|
||||
*/
|
||||
public static String getTreeName(JSONObject paramsObj) {
|
||||
public static String getTreeName(Map<String, String> paramsObj) {
|
||||
if (paramsObj.containsKey(GenConstants.TREE_NAME)) {
|
||||
return StringUtils.toCamelCase(paramsObj.getString(GenConstants.TREE_NAME));
|
||||
return StringUtils.toCamelCase(paramsObj.get(GenConstants.TREE_NAME));
|
||||
}
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
@ -316,8 +313,8 @@ public class VelocityUtils {
|
||||
*/
|
||||
public static int getExpandColumn(GenTable genTable) {
|
||||
String options = genTable.getOptions();
|
||||
JSONObject paramsObj = JSONObject.parseObject(options);
|
||||
String treeName = paramsObj.getString(GenConstants.TREE_NAME);
|
||||
Map<String, String> paramsObj = JsonUtils.parseMap(options);
|
||||
String treeName = paramsObj.get(GenConstants.TREE_NAME);
|
||||
int num = 0;
|
||||
for (GenTableColumn column : genTable.getColumns()) {
|
||||
if (column.isList()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user