|
|
@@ -5,9 +5,8 @@ import com.ningdatech.basic.util.CollUtils; |
|
|
|
import com.ningdatech.pmapi.AppTests; |
|
|
|
import com.ningdatech.pmapi.common.helper.RegionCacheHelper; |
|
|
|
import com.ningdatech.pmapi.sys.model.entity.Region; |
|
|
|
import org.junit.Test; |
|
|
|
import org.junit.jupiter.api.Test; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
@@ -22,13 +21,15 @@ import java.util.concurrent.atomic.AtomicLong; |
|
|
|
* @author WendyYang |
|
|
|
* @since 16:57 2023/3/1 |
|
|
|
*/ |
|
|
|
public class IRegionServiceTest extends AppTests { |
|
|
|
class IRegionServiceTest extends AppTests { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private RegionCacheHelper regionCacheHelper; |
|
|
|
@Autowired |
|
|
|
private IRegionService regionService; |
|
|
|
|
|
|
|
@Test |
|
|
|
public void init() { |
|
|
|
public void test1() { |
|
|
|
AtomicLong idIncr = new AtomicLong(1); |
|
|
|
Map<Integer, List<Region>> map = CollUtils.group(regionService.list(), Region::getRegionLevel); |
|
|
|
regionService.remove(null); |
|
|
@@ -54,5 +55,10 @@ public class IRegionServiceTest extends AppTests { |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
public void test2() { |
|
|
|
System.out.println(regionCacheHelper.getDisplayName("330100", 2)); |
|
|
|
System.out.println(regionCacheHelper.getFullDisplayName("330102", 3)); |
|
|
|
} |
|
|
|
|
|
|
|
} |