接口数据同步自定义sql打印cus 以及参数map

dev
wangxuanran 2023-07-24 10:46:45 +08:00
parent bfec43d804
commit 0836261a05
2 changed files with 4 additions and 2 deletions

View File

@ -7,6 +7,7 @@ import aiyh.utils.response_deal.entity.ResponseConfigValueChange;
import aiyh.utils.response_deal.exception.ResponseException;
import aiyh.utils.response_deal.intfaces.DataChangeInterface;
import aiyh.utils.response_deal.mapper.ConfigMapper;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
@ -33,7 +34,7 @@ public class DataChangeProcess {
private static final ConfigMapper CONFIG_MAPPER = Util.getMapper(ConfigMapper.class);
public static final Logger logger = Util.getLogger();
public static final Logger logger = Util.getLogger("json_util");
static {
try {
@ -87,6 +88,7 @@ public class DataChangeProcess {
if(!cusText.startsWith("select ")){
throw new ResponseException("When you select custom sql, you are not allowed to perform dangerous operations other than SELECT !!!");
}
logger.info(Util.logStr("cus sql : {}, params : {}", cusText, JSONObject.toJSONString(param)));
String tempValue = CONFIG_MAPPER.executeCusQuerySql(cusText, param,new HashMap<>());
responseConfigValueChange.setJsonData(tempValue);
return "";

View File

@ -20,7 +20,7 @@ public class TypeChangeProcess {
public static final Map<Integer, Function<Object,Object>> MODE_METHOD_MAP = new HashMap<>();
public static final Logger logger = Util.getLogger();
public static final Logger logger = Util.getLogger("json_util");
static {
try {