Browse Source

fix:增加特效

liaoyitao 4 months ago
parent
commit
60c6a7418a

+ 36 - 0
src/main/java/com/lqkj/link/module/zone/controller/ZoneInfoController.java

@@ -5,6 +5,7 @@ import com.alibaba.fastjson2.JSONObject;
5 5
 import com.lqkj.link.message.MessageBean;
6 6
 import com.lqkj.link.message.MessageListBean;
7 7
 import com.lqkj.link.module.base.service.BaseService;
8
+import com.lqkj.link.module.bulletin.domain.BulletinInfo;
8 9
 import com.lqkj.link.module.jwt.service.JwtService;
9 10
 import com.lqkj.link.module.zone.domain.ZoneInfo;
10 11
 import com.lqkj.link.module.zone.service.ZoneInfoService;
@@ -341,5 +342,40 @@ public class ZoneInfoController {
341 342
         return MessageBean.ok(zoneInfoService.getSpawnPointList(zoneId), "获取出生点列表");
342 343
     }
343 344
 
345
+    @Operation(
346
+            summary = "保存作品",
347
+            description = "保存作品",
348
+            requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
349
+                    description = "通知公告信息实体",
350
+                    required = true,
351
+                    content = @Content(
352
+                            mediaType = "application/json",
353
+                            schema = @Schema(implementation = BulletinInfo.class)
354
+                    )
355
+            ))
356
+    @PostMapping("/save")
357
+    public MessageBean<String> save(@RequestBody ZoneInfo zoneInfo) {
358
+        zoneInfoService.save(zoneInfo);
359
+        return MessageBean.ok();
360
+    }
361
+
362
+
363
+    @Operation(
364
+            summary = "作品详情",
365
+            description = "作品详情",
366
+            parameters = {
367
+                    @Parameter(name = "zoneId", description = "作品ID", required = true)
368
+            }
369
+    )
370
+    @PostMapping("/zoneDetails")
371
+    public MessageBean<ZoneInfo> zoneDetails(@RequestParam Integer zoneId) {
372
+
373
+        return MessageBean.ok(zoneInfoService.zoneDetails(zoneId), "作品详情");
374
+    }
375
+
376
+
377
+
378
+
379
+
344 380
 
345 381
 }

+ 4 - 0
src/main/java/com/lqkj/link/module/zone/domain/GeomInfo.java

@@ -66,6 +66,10 @@ public class GeomInfo {
66 66
     private Boolean navigation;
67 67
     @Column(name = "navigation_end")
68 68
     private String navigationEnd;
69
+    @Column(name = "type_number")
70
+    private Integer typeNumber;
71
+    @Column(name = "static_id")
72
+    private Integer staticId;
69 73
 
70 74
     public JSONObject getLocation() {
71 75
         if (location == null) return trans;

+ 3 - 0
src/main/java/com/lqkj/link/module/zone/domain/ZoneInfo.java

@@ -59,4 +59,7 @@ public class ZoneInfo {
59 59
     private String templateFilePath;
60 60
     @Column(name = "template_use")
61 61
     private Integer templateUse;
62
+    @Column(name = "effect_address")
63
+    @Schema(description = "模板文件路径")
64
+    private String effectAddress;
62 65
 }

+ 9 - 1
src/main/java/com/lqkj/link/module/zone/service/ZoneInfoService.java

@@ -304,7 +304,7 @@ public class ZoneInfoService {
304 304
 
305 305
         ZoneInfo zoneInfo = new ZoneInfo(null, userInfo.getUserId(), name, template == null ? null : template.getInitLocation(),
306 306
                 template == null ? null : template.getThumbnail(), 0, new Date(), 0, 0,
307
-                null, null, 0);
307
+                null, null, 0,null);
308 308
         ZoneInfo newInfo = zoneInfoRepository.save(zoneInfo);
309 309
 
310 310
         if (templateId != null) {
@@ -361,4 +361,12 @@ public class ZoneInfoService {
361 361
         }
362 362
         return maps;
363 363
     }
364
+
365
+    public void save(ZoneInfo zoneInfo) {
366
+        zoneInfoRepository.save(zoneInfo);
367
+    }
368
+
369
+    public ZoneInfo zoneDetails(Integer zoneId) {
370
+        return zoneInfoRepository.findById(zoneId).get();
371
+    }
364 372
 }

+ 11 - 0
src/main/resources/db/migration/V5__1.0.0.sql

@@ -0,0 +1,11 @@
1
+ALTER TABLE zone_info
2
+add COLUMN if not exists effect_address VARCHAR(255);
3
+comment on column zone_info.effect_address is '特效文件地址';
4
+
5
+ALTER TABLE geom_info
6
+    add COLUMN if not exists type_number int default 0;
7
+comment on column geom_info.type_number is '类型编号0:模型 1:特效';
8
+
9
+ALTER TABLE geom_info
10
+    add COLUMN if not exists static_id int;
11
+comment on column geom_info.static_id is '类型编号';