网页版
This commit is contained in:
		| @ -41,7 +41,7 @@ import java.util.List; | ||||
| import java.util.Map; | ||||
| import java.util.stream.Collectors; | ||||
|  | ||||
| @Tag(name = "图标库管理") | ||||
| @Tag(name = "图标数据管理") | ||||
| @CheckAuth | ||||
| @RestController | ||||
| @RequestMapping("/iconLibrary") | ||||
|  | ||||
| @ -41,7 +41,7 @@ import java.util.List; | ||||
| import java.util.Map; | ||||
| import java.util.stream.Collectors; | ||||
|  | ||||
| @Tag(name = "军标库管理") | ||||
| @Tag(name = "军标数据管理") | ||||
| @CheckAuth | ||||
| @RestController | ||||
| @RequestMapping("/militaryLibrary") | ||||
|  | ||||
| @ -41,7 +41,7 @@ import java.time.LocalDateTime; | ||||
| import java.util.*; | ||||
| import java.util.stream.Collectors; | ||||
|  | ||||
| @Tag(name = "模型库管理") | ||||
| @Tag(name = "模型数据管理") | ||||
| @CheckAuth | ||||
| @RestController | ||||
| @RequestMapping("/modelLibrary") | ||||
|  | ||||
| @ -5,6 +5,7 @@ import cn.hutool.core.lang.UUID; | ||||
| import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||
| import com.yj.earth.annotation.RoleAccess; | ||||
| import com.yj.earth.business.domain.WebSource; | ||||
| import com.yj.earth.business.service.ModelLibraryService; | ||||
| import com.yj.earth.business.service.SourceService; | ||||
| import com.yj.earth.business.service.WebSourceService; | ||||
| import com.yj.earth.common.util.ApiResponse; | ||||
| @ -25,7 +26,7 @@ import java.util.List; | ||||
| import java.util.stream.Collectors; | ||||
| import java.util.stream.Stream; | ||||
|  | ||||
| @Tag(name = "网页版独有接口") | ||||
| @Tag(name = "网页独有接口") | ||||
| @RestController | ||||
| @RequestMapping("/webSource") | ||||
| public class WebSourceController { | ||||
| @ -35,6 +36,8 @@ public class WebSourceController { | ||||
|     @Resource | ||||
|     private WebSourceService webSourceService; | ||||
|     @Resource | ||||
|     private ModelLibraryController modelLibraryController; | ||||
|     @Resource | ||||
|     private SourceService sourceService; | ||||
|     private static final List<String> SUPPORT_EXTENSIONS = Arrays.asList("clt", "mbtiles", "pak", "pbf", "model"); | ||||
|  | ||||
| @ -60,7 +63,7 @@ public class WebSourceController { | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     @Operation(summary = "获取所有文件") | ||||
|     @Operation(summary = "获取资源") | ||||
|     @GetMapping("/list") | ||||
|     public ApiResponse list(@RequestParam(required = false) @Parameter(description = "文件类型") String type) { | ||||
|         if (type != null) { | ||||
| @ -94,6 +97,11 @@ public class WebSourceController { | ||||
|         if (!webSource.getType().equals("pbf") && !webSource.getType().equals("model")) { | ||||
|             addModelSourceIfNotExists(filePath); | ||||
|         } | ||||
|  | ||||
|         // 如果是模型文件则直接调用导入 | ||||
|         if (webSource.getType().equals("model")) { | ||||
|             modelLibraryController.importModelLibrary(filePath); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|  | ||||
| @ -3,14 +3,6 @@ package com.yj.earth.business.service; | ||||
| import com.yj.earth.business.domain.ModelLibrary; | ||||
| import com.baomidou.mybatisplus.extension.service.IService; | ||||
|  | ||||
| /** | ||||
|  * <p> | ||||
|  *  服务类 | ||||
|  * </p> | ||||
|  * | ||||
|  * @author 周志雄 | ||||
|  * @since 2025-09-17 | ||||
|  */ | ||||
| public interface ModelLibraryService extends IService<ModelLibrary> { | ||||
|  | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 ZZX9599
					ZZX9599