|
|
@@ -8,7 +8,7 @@ import cc.smtweb.framework.core.db.DbEngine; |
|
|
|
import cc.smtweb.framework.core.db.vo.ModelField; |
|
|
|
import cc.smtweb.framework.core.db.vo.ModelProject; |
|
|
|
import cc.smtweb.framework.core.db.vo.ModelTable; |
|
|
|
import cc.smtweb.framework.core.util.StringUtil; |
|
|
|
import cc.smtweb.framework.core.util.CommUtil; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.dao.DataAccessException; |
|
|
|
import org.springframework.jdbc.core.ResultSetExtractor; |
|
|
@@ -54,7 +54,7 @@ public class ModelTableCache extends AbstractCache<ModelTable> { |
|
|
|
protected List<ModelTable> loadAll() { |
|
|
|
String sql; |
|
|
|
if (!StringUtils.isEmpty(SwConsts.SysParam.RUN_PROJECTS)) { |
|
|
|
sql = " inner join " + ModelProject.ENTITY_NAME + " on tb_prj_id=prj_id where prj_module in (" + StringUtil.join(SwConsts.SysParam.RUN_PROJECTS.split(","), ",") + ")"; |
|
|
|
sql = " inner join " + ModelProject.ENTITY_NAME + " on tb_prj_id=prj_id where prj_module in (" + CommUtil.getSqlInStr(SwConsts.SysParam.RUN_PROJECTS.split(",")) + ")"; |
|
|
|
} else sql = ""; |
|
|
|
return DbEngine.getInstance().query("SELECT\n" + |
|
|
|
"t.tb_id,\n" + |
|
|
@@ -122,7 +122,7 @@ public class ModelTableCache extends AbstractCache<ModelTable> { |
|
|
|
|
|
|
|
public final String getTableName(long id) { |
|
|
|
ModelTable bean = get(id); |
|
|
|
return bean == null ? String.valueOf(id) : bean.getTitle(); |
|
|
|
return bean == null ? String.valueOf(id): bean.getTitle(); |
|
|
|
} |
|
|
|
|
|
|
|
//根据外键 |
|
|
|