|
@@ -10,33 +10,33 @@ import java.util.List; |
|
|
import java.util.Set; |
|
|
import java.util.Set; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Created by 1 at 2022-06-17 07:58:14 |
|
|
|
|
|
|
|
|
* Created by 1 at 2022-07-26 18:31:03 |
|
|
* 实体【[行政区划](SYS_AREA)】的缓存类 |
|
|
* 实体【[行政区划](SYS_AREA)】的缓存类 |
|
|
*/ |
|
|
*/ |
|
|
@SwCache(ident = "SYS_AREA", title = "行政区划") |
|
|
@SwCache(ident = "SYS_AREA", title = "行政区划") |
|
|
public class AreaCache extends AbstractEntityCache<Area> { |
|
|
public class AreaCache extends AbstractEntityCache<Area> { |
|
|
//缓存key:按父ID |
|
|
|
|
|
public final static String mk_pr = "pr"; |
|
|
|
|
|
//缓存key:按编码 |
|
|
//缓存key:按编码 |
|
|
public final static String mk_code = "code"; |
|
|
public final static String mk_code = "code"; |
|
|
|
|
|
//缓存key:按父ID |
|
|
|
|
|
public final static String mk_pr = "pr"; |
|
|
|
|
|
|
|
|
public static AreaCache getInstance() { |
|
|
public static AreaCache getInstance() { |
|
|
return CacheManager.getIntance().getCache(AreaCache.class); |
|
|
return CacheManager.getIntance().getCache(AreaCache.class); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public AreaCache() { |
|
|
public AreaCache() { |
|
|
//缓存key:按父ID |
|
|
|
|
|
regList(mk_pr, "ar_parent_id"); |
|
|
|
|
|
//缓存key:按编码 |
|
|
|
|
|
regList(mk_code, "ar_code"); |
|
|
|
|
|
|
|
|
//缓存key:按编码 M |
|
|
|
|
|
regMap(mk_code, "ar_code"); |
|
|
|
|
|
//缓存key:按父ID L |
|
|
|
|
|
regList(mk_pr, "ar_parent_id"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//缓存key:按编码 |
|
|
|
|
|
public final Area getByCode(String key) { |
|
|
|
|
|
return getByKey(mk_code, key); |
|
|
|
|
|
} |
|
|
//缓存key:按父ID |
|
|
//缓存key:按父ID |
|
|
public final Set<Area> getByPr(String key) { |
|
|
public final Set<Area> getByPr(String key) { |
|
|
return getListByKey(mk_pr, key); |
|
|
return getListByKey(mk_pr, key); |
|
|
} |
|
|
} |
|
|
//缓存key:按编码 |
|
|
|
|
|
public final Set<Area> getByCode(String key) { |
|
|
|
|
|
return getListByKey(mk_code, key); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |