郑根木 před 2 roky
rodič
revize
d183b8e62f
3 změnil soubory, kde provedl 11 přidání a 5 odebrání
  1. +3
    -1
      smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/CacheManager.java
  2. +7
    -3
      smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/impl/DefaultEntity.java
  3. +1
    -1
      smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/vo/ModelDatabase.java

+ 3
- 1
smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/cache/CacheManager.java Zobrazit soubor

@@ -76,7 +76,9 @@ public class CacheManager {
return 0;//getPluginIndex(o1) - getPluginIndex(o2);
});
for (AbstractCache cache : listCache) {
cache.init();
if (cache.isNotInited()) {
cache.init();
}
}
//按表加载并初始化
for (ModelTable table : ModelTableCache.getInstance().getAll()) {


+ 7
- 3
smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/impl/DefaultEntity.java Zobrazit soubor

@@ -13,16 +13,20 @@ import java.io.Serializable;
*/
public class DefaultEntity extends BaseBean implements Serializable, Cloneable {
//表名
private String _def_table_name;
private final static String tableNameKey = "_def_table_name";

public DefaultEntity() {}

public DefaultEntity(String _def_table_name) {
this._def_table_name = _def_table_name;
this.put(tableNameKey,_def_table_name);
}

public ModelTable getModelTable() {
return ModelTableCache.getInstance().getByName(_def_table_name);
return ModelTableCache.getInstance().getByName(getTableName());
}

public String getTableName() {
return getStr(tableNameKey);
}

//根据实体定义,设默认值


+ 1
- 1
smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/db/vo/ModelDatabase.java Zobrazit soubor

@@ -13,7 +13,7 @@ public class ModelDatabase extends DefaultEntity {
public final static String ENTITY_NAME = "ASP_MODEL_DATABASE";

public ModelDatabase() {
super();
super(ENTITY_NAME);
}

public long getId() {


Načítá se…
Zrušit
Uložit