zhou-hao 7 år sedan
förälder
incheckning
e0dd32f515

+ 7 - 0
hsweb-system/hsweb-system-organizational/hsweb-system-organizational-service/hsweb-system-organizational-service-simple/src/main/java/org/hswebframework/web/service/organizational/simple/SimpleDistrictService.java

@@ -1,6 +1,7 @@
 package org.hswebframework.web.service.organizational.simple;
 
 import org.hswebframework.web.commons.entity.DataStatus;
+import org.hswebframework.web.commons.entity.Entity;
 import org.hswebframework.web.dao.organizational.DistrictDao;
 import org.hswebframework.web.entity.organizational.DistrictEntity;
 import org.hswebframework.web.entity.organizational.OrganizationalEntity;
@@ -77,6 +78,12 @@ public class SimpleDistrictService extends AbstractTreeSortService<DistrictEntit
         return createQuery().where(DistrictEntity.code, code).single();
     }
 
+    @Override
+    @Cacheable(key = "'all'")
+    public List<DistrictEntity> select(Entity param) {
+        return createQuery().where().orderByAsc(DistrictEntity.sortIndex).listNoPaging();
+    }
+
     @Override
     @CacheEvict(allEntries = true)
     public int updateBatch(Collection<DistrictEntity> data) {