@@ -14,6 +14,7 @@ import cc.smtweb.framework.core.exception.SwException; | |||||
import cc.smtweb.framework.core.mvc.service.SqlNamedPara; | import cc.smtweb.framework.core.mvc.service.SqlNamedPara; | ||||
import cc.smtweb.framework.core.util.MapUtil; | import cc.smtweb.framework.core.util.MapUtil; | ||||
import cc.smtweb.framework.core.util.NumberUtil; | import cc.smtweb.framework.core.util.NumberUtil; | ||||
import cc.smtweb.framework.core.util.SqlUtil; | |||||
import cc.smtweb.framework.core.util.StringUtil; | import cc.smtweb.framework.core.util.StringUtil; | ||||
import cc.smtweb.system.bpm.web.design.form.define.*; | import cc.smtweb.system.bpm.web.design.form.define.*; | ||||
import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||
@@ -187,7 +188,7 @@ public class DynPageHelper { | |||||
if (listener != null) listener.buildSelect(dataSet, sql); | if (listener != null) listener.buildSelect(dataSet, sql); | ||||
return sql.toString(); | return sql.toString(); | ||||
} else { | } else { | ||||
return dataSet.sql; | |||||
return SqlUtil.replaceTable(dataSet.sql); | |||||
} | } | ||||
} | } | ||||
@@ -104,7 +104,7 @@ public class DynPageLoadHandler extends AbstractDynPageHandler { | |||||
SwMap filter = params.readMap("filter"); | SwMap filter = params.readMap("filter"); | ||||
//对应的数据集定义 | //对应的数据集定义 | ||||
PageDataset pageDataSet = readParamDs(); | PageDataset pageDataSet = readParamDs(); | ||||
DynRetBean bean = null; | DynRetBean bean = null; | ||||
if (SwEnum.DatasetType.LIST.value.equals(pageDataSet.type)) {//列表类 | if (SwEnum.DatasetType.LIST.value.equals(pageDataSet.type)) {//列表类 | ||||
bean = DynRetBean.createList(getListWorker(filter, pageDataSet).buildListData()); | bean = DynRetBean.createList(getListWorker(filter, pageDataSet).buildListData()); | ||||
@@ -38,8 +38,6 @@ public class RedisSysTask implements ISysTask { | |||||
RedisBroadcastEvent redisBroadcast = JsonUtil.parse(message, RedisBroadcastEvent.class); | RedisBroadcastEvent redisBroadcast = JsonUtil.parse(message, RedisBroadcastEvent.class); | ||||
applicationContext.publishEvent(redisBroadcast); | applicationContext.publishEvent(redisBroadcast); | ||||
// log.debug("Redis [" + channel + "] message:" + redisBroadcast); | |||||
} | } | ||||
}); | }); | ||||
@@ -3,6 +3,7 @@ package cc.smtweb.framework.core.util; | |||||
import cc.smtweb.framework.core.common.AbstractEnum; | import cc.smtweb.framework.core.common.AbstractEnum; | ||||
import cc.smtweb.framework.core.common.IntEnum; | import cc.smtweb.framework.core.common.IntEnum; | ||||
import cc.smtweb.framework.core.common.StrEnum; | import cc.smtweb.framework.core.common.StrEnum; | ||||
import cc.smtweb.framework.core.db.EntityHelper; | |||||
import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||
import java.util.List; | import java.util.List; | ||||
@@ -22,7 +23,14 @@ public abstract class SqlUtil { | |||||
* @return | * @return | ||||
*/ | */ | ||||
public static String replaceTable(String sql) { | public static String replaceTable(String sql) { | ||||
return sql; | |||||
return StringUtil.myReplaceStrEx(sql, "[#", "#]", new StringUtil.IStrHanlder() { | |||||
@Override | |||||
public String work(String src) { | |||||
src = src.toUpperCase(); | |||||
return EntityHelper.getSchemaTableName(src); | |||||
} | |||||
}); | |||||
} | } | ||||
/** | /** | ||||