copy from blade-auth/src/main/java/org/springblade/auth/AuthApplication.java
copy to blade-auth/src/main/java/org/springblade/system/excel/RegionImporter.java
| File was copied from blade-auth/src/main/java/org/springblade/auth/AuthApplication.java |
| | |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.auth; |
| | | package org.springblade.system.excel; |
| | | |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springblade.core.excel.support.ExcelImporter; |
| | | import org.springblade.system.service.IRegionService; |
| | | |
| | | import org.springblade.core.cloud.client.BladeCloudApplication; |
| | | import org.springblade.core.launch.BladeApplication; |
| | | import org.springblade.core.launch.constant.AppConstant; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 用户认证服务器 |
| | | * 行政区划数据导入类 |
| | | * |
| | | * @author Chill |
| | | */ |
| | | @BladeCloudApplication |
| | | public class AuthApplication { |
| | | @RequiredArgsConstructor |
| | | public class RegionImporter implements ExcelImporter<RegionExcel> { |
| | | |
| | | public static void main(String[] args) { |
| | | BladeApplication.run(AppConstant.APPLICATION_AUTH_NAME, AuthApplication.class, args); |
| | | private final IRegionService service; |
| | | private final Boolean isCovered; |
| | | |
| | | @Override |
| | | public void save(List<RegionExcel> data) { |
| | | service.importRegion(data, isCovered); |
| | | } |
| | | |
| | | } |