文旅相关逻辑集成
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>tourism-center</artifactId>
|
||||
<groupId>com.zlt</groupId>
|
||||
<version>6.0.0</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>tourism-open-api</artifactId>
|
||||
<name>cultural-tourism-open-api</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
||||
<properties>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.zlt</groupId>
|
||||
<artifactId>tourism-core</artifactId>
|
||||
<version>6.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
|
||||
<imageTags>
|
||||
<imageTag>2023091902</imageTag>
|
||||
</imageTags>
|
||||
<forceTags>true</forceTags>
|
||||
<!-- <dockerHost>${docker.host}</dockerHost>-->
|
||||
<!-- <baseImage>${docker.baseImage}</baseImage>-->
|
||||
<!-- <volumes>${docker.volumes}</volumes>-->
|
||||
<env>
|
||||
<JAVA_OPTS>${docker.java.opts}</JAVA_OPTS>
|
||||
</env>
|
||||
<entryPoint>["sh","-c","java $JAVA_OPTS ${docker.java.security.egd} -jar
|
||||
/${project.build.finalName}.jar"]
|
||||
</entryPoint>
|
||||
<!--是否推送到docker私有仓库-->
|
||||
<!-- <pushImage>true</pushImage>
|
||||
<registryUrl>https://hub.ikingtec.com:5000</registryUrl>-->
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
<finalName>${project.artifactId}-release</finalName>
|
||||
</build>
|
||||
</project>
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
package com.zlt.tourism;
|
||||
|
||||
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import com.alibaba.fastjson.support.config.FastJsonConfig;
|
||||
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
|
||||
import com.central.common.lb.annotation.EnableBaseFeignInterceptor;
|
||||
import com.central.common.lb.annotation.EnableFeignInterceptor;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author fucj
|
||||
* @doc 文旅服务启动类
|
||||
*/
|
||||
@EnableFeignClients(basePackages = {"com.central", "com.zlt"})
|
||||
@EnableFeignInterceptor
|
||||
@EnableBaseFeignInterceptor
|
||||
@EnableDiscoveryClient
|
||||
@EnableTransactionManagement
|
||||
@SpringBootApplication(scanBasePackages = {"com.zlt.tourism"}, exclude = DruidDataSourceAutoConfigure.class)
|
||||
public class CulturalTourismOpenApiApplication extends SpringBootServletInitializer implements ApplicationRunner {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
SpringApplication app = new SpringApplication(new Class[]{CulturalTourismOpenApiApplication.class});
|
||||
Environment env = app.run(args).getEnvironment();
|
||||
String protocol = "http";
|
||||
if (env.getProperty("server.ssl.key-store") != null) {
|
||||
protocol = "https";
|
||||
}
|
||||
|
||||
String contextPath = "";
|
||||
if (env.getProperty("server.servlet.context-path") != null) {
|
||||
contextPath = env.getProperty("server.servlet.context-path");
|
||||
}
|
||||
|
||||
String configServerStatus = env.getProperty("configserver.status");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
|
||||
return builder.sources(CulturalTourismOpenApiApplication.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) {
|
||||
}
|
||||
|
||||
@Bean
|
||||
public HttpMessageConverters fastJsonHttpMessageConverters() {
|
||||
// 1. 需要定义一个converter转换消息的对象
|
||||
FastJsonHttpMessageConverter fasHttpMessageConverter =
|
||||
new FastJsonHttpMessageConverter();
|
||||
|
||||
// 2. 添加fastjson的配置信息,比如:是否需要格式化返回的json的数据
|
||||
FastJsonConfig fastJsonConfig = new FastJsonConfig();
|
||||
fastJsonConfig.setSerializerFeatures(SerializerFeature.PrettyFormat, SerializerFeature.DisableCircularReferenceDetect);
|
||||
|
||||
// 3. 在converter中添加配置信息
|
||||
fasHttpMessageConverter.setFastJsonConfig(fastJsonConfig);
|
||||
HttpMessageConverter<?> converter = fasHttpMessageConverter;
|
||||
//解决中文乱码
|
||||
List<MediaType> fastMediaTypes = new ArrayList<>();
|
||||
fastMediaTypes.add(MediaType.APPLICATION_JSON_UTF8);
|
||||
fasHttpMessageConverter.setSupportedMediaTypes(fastMediaTypes);
|
||||
|
||||
return new HttpMessageConverters(converter);
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.zlt.tourism.api.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @author zlt
|
||||
* @date 2019/8/5
|
||||
*/
|
||||
@Configuration
|
||||
public class WebMvcConfig {
|
||||
}
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
package com.zlt.tourism.api.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.central.common.context.LoginUserContextHolder;
|
||||
import com.central.common.model.LoginAppUser;
|
||||
import com.central.common.model.Result;
|
||||
import com.zlt.tourism.api.query.GetByIdQuery;
|
||||
import com.zlt.tourism.api.vo.BiaxVideoBaseVO;
|
||||
import com.zlt.tourism.manager.BiaxVideoManager;
|
||||
import com.zlt.tourism.util.ParamsErrorUtil;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 双轴视频控制器
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 双轴视频控制器
|
||||
* @create 2024/7/18 16:13
|
||||
**/
|
||||
@Tag(name = "双轴视频管理")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/tourism/open/api/biax/video/")
|
||||
public class BiaxVideoController {
|
||||
|
||||
/**
|
||||
* 双轴业务类
|
||||
*/
|
||||
@Autowired
|
||||
private BiaxVideoManager biaxVideoManager;
|
||||
|
||||
|
||||
/**
|
||||
* 根据主键ID获取实体
|
||||
*
|
||||
* @param query 主键ID
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "根据主键ID获取实体")
|
||||
@PostMapping(value = "getById", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public Result<BiaxVideoBaseVO> getEntity(@Valid @RequestBody GetByIdQuery query, BindingResult paramResult) {
|
||||
if (paramResult.hasErrors()) {
|
||||
Map<String, String> map = ParamsErrorUtil.getErrors(paramResult);
|
||||
return Result.failed(map.values().toString());
|
||||
}
|
||||
LoginAppUser user = LoginUserContextHolder.getUser();
|
||||
if (user == null || user.getId() == null) {
|
||||
return Result.failed("获取登录用户失败,请重新登录");
|
||||
}
|
||||
Long id = null;
|
||||
if (StrUtil.isNotEmpty(query.getId())) {
|
||||
id = Long.parseLong(query.getId());
|
||||
}
|
||||
BiaxVideoBaseVO model = biaxVideoManager.getEntity(id);
|
||||
return Result.succeed(model);
|
||||
}
|
||||
}
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
package com.zlt.tourism.api.controller;
|
||||
|
||||
import com.central.common.context.LoginUserContextHolder;
|
||||
import com.central.common.model.LoginAppUser;
|
||||
import com.zlt.tourism.core.StationResult;
|
||||
import com.zlt.tourism.dto.device.DeviceListQuery;
|
||||
import com.zlt.tourism.dto.org.OrganizationQuery;
|
||||
import com.zlt.tourism.feign.StationWebService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 设备控制器
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 设备控制器
|
||||
* @create 2024/7/4 14:37
|
||||
**/
|
||||
@Tag(name = "设备管理")
|
||||
@RestController
|
||||
@RequestMapping("/tourism/open/api/device/")
|
||||
@Slf4j
|
||||
public class DeviceController {
|
||||
|
||||
/**
|
||||
* Station-Web远程调用业务类
|
||||
*/
|
||||
@Autowired
|
||||
private StationWebService stationWebService;
|
||||
|
||||
/**
|
||||
* 获取设备列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "查询指定范围内的设备")
|
||||
@PostMapping(value = "query")
|
||||
public StationResult queryDevice() {
|
||||
LoginAppUser user = LoginUserContextHolder.getUser();
|
||||
if (user != null && user.getId() != null) {
|
||||
DeviceListQuery query = new DeviceListQuery();
|
||||
query.setVersion("1.1");
|
||||
query.setChannel(1);
|
||||
query.setIndustryType(10);
|
||||
StationResult result = stationWebService.queryDevice(query);
|
||||
return result;
|
||||
} else {
|
||||
return StationResult.error("获取当前用户失败!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "查询指定范围内的设备树形列表")
|
||||
@PostMapping(value = "organization")
|
||||
public StationResult getOrganizationTree() {
|
||||
LoginAppUser user = LoginUserContextHolder.getUser();
|
||||
if (user != null && user.getId() != null) {
|
||||
OrganizationQuery query = new OrganizationQuery();
|
||||
query.setVersion("1.1");
|
||||
query.setChannel(1);
|
||||
query.setIndustryType(10);
|
||||
StationResult result = stationWebService.getOrganizationList(query);
|
||||
return result;
|
||||
} else {
|
||||
return StationResult.error("获取当前用户失败!");
|
||||
}
|
||||
}
|
||||
}
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
package com.zlt.tourism.api.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.central.common.model.Result;
|
||||
import com.central.common.utils.StringUtils;
|
||||
import com.zlt.tourism.api.dto.PhoneMobileCodeDTO;
|
||||
import com.zlt.tourism.dto.user.LoginDTO;
|
||||
import com.zlt.tourism.feign.UaaService;
|
||||
import com.zlt.tourism.service.TourismUserService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.HttpRequestMethodNotSupportedException;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* APP登录控制器
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description APP登录控制器
|
||||
* @create 2024/7/3 16:10
|
||||
**/
|
||||
@Tag(name = "APP登录")
|
||||
@RestController
|
||||
@RequestMapping("/tourism/open/api/sys/")
|
||||
@Slf4j
|
||||
public class LoginController {
|
||||
|
||||
/**
|
||||
* 认证服务
|
||||
*/
|
||||
@Autowired
|
||||
private UaaService uaaService;
|
||||
|
||||
@Resource
|
||||
TourismUserService tourismUserService;
|
||||
|
||||
/**
|
||||
* 登录
|
||||
*
|
||||
* @param req 登录实体
|
||||
* @return
|
||||
* @throws HttpRequestMethodNotSupportedException
|
||||
*/
|
||||
@Operation(summary = "用户登录")
|
||||
@PostMapping(value = "login")
|
||||
public Object login(@Valid @RequestBody LoginDTO req) throws HttpRequestMethodNotSupportedException {
|
||||
log.info("用户登录请求:{}", JSON.toJSONString(req));
|
||||
return tourismUserService.userLoginAndRegister(req);
|
||||
}
|
||||
|
||||
/**
|
||||
* 退出登录
|
||||
*
|
||||
* @param token token
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "用户退出登录")
|
||||
@PostMapping(value = "/logout")
|
||||
public Result<String> logOut(@RequestHeader(value = "Authorization") String token) {
|
||||
if (StringUtils.isNotBlank(token)) {
|
||||
return uaaService.logOut(token);
|
||||
} else {
|
||||
return Result.failed("token不存在");
|
||||
}
|
||||
}
|
||||
|
||||
@Operation(summary = "根据手机号获取验证码")
|
||||
@PostMapping(value = "/getCodeByPhone")
|
||||
public Result<String> getCodeByPhone(@Valid @RequestBody PhoneMobileCodeDTO req) {
|
||||
log.info("用户获取验证码的参数是:{}", JSON.toJSONString(req));
|
||||
return tourismUserService.getCodeByPhone(req.getMobile());
|
||||
}
|
||||
}
|
||||
+218
@@ -0,0 +1,218 @@
|
||||
package com.zlt.tourism.api.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.central.common.context.LoginUserContextHolder;
|
||||
import com.central.common.model.LoginAppUser;
|
||||
import com.central.common.model.Result;
|
||||
import com.central.common.model.SysUser;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.zlt.tourism.core.StationResult;
|
||||
import com.zlt.tourism.dto.mission.*;
|
||||
import com.zlt.tourism.feign.StationWebService;
|
||||
import com.zlt.tourism.manager.MissionManager;
|
||||
import com.zlt.tourism.model.iking.AudioFileInfoEntity;
|
||||
import com.zlt.tourism.query.AudioFileRequestQuery;
|
||||
import com.zlt.tourism.query.MissionImagesPageQuery;
|
||||
import com.zlt.tourism.query.MissionPageQuery;
|
||||
import com.zlt.tourism.service.IkMissionService;
|
||||
import com.zlt.tourism.service.MissionImageService;
|
||||
import com.zlt.tourism.util.ParamsErrorUtil;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 任务管理
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 任务管理
|
||||
* @create 2024/8/3 16:14
|
||||
**/
|
||||
@Tag(name = "任务管理")
|
||||
@RestController
|
||||
@RequestMapping("/tourism/open/api/mission/")
|
||||
@Slf4j
|
||||
public class MissionController {
|
||||
|
||||
/**
|
||||
* StationWeb feign客户端类
|
||||
*/
|
||||
@Autowired
|
||||
private StationWebService stationWebService;
|
||||
|
||||
/**
|
||||
* 任务业务类
|
||||
*/
|
||||
@Autowired
|
||||
private MissionManager missionManager;
|
||||
|
||||
@Resource
|
||||
private IkMissionService ikMissionService;
|
||||
|
||||
@Resource
|
||||
private MissionImageService missionImageService;
|
||||
|
||||
/**
|
||||
* 执行任务
|
||||
*
|
||||
* @param token token
|
||||
* @param model 表单
|
||||
* @param paramResult 表单验证结果
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "执行任务")
|
||||
@PostMapping("/executeMission")
|
||||
public Result execMission(@RequestHeader("Authorization") String token, @Valid @RequestBody ExecuteMissionDTO model, BindingResult paramResult) {
|
||||
if (paramResult.hasErrors()) {
|
||||
Map<String, String> map = ParamsErrorUtil.getErrors(paramResult);
|
||||
return Result.failed(map.values().toString());
|
||||
}
|
||||
Long missionId = ikMissionService.dockExecuteMission(model);
|
||||
if(Objects.nonNull(missionId)){
|
||||
return Result.succeed("执行成功!");
|
||||
}
|
||||
return Result.failed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询任务图片分页
|
||||
*
|
||||
* @param query 查询条件
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "查询任务图片分页")
|
||||
@ApiIgnore
|
||||
@PostMapping(value = "/image/pageList", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public Result<PageInfo<MissionImageDTO>> getImagePageList(@Valid @RequestBody ImagePageQuery query, BindingResult paramResult) {
|
||||
if (paramResult.hasErrors()) {
|
||||
Map<String, String> map = ParamsErrorUtil.getErrors(paramResult);
|
||||
return Result.failed(map.values().toString());
|
||||
}
|
||||
LoginAppUser user = LoginUserContextHolder.getUser();
|
||||
if (user == null || user.getId() == null) {
|
||||
return Result.failed("获取登录用户失败,请重新登录");
|
||||
}
|
||||
PageInfo<MissionImageDTO> pageInfo = missionManager.getImagePageList(query);
|
||||
return Result.succeed(pageInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询任务视频分页、
|
||||
*
|
||||
* @param query 查询条件
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "查询任务视频分页")
|
||||
@PostMapping(value = "/video/pageList", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public Result<PageInfo<MissionRecordVideoDTO>> getVideoPageList(@Valid @RequestBody VideoPageQuery query, BindingResult paramResult) {
|
||||
if (paramResult.hasErrors()) {
|
||||
Map<String, String> map = ParamsErrorUtil.getErrors(paramResult);
|
||||
return Result.failed(map.values().toString());
|
||||
}
|
||||
SysUser user = LoginUserContextHolder.getUser();
|
||||
if (user == null || user.getId() == null) {
|
||||
return Result.failed("获取登录用户失败,请重新登录");
|
||||
}
|
||||
PageInfo<MissionRecordVideoDTO> pageInfo = missionManager.getVideoPageList(query);
|
||||
return Result.succeed(pageInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增或编辑任务
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "新增或编辑任务")
|
||||
@ApiIgnore
|
||||
@PostMapping(value = "saveOrUpdateMission")
|
||||
public StationResult saveOrUpdateMission(@RequestHeader("Authorization") String token, @Valid @RequestBody CreateOrUpdateMissionRequestDTO model, BindingResult paramResult) {
|
||||
if (paramResult.hasErrors()) {
|
||||
Map<String, String> map = ParamsErrorUtil.getErrors(paramResult);
|
||||
return StationResult.error(map.values().toString());
|
||||
}
|
||||
SysUser user = LoginUserContextHolder.getUser();
|
||||
if (user == null || user.getId() == null) {
|
||||
return StationResult.error("获取当前用户失败!");
|
||||
}
|
||||
StationResult result = stationWebService.createOrUpdateMission(token, model);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取任务回放分页
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "获取任务回放分页")
|
||||
@PostMapping("history/pageList")
|
||||
public StationResult getTrackMissionList(@RequestBody @Valid MissionTrackListQuery query, BindingResult paramResult){
|
||||
if (paramResult.hasErrors()) {
|
||||
Map<String, String> map = ParamsErrorUtil.getErrors(paramResult);
|
||||
return StationResult.error(map.values().toString());
|
||||
}
|
||||
return stationWebService.getTrackMissionList(query);
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "根据用户获取正在执行的任务分页")
|
||||
@PostMapping(value = "/pageList", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public Result<PageInfo<MissionPageDTO>> getMissionByUserId(@Valid @RequestBody MissionPageQuery query) {
|
||||
PageInfo<MissionPageDTO> pageInfo = ikMissionService.getMissionPage(query);
|
||||
return Result.succeed(pageInfo);
|
||||
}
|
||||
|
||||
@Operation(summary = "根据任务获取图片分页")
|
||||
@PostMapping(value = "/pageList/images", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public Result<PageInfo<MissionImageDTO>> getImageByMissionId(@Valid @RequestBody MissionImagesPageQuery query) {
|
||||
if(Objects.isNull(query.getMissionId())){
|
||||
return Result.failed("任务id不能为空");
|
||||
}
|
||||
PageInfo<MissionImageDTO> pageInfo = missionImageService.getMissionImageById(query);
|
||||
return Result.succeed(pageInfo);
|
||||
}
|
||||
|
||||
@Operation(summary = "获取用户任务图片列表")
|
||||
@ApiIgnore
|
||||
@PostMapping(value = "/images/list", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public Result<PageInfo<MissionImageDTO>> getImageByMissionId(@Valid @RequestBody MissionPageQuery query) {
|
||||
PageInfo<MissionImageDTO> pageInfo = missionImageService.getMissionImageByUserId(query);
|
||||
return Result.succeed(pageInfo);
|
||||
}
|
||||
|
||||
@Operation(summary = "获取用户相册分页")
|
||||
@PostMapping(value = "/getImage/user/page", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public Result<PageInfo<MissionImageDTO>> getImageByUserId(@Valid @RequestBody MissionPageQuery query) {
|
||||
PageInfo<MissionImageDTO> pageInfo = missionImageService.getImagesByUserId(query);
|
||||
return Result.succeed(pageInfo);
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "定时修改任务状态")
|
||||
@PostMapping(value = "/update/mission/status", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public Boolean updateMissionStatus(@Valid @RequestBody MissionStatusUpdateDTO query) {
|
||||
return ikMissionService.updateMissionStatus(query);
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "喊话器音频文件 列表")
|
||||
@PostMapping("/audio/file/list")
|
||||
@ResponseBody
|
||||
public Result uploadFile(@Valid @RequestBody AudioFileRequestQuery requestParam) {
|
||||
log.info("喊话器音频文件 列表 入参={}", JSON.toJSONString(requestParam));
|
||||
List<AudioFileInfoEntity> result = ikMissionService.audioList(requestParam);
|
||||
// log.info("喊话器音频文件 列表出参={}", JSON.toJSONString(result));
|
||||
return Result.succeed(result);
|
||||
}
|
||||
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.zlt.tourism.api.controller;
|
||||
|
||||
import com.central.common.context.LoginUserContextHolder;
|
||||
import com.central.common.model.LoginAppUser;
|
||||
import com.zlt.tourism.core.StationResult;
|
||||
import com.zlt.tourism.dto.other.ModelListQuery;
|
||||
import com.zlt.tourism.feign.StationWebService;
|
||||
import com.zlt.tourism.util.ParamsErrorUtil;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 模型管理
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 模型管理
|
||||
* @create 2024/8/29 13:13
|
||||
**/
|
||||
@Tag(name = "模型管理")
|
||||
@RestController
|
||||
@RequestMapping("/tourism/open/api/models/")
|
||||
@Slf4j
|
||||
public class ModelsController {
|
||||
|
||||
/**
|
||||
* StationWeb feign客户端类
|
||||
*/
|
||||
@Autowired
|
||||
private StationWebService stationWebService;
|
||||
|
||||
/**
|
||||
* 查询模型列表
|
||||
*
|
||||
* @param query 查询条件
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "查询模型列表")
|
||||
@PostMapping(value = "/list", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public StationResult getList(@Valid @RequestBody ModelListQuery query, BindingResult paramResult) {
|
||||
if (paramResult.hasErrors()) {
|
||||
Map<String, String> map = ParamsErrorUtil.getErrors(paramResult);
|
||||
return StationResult.error(map.values().toString());
|
||||
}
|
||||
LoginAppUser user = LoginUserContextHolder.getUser();
|
||||
if (user == null || user.getId() == null) {
|
||||
return StationResult.error("获取登录用户失败,请重新登录");
|
||||
}
|
||||
StationResult result = stationWebService.queryModel(query);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
package com.zlt.tourism.api.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.central.common.context.LoginUserContextHolder;
|
||||
import com.central.common.model.LoginAppUser;
|
||||
import com.central.common.model.Result;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.zlt.tourism.api.dto.MyFavoriteAddDTO;
|
||||
import com.zlt.tourism.api.dto.MyFavoriteDeleteDTO;
|
||||
import com.zlt.tourism.api.query.MyFavoritePageQuery;
|
||||
import com.zlt.tourism.api.vo.MyFavoriteScenicSpotPageVO;
|
||||
import com.zlt.tourism.manager.ScenicSpotManager;
|
||||
import com.zlt.tourism.model.tourism.MyFavoriteEntity;
|
||||
import com.zlt.tourism.service.MyFavoriteService;
|
||||
import com.zlt.tourism.util.ParamsErrorUtil;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 我的收藏控制器
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 我的收藏控制器
|
||||
* @create 2024/7/20 8:49
|
||||
**/
|
||||
@Tag(name = "我的收藏")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/tourism/open/api/myFavorite/")
|
||||
public class MyFavoriteController {
|
||||
|
||||
/**
|
||||
* 我的收藏业务类
|
||||
*/
|
||||
@Autowired
|
||||
private MyFavoriteService myFavoriteService;
|
||||
|
||||
/**
|
||||
* 景点业务类
|
||||
*/
|
||||
@Autowired
|
||||
private ScenicSpotManager scenicSpotManager;
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param model 实体
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "收藏")
|
||||
@PostMapping(value = "add", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public Result add(@Valid @RequestBody MyFavoriteAddDTO model, BindingResult paramResult) {
|
||||
if (paramResult.hasErrors()) {
|
||||
Map<String, String> map = ParamsErrorUtil.getErrors(paramResult);
|
||||
return Result.failed(map.values().toString());
|
||||
}
|
||||
LoginAppUser user = LoginUserContextHolder.getUser();
|
||||
if (user == null || user.getId() == null) {
|
||||
return Result.failed("获取登录用户失败,请重新登录");
|
||||
}
|
||||
MyFavoriteEntity myFavoriteEntity = new MyFavoriteEntity();
|
||||
myFavoriteEntity.setScenicSpotId(model.getScenicSpotId());
|
||||
myFavoriteEntity.setUserId(user.getId());
|
||||
boolean existByUserId = myFavoriteService.existByUserId(myFavoriteEntity);
|
||||
if (existByUserId) {
|
||||
return Result.failed("该景点您已收藏过,操作失败!");
|
||||
}
|
||||
boolean result = myFavoriteService.save(myFavoriteEntity);
|
||||
return result ? Result.succeed("操作成功!") : Result.failed("操作失败!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param model 景点ID
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "取消收藏")
|
||||
@PostMapping(value = "deleteByScenicSpotId", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public Result deleteByScenicSpotId(@Valid @RequestBody MyFavoriteDeleteDTO model, BindingResult paramResult) {
|
||||
if (paramResult.hasErrors()) {
|
||||
Map<String, String> map = ParamsErrorUtil.getErrors(paramResult);
|
||||
return Result.failed(map.values().toString());
|
||||
}
|
||||
LoginAppUser user = LoginUserContextHolder.getUser();
|
||||
if (user == null || user.getId() == null) {
|
||||
return Result.failed("获取登录用户失败,请重新登录");
|
||||
}
|
||||
LambdaQueryWrapper<MyFavoriteEntity> qw = new LambdaQueryWrapper<>();
|
||||
qw.eq(MyFavoriteEntity::getScenicSpotId, model.getScenicSpotId());
|
||||
qw.eq(MyFavoriteEntity::getUserId, user.getId());
|
||||
boolean result = myFavoriteService.remove(qw);
|
||||
return result ? Result.succeed("操作成功!") : Result.failed("操作失败!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分页列表
|
||||
*
|
||||
* @param query 查询条件
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "根据查询对象,获取分页列表")
|
||||
@PostMapping(value = "pageList", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public Result<PageInfo<MyFavoriteScenicSpotPageVO>> getPageList(@RequestBody MyFavoritePageQuery query) {
|
||||
LoginAppUser user = LoginUserContextHolder.getUser();
|
||||
if (user == null || user.getId() == null) {
|
||||
return Result.failed("获取登录用户失败,请重新登录");
|
||||
}
|
||||
PageInfo<MyFavoriteScenicSpotPageVO> pageList = scenicSpotManager.getMyFavoritePageList(query, user.getId());
|
||||
return Result.succeed(pageList);
|
||||
}
|
||||
}
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
package com.zlt.tourism.api.controller;
|
||||
|
||||
import com.central.common.model.Result;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.zlt.tourism.annotation.Limit;
|
||||
import com.zlt.tourism.api.query.TourismOrderQuery;
|
||||
import com.zlt.tourism.dto.mission.ExecuteMissionDTO;
|
||||
import com.zlt.tourism.dto.mission.MissionImageDTO;
|
||||
import com.zlt.tourism.manager.TourismOrderManager;
|
||||
import com.zlt.tourism.model.tourism.TourismOrderEnity;
|
||||
import com.zlt.tourism.query.TourismOrderImagesQuery;
|
||||
import com.zlt.tourism.query.TourismOrderWebSocketQuery;
|
||||
import com.zlt.tourism.vo.TourismOrderUnFinishVo;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* @Author: duzhichao
|
||||
* @CreateTime: 2024-12-04 17:44
|
||||
* @Description: 订单接口实现类
|
||||
*/
|
||||
@Tag(name = "订单管理")
|
||||
@RestController
|
||||
@RequestMapping("/tourism/open/api/order/")
|
||||
@Slf4j
|
||||
public class OrderController {
|
||||
|
||||
@Resource
|
||||
TourismOrderManager orderManager;
|
||||
|
||||
|
||||
@Operation(summary = "扫码创建订单v1.0")
|
||||
@PostMapping("/createOrderByCode")
|
||||
@Limit(key = "createOrderByCode", permitsPerSecond = 1, timeout = 2000, timeunit = TimeUnit.MILLISECONDS,msg = "请勿重复扫码!")
|
||||
public Result createOrderByCode(@Valid @RequestBody ExecuteMissionDTO model) throws IOException, InterruptedException {
|
||||
return orderManager.createOrderByCode(model);
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "重新执行任务")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "主键ID", required = true)
|
||||
})
|
||||
@GetMapping(value = "retryExecuteMission/{id}", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public Result<TourismOrderEnity> retryExecuteMission(@PathVariable("id") Long id) {
|
||||
TourismOrderEnity model = orderManager.getOrderById(id);
|
||||
return Result.succeed(model);
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "获取当前登录人正在任务的订单")
|
||||
@PostMapping("/queryExecutionOrder")
|
||||
public Result<TourismOrderEnity> queryExecutionOrder(@Valid @RequestBody TourismOrderQuery orderQuery) {
|
||||
return orderManager.queryExecutionOrder(orderQuery.getDeviceSn());
|
||||
}
|
||||
|
||||
@Operation(summary = "获取排队和任务中的订单")
|
||||
@PostMapping("/queryUnFinishOrderByDeviceSn")
|
||||
public Result<TourismOrderUnFinishVo> queryUnFinishOrderByDeviceSn(@Valid @RequestBody TourismOrderQuery orderQuery) {
|
||||
return orderManager.queryUnFinishOrderByDeviceSn(orderQuery.getDeviceSn());
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "取消排队的订单")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "主键ID", required = true)
|
||||
})
|
||||
@GetMapping(value = "cancelWaitOrder/{id}", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public Result<Boolean> cancelWaitOrder(@PathVariable("id") Long id) {
|
||||
Boolean model = orderManager.cancelWaitOrder(id);
|
||||
return Result.succeed(model);
|
||||
}
|
||||
|
||||
@Operation(summary = "取消或者重新订阅")
|
||||
@PostMapping("/cancelSubscribe")
|
||||
public Boolean cancelSubscribe(@Valid @RequestBody TourismOrderWebSocketQuery query) {
|
||||
return orderManager.cancelSubscribe(query);
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "获取正在执行的订单的图片")
|
||||
@PostMapping("/execImages/page")
|
||||
public Result<PageInfo<MissionImageDTO>> execImagesPage(@Valid @RequestBody TourismOrderImagesQuery query) {
|
||||
return orderManager.execImagesPage(query);
|
||||
}
|
||||
|
||||
@Operation(summary = "执行中的订单完成继续执行下个排队中的订单")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "订单id", required = true)
|
||||
})
|
||||
@GetMapping(value = "finishExecuteMission/{id}", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public Result<TourismOrderEnity> finishExecuteMission(@PathVariable("id") Long id) {
|
||||
return orderManager.finishExecuteMission(id);
|
||||
}
|
||||
}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package com.zlt.tourism.api.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.central.common.context.LoginUserContextHolder;
|
||||
import com.central.common.model.LoginAppUser;
|
||||
import com.central.common.model.Result;
|
||||
import com.zlt.tourism.api.query.GetByIdQuery;
|
||||
import com.zlt.tourism.api.vo.PanoramaPhotoBaseVO;
|
||||
import com.zlt.tourism.manager.PanoramaPhotoManager;
|
||||
import com.zlt.tourism.util.ParamsErrorUtil;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 全景照片接口类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 全景照片接口类
|
||||
* @create 2024/7/18 17:44
|
||||
**/
|
||||
@Tag(name = "全景照片")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/tourism/open/api/panorama/photo/")
|
||||
public class PanoramaPhotoController {
|
||||
|
||||
/**
|
||||
* 全景照片业务类
|
||||
*/
|
||||
@Autowired
|
||||
private PanoramaPhotoManager panoramaPhotoManager;
|
||||
|
||||
/**
|
||||
* 根据主键ID获取实体
|
||||
*
|
||||
* @param query 主键ID
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "根据主键ID获取实体")
|
||||
@PostMapping(value = "getById", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public Result<PanoramaPhotoBaseVO> getEntity(@Valid @RequestBody GetByIdQuery query, BindingResult paramResult) {
|
||||
if (paramResult.hasErrors()) {
|
||||
Map<String, String> map = ParamsErrorUtil.getErrors(paramResult);
|
||||
return Result.failed(map.values().toString());
|
||||
}
|
||||
LoginAppUser user = LoginUserContextHolder.getUser();
|
||||
if (user == null || user.getId() == null) {
|
||||
return Result.failed("获取登录用户失败,请重新登录");
|
||||
}
|
||||
Long id = null;
|
||||
if (StrUtil.isNotEmpty(query.getId())) {
|
||||
id = Long.parseLong(query.getId());
|
||||
}
|
||||
PanoramaPhotoBaseVO model = panoramaPhotoManager.getEntity(id);
|
||||
return Result.succeed(model);
|
||||
}
|
||||
}
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
package com.zlt.tourism.api.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.central.common.model.Result;
|
||||
import com.zlt.tourism.api.vo.PopularTagListVO;
|
||||
import com.zlt.tourism.model.tourism.PopularTagEntity;
|
||||
import com.zlt.tourism.model.tourism.TourismTagEntity;
|
||||
import com.zlt.tourism.service.PopularTagService;
|
||||
import com.zlt.tourism.service.TourismTagService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 热门标签控制器
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 热门标签控制器
|
||||
* @create 2024/7/19 9:06
|
||||
**/
|
||||
@Tag(name = "热门标签管理")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/tourism/api/popular/tag/")
|
||||
public class PopularTagController {
|
||||
|
||||
/**
|
||||
* 热门标签业务类
|
||||
*/
|
||||
@Autowired
|
||||
private PopularTagService popularTagService;
|
||||
|
||||
/**
|
||||
* 标签业务类
|
||||
*/
|
||||
@Autowired
|
||||
private TourismTagService tourismTagService;
|
||||
|
||||
|
||||
/**
|
||||
* 获取列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "获取列表")
|
||||
@PostMapping(value = "list", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public Result<List<PopularTagListVO>> findList() {
|
||||
LambdaQueryWrapper<PopularTagEntity> qw = new LambdaQueryWrapper<>();
|
||||
qw.orderByAsc(PopularTagEntity::getOrderNumber);
|
||||
List<PopularTagEntity> popularTagList = popularTagService.list(qw);
|
||||
List<PopularTagListVO> list = new ArrayList<>();
|
||||
if (popularTagList != null && popularTagList.size() > 0) {
|
||||
List<String> tagCodeList = popularTagList.stream().filter(o -> StrUtil.isNotEmpty(o.getTagCode())).map(PopularTagEntity::getTagCode).collect(Collectors.toList());
|
||||
List<TourismTagEntity> tagList = tourismTagService.getListByCodeList(tagCodeList);
|
||||
if(tagList != null && tagList.size() > 0){
|
||||
PopularTagListVO model;
|
||||
for (TourismTagEntity item : tagList) {
|
||||
model = new PopularTagListVO();
|
||||
model.setTagCode(item.getTagCode());
|
||||
model.setTagName(item.getTagName());
|
||||
list.add(model);
|
||||
}
|
||||
}
|
||||
}
|
||||
return Result.succeed(list);
|
||||
}
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.zlt.tourism.api.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.central.common.context.LoginUserContextHolder;
|
||||
import com.central.common.model.SysUser;
|
||||
import com.zlt.tourism.core.StationResult;
|
||||
import com.zlt.tourism.dto.route.RouteCreateOrUpdateListDTO;
|
||||
import com.zlt.tourism.feign.StationWebService;
|
||||
import com.zlt.tourism.util.ParamsErrorUtil;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 航线管理
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 航线管理
|
||||
* @create 2024/8/19 10:50
|
||||
**/
|
||||
@Tag(name = "航线管理")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/tourism/open/api/route/")
|
||||
public class RouteController {
|
||||
|
||||
/**
|
||||
* Station-web远程调用业务类
|
||||
*/
|
||||
@Autowired
|
||||
private StationWebService stationWebService;
|
||||
|
||||
/**
|
||||
* 新增或编辑航线
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "新增或编辑航线")
|
||||
@PostMapping(value = "saveOrUpdateRoute", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public StationResult saveOrUpdateRoute(@Valid @RequestBody RouteCreateOrUpdateListDTO model, BindingResult paramResult) {
|
||||
if (paramResult.hasErrors()) {
|
||||
Map<String, String> map = ParamsErrorUtil.getErrors(paramResult);
|
||||
return StationResult.error(map.values().toString());
|
||||
}
|
||||
SysUser user = LoginUserContextHolder.getUser();
|
||||
if (user == null || user.getId() == null) {
|
||||
return StationResult.error("获取当前用户失败!");
|
||||
}
|
||||
log.error(JSONObject.toJSONString(model));
|
||||
StationResult result = stationWebService.createRouteSaveOrUpdate(model);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.zlt.tourism.api.controller;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @Author: duzhichao
|
||||
* @CreateTime: 2024-12-04 10:33
|
||||
* @Description: 扫码排队接口
|
||||
*/
|
||||
@Tag(name = "任务管理")
|
||||
@RestController
|
||||
@RequestMapping("/tourism/open/api/mission/")
|
||||
@Slf4j
|
||||
public class ScanCodeQueueController {
|
||||
|
||||
|
||||
}
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
package com.zlt.tourism.api.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.central.common.context.LoginUserContextHolder;
|
||||
import com.central.common.model.Result;
|
||||
import com.central.common.model.SysUser;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.zlt.tourism.api.query.CoordinateListQuery;
|
||||
import com.zlt.tourism.api.query.GetByIdQuery;
|
||||
import com.zlt.tourism.api.query.ScenicSpotPageQuery;
|
||||
import com.zlt.tourism.api.vo.CoordinateListVO;
|
||||
import com.zlt.tourism.api.vo.ScenicSpotPageVO;
|
||||
import com.zlt.tourism.manager.ScenicSpotManager;
|
||||
import com.zlt.tourism.util.ParamsErrorUtil;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 景点控制器
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 景点控制器
|
||||
* @create 2024/7/18 11:49
|
||||
**/
|
||||
@Tag(name = "景点管理")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/tourism/open/api/scenic/spot/")
|
||||
public class ScenicSpotController {
|
||||
|
||||
/**
|
||||
* 景点业务类
|
||||
*/
|
||||
@Autowired
|
||||
private ScenicSpotManager scenicSpotManager;
|
||||
|
||||
/**
|
||||
* 获取分页列表
|
||||
*
|
||||
* @param query 查询条件
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "热门景点,热门标签,我的收藏")
|
||||
@PostMapping(value = "pageList", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public Result<PageInfo<ScenicSpotPageVO>> getPageList(@RequestBody ScenicSpotPageQuery query) {
|
||||
SysUser user = LoginUserContextHolder.getUser();
|
||||
|
||||
if (user == null || user.getId() == null) {
|
||||
return Result.failed("获取登录用户失败,请重新登录");
|
||||
}
|
||||
PageInfo<ScenicSpotPageVO> pageList = scenicSpotManager.getPageList(query, user.getId());
|
||||
return Result.succeed(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取坐标列表
|
||||
*
|
||||
* @param query 查询条件
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "获取坐标列表")
|
||||
@PostMapping(value = "coordinate/list", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public Result<CoordinateListVO> getCoordinateList(@Valid @RequestBody CoordinateListQuery query, BindingResult paramResult) {
|
||||
if (paramResult.hasErrors()) {
|
||||
Map<String, String> map = ParamsErrorUtil.getErrors(paramResult);
|
||||
return Result.failed(map.values().toString());
|
||||
}
|
||||
SysUser user = LoginUserContextHolder.getUser();
|
||||
if (user == null || user.getId() == null) {
|
||||
return Result.failed("获取登录用户失败,请重新登录");
|
||||
}
|
||||
Integer coordinateType = null;
|
||||
BigDecimal longitude = null;
|
||||
BigDecimal latitude = null;
|
||||
if (StrUtil.isNotEmpty(query.getCoordinateType())) {
|
||||
coordinateType = Integer.parseInt(query.getCoordinateType());
|
||||
}
|
||||
if (StrUtil.isNotEmpty(query.getLongitude())) {
|
||||
longitude = new BigDecimal(query.getLongitude());
|
||||
}
|
||||
if (StrUtil.isNotEmpty(query.getLatitude())) {
|
||||
latitude = new BigDecimal(query.getLatitude());
|
||||
}
|
||||
CoordinateListVO coordinateList = scenicSpotManager.getCoordinateList(coordinateType, longitude, latitude, user.getId());
|
||||
return Result.succeed(coordinateList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主键ID获取实体
|
||||
*
|
||||
* @param query 主键ID
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "根据主键ID获取实体")
|
||||
@PostMapping(value = "getById", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public Result<ScenicSpotPageVO> getEntity(@Valid @RequestBody GetByIdQuery query, BindingResult paramResult) {
|
||||
if (paramResult.hasErrors()) {
|
||||
Map<String, String> map = ParamsErrorUtil.getErrors(paramResult);
|
||||
return Result.failed(map.values().toString());
|
||||
}
|
||||
SysUser user = LoginUserContextHolder.getUser();
|
||||
if (user == null || user.getId() == null) {
|
||||
return Result.failed("获取登录用户失败,请重新登录");
|
||||
}
|
||||
Long id = null;
|
||||
if (StrUtil.isNotEmpty(query.getId())) {
|
||||
id = Long.parseLong(query.getId());
|
||||
}
|
||||
ScenicSpotPageVO model = scenicSpotManager.getEntity(id, user.getId());
|
||||
return Result.succeed(model);
|
||||
}
|
||||
}
|
||||
+311
@@ -0,0 +1,311 @@
|
||||
package com.zlt.tourism.api.controller;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.central.common.context.LoginUserContextHolder;
|
||||
import com.central.common.model.Result;
|
||||
import com.central.common.model.SysUser;
|
||||
import com.central.common.params.dto.FileInfoDto;
|
||||
import com.central.common.utils.RSAUtil;
|
||||
import com.central.common.utils.StringUtils;
|
||||
import com.central.common.validator.AbstractAssert;
|
||||
import com.zlt.tourism.api.vo.SysUserVO;
|
||||
import com.zlt.tourism.core.StationResult;
|
||||
import com.zlt.tourism.dto.other.IndustryDTO;
|
||||
import com.zlt.tourism.dto.other.StationControlDTO;
|
||||
import com.zlt.tourism.dto.user.CreatTourosmUserDTO;
|
||||
import com.zlt.tourism.dto.user.PasswordUpdateDTO;
|
||||
import com.zlt.tourism.dto.user.UserUpdateDTO;
|
||||
import com.zlt.tourism.feign.StationWebService;
|
||||
import com.zlt.tourism.model.tourism.TourismUserEntity;
|
||||
import com.zlt.tourism.service.ResourceRolesIndustryService;
|
||||
import com.zlt.tourism.service.StationControlService;
|
||||
import com.zlt.tourism.service.TourismStreamerService;
|
||||
import com.zlt.tourism.service.TourismUserService;
|
||||
import com.zlt.tourism.util.ParamsErrorUtil;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.RandomStringUtils;
|
||||
import org.apache.shiro.crypto.hash.Sha256Hash;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* APP用户控制器
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description APP用户控制器
|
||||
* @create 2024/7/4 10:04
|
||||
**/
|
||||
@Tag(name = "APP用户管理")
|
||||
@RestController
|
||||
@RequestMapping("/tourism/open/api/user/")
|
||||
@Slf4j
|
||||
public class UserController {
|
||||
|
||||
/**
|
||||
* Station-Web远程调用业务类
|
||||
*/
|
||||
@Autowired
|
||||
private StationWebService stationWebService;
|
||||
|
||||
/**
|
||||
* 主播业务类
|
||||
*/
|
||||
@Autowired
|
||||
private TourismStreamerService streamerService;
|
||||
|
||||
/**
|
||||
* 行业业务类
|
||||
*/
|
||||
@Autowired
|
||||
private ResourceRolesIndustryService industryService;
|
||||
|
||||
/**
|
||||
* 行业业务类
|
||||
*/
|
||||
@Autowired
|
||||
private StationControlService controlService;
|
||||
|
||||
@Resource
|
||||
private TourismUserService tourismUserService;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 修改登录用户密码
|
||||
*
|
||||
* @param form 登录密码
|
||||
* @param token token
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "修改登录用户密码")
|
||||
@PostMapping("/password")
|
||||
public StationResult password(@RequestBody PasswordUpdateDTO form, @RequestHeader(value = "Authorization") String token, BindingResult paramResult) {
|
||||
if (paramResult.hasErrors()) {
|
||||
Map<String, String> map = ParamsErrorUtil.getErrors(paramResult);
|
||||
return StationResult.error(map.values().toString());
|
||||
}
|
||||
if (StrUtil.isEmpty(token)) {
|
||||
return StationResult.error("token为空!");
|
||||
}
|
||||
//return stationWebService.password(form, token);
|
||||
TourismUserEntity user = tourismUserService.getUser();
|
||||
if (Objects.isNull(user)) {
|
||||
return StationResult.error("用户不存在!");
|
||||
}
|
||||
if(Objects.equals(form.getType(),1)){ //设置密码
|
||||
String password = RSAUtil.decryptOne(form.getNewPassword());
|
||||
if(StringUtils.isBlank(password)) {
|
||||
return StationResult.error("密码未加密");
|
||||
}
|
||||
String salt = RandomStringUtils.randomAlphanumeric(20);
|
||||
user.setPassword(new Sha256Hash(password, salt).toHex());
|
||||
user.setSalt(salt);
|
||||
user.setCommonId(1l);
|
||||
}else {
|
||||
String password = RSAUtil.decryptOne(form.getPassword());
|
||||
String newPassword =RSAUtil.decryptOne(form.getNewPassword());
|
||||
if(StringUtils.isBlank(password) || StringUtils.isBlank(newPassword)) {
|
||||
return StationResult.error("密码未加密");
|
||||
}
|
||||
AbstractAssert.isBlank(password, "原密码不能为空");
|
||||
//sha256加密
|
||||
String password1 = new Sha256Hash(password, user.getSalt()).toHex();
|
||||
String passwordOld = user.getPassword();
|
||||
if (passwordOld == null) {
|
||||
return StationResult.error("密码不存在");
|
||||
}
|
||||
if (!password1.equals(passwordOld)) {
|
||||
return StationResult.error("原密码不正确");
|
||||
}
|
||||
//修改库密码
|
||||
// SysUserEntity user = getUser();
|
||||
String newPassword1 = new Sha256Hash(newPassword, user.getSalt()).toHex();
|
||||
if(password1.equals(newPassword1)) return StationResult.error("原密码与新密码不能相同");
|
||||
user.setPassword(newPassword1);
|
||||
user.setCommonId(1l);
|
||||
}
|
||||
tourismUserService.updateById(user);
|
||||
log.info("用户的token:{}",token);
|
||||
if(StringUtils.isBlank(token)){
|
||||
return StationResult.error("token不存在");
|
||||
}
|
||||
tourismUserService.logOutGiveToken(token);
|
||||
return StationResult.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户手机号和头像和用户名
|
||||
*
|
||||
* @param form 更新实体
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "修改用户手机号和头像和用户名")
|
||||
@PostMapping("/mobileAndAvatarUrlAndRealName")
|
||||
public StationResult phoneNumAndAvatarUrl(@RequestBody UserUpdateDTO form, BindingResult paramResult) {
|
||||
if (paramResult.hasErrors()) {
|
||||
Map<String, String> map = ParamsErrorUtil.getErrors(paramResult);
|
||||
return StationResult.error(map.values().toString());
|
||||
}
|
||||
// return stationWebService.phoneNumAndAvatarUrl(form);
|
||||
SysUser user = LoginUserContextHolder.getUser();
|
||||
TourismUserEntity tourismUser = tourismUserService.getById(user.getId());
|
||||
if(Objects.nonNull(tourismUser)){
|
||||
if(StringUtils.isNotBlank(form.getAvatarUrl())) tourismUser.setAvatarUrl(form.getAvatarUrl());
|
||||
if(StringUtils.isNotBlank(form.getMobile())){
|
||||
SysUser userEntity= tourismUserService.findByMobile(form.getMobile());
|
||||
if(Objects.nonNull(userEntity)){
|
||||
return StationResult.error("修改的手机号已经注册,请更换手机号!");
|
||||
}else{
|
||||
if(!Objects.equals(user.getMobile(),form.getMobile())){
|
||||
tourismUser.setMobile(form.getMobile());
|
||||
}
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(form.getRealName()))tourismUser.setRealName(form.getRealName());
|
||||
tourismUserService.updateById(tourismUser);
|
||||
return StationResult.ok("修改成功");
|
||||
}
|
||||
return StationResult.error("修改失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 个人头像上传
|
||||
*
|
||||
* @param file 头像文件
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Operation(summary = "个人头像上传")
|
||||
@PostMapping(value = "/uploadAvatar", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
public Result<FileInfoDto> uploadAvatar(@RequestPart("file") MultipartFile file) throws Exception {
|
||||
return stationWebService.uploadAvatar(file);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取登录的用户信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "获取登录的用户信息")
|
||||
@PostMapping("/info")
|
||||
public Result<SysUserVO> info() {
|
||||
log.info("获取登录用户信息开始");
|
||||
SysUserVO model = new SysUserVO();
|
||||
SysUser user = LoginUserContextHolder.getUser();
|
||||
log.info("获取到的当前登录用户是:{}",user.getUsername());
|
||||
if (user != null && user.getId() != null) {
|
||||
TourismUserEntity tourismUser = tourismUserService.getById(user.getId());
|
||||
if (tourismUser != null) {
|
||||
BeanUtil.copyProperties(tourismUser, model);
|
||||
boolean isStreamer = streamerService.existUserId(model.getId());
|
||||
if (isStreamer) {
|
||||
model.setStreamerType(1);
|
||||
} else {
|
||||
model.setStreamerType(-2);
|
||||
}
|
||||
if(Objects.equals(tourismUser.getCommonId(),0L)){
|
||||
model.setIsHasPassword(0);
|
||||
}else{
|
||||
model.setIsHasPassword(1);
|
||||
}
|
||||
return Result.succeed(model);
|
||||
}else {
|
||||
return Result.failed("获取当前用户失败!");
|
||||
}
|
||||
} else {
|
||||
return Result.failed("获取当前用户失败!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户行业权限
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "查询用户行业权限")
|
||||
@PostMapping(value = "getIndustryListByUserId")
|
||||
public Result<List<IndustryDTO>> getIndustryListByUserId() {
|
||||
SysUser user = LoginUserContextHolder.getUser();
|
||||
if (user == null || user.getId() == null) {
|
||||
return Result.failed("获取当前用户失败!");
|
||||
}
|
||||
List<IndustryDTO> list = industryService.findIndustryByUserId(user.getId());
|
||||
return Result.succeed(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户控制权限
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "查询用户控制权限")
|
||||
@PostMapping(value = "getControllerListByUserId")
|
||||
public Result<List<StationControlDTO>> getControllerListByUserId() {
|
||||
SysUser user = LoginUserContextHolder.getUser();
|
||||
if (user == null || user.getId() == null) {
|
||||
return Result.failed("获取当前用户失败!");
|
||||
}
|
||||
List<StationControlDTO> list = controlService.findControlByUserId(user.getId());
|
||||
return Result.succeed(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 订阅机库飞机Socke时候用的token
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "订阅机库飞机Socke时候用的token ")
|
||||
@PostMapping(value = "getSubscriptionToken")
|
||||
public Result<String> getSubscriptionToken() {
|
||||
String token = "";
|
||||
StationResult result = stationWebService.token();
|
||||
if(result != null && result.get("data") != null){
|
||||
Object oData = result.get("data");
|
||||
String dataStr = JSONObject.toJSONString(oData);
|
||||
if(dataStr.contains("\\")){
|
||||
dataStr = dataStr.replace("\\", "");
|
||||
if(dataStr.startsWith("\"")){
|
||||
dataStr = dataStr.substring(1);
|
||||
}
|
||||
if(dataStr.endsWith("\"")){
|
||||
dataStr = dataStr.substring(0, dataStr.length() - 1);
|
||||
}
|
||||
}
|
||||
JSONObject jsonObject = JSONObject.parseObject(dataStr);
|
||||
if(jsonObject.containsKey("result")){
|
||||
token = jsonObject.getString("result");
|
||||
}
|
||||
}
|
||||
return Result.succeed(token, "操作成功!");
|
||||
}
|
||||
|
||||
@GetMapping(value = "mobile/{mobile}")
|
||||
@Operation(summary = "根据手机号查询文旅用户")
|
||||
public SysUser findByMobile(@PathVariable("mobile") String mobile) {
|
||||
log.info("根据手机号获取文旅用户参数是:{}",mobile);
|
||||
SysUser user= tourismUserService.findByMobile(mobile);
|
||||
log.info("返回用户信息是:{}", JSON.toJSONString(user));
|
||||
return user;
|
||||
}
|
||||
|
||||
@Operation(summary = "新增文旅用户")
|
||||
@PostMapping("createUser")
|
||||
Boolean createTourismUser(@RequestBody CreatTourosmUserDTO creatTourosmUserReq){
|
||||
return tourismUserService.createTourismUser(creatTourosmUserReq);
|
||||
}
|
||||
|
||||
}
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
package com.zlt.tourism.api.controller;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.central.common.context.LoginUserContextHolder;
|
||||
import com.central.common.model.Result;
|
||||
import com.central.common.model.SysUser;
|
||||
import com.zlt.tourism.api.vo.WayPointVO;
|
||||
import com.zlt.tourism.core.StationResult;
|
||||
import com.zlt.tourism.dto.route.RockerRouteQuery;
|
||||
import com.zlt.tourism.dto.route.WayPointDTO;
|
||||
import com.zlt.tourism.dto.route.WayPointListQuery;
|
||||
import com.zlt.tourism.manager.RouteManager;
|
||||
import com.zlt.tourism.util.ParamsErrorUtil;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 航点管理
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 航点管理
|
||||
* @create 2024/8/7 11:16
|
||||
**/
|
||||
@Tag(name = "航点管理")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/tourism/open/api/way/point/")
|
||||
public class WayPointController {
|
||||
|
||||
/**
|
||||
* 航线业务类
|
||||
*/
|
||||
@Autowired
|
||||
private RouteManager routeManager;
|
||||
|
||||
/**
|
||||
* 获取航点列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "获取航点列表")
|
||||
@PostMapping(value = "list")
|
||||
public Result<List<WayPointVO>> getList(@Valid @RequestBody WayPointListQuery query, BindingResult paramResult) {
|
||||
if (paramResult.hasErrors()) {
|
||||
Map<String, String> map = ParamsErrorUtil.getErrors(paramResult);
|
||||
return Result.failed(map.values().toString());
|
||||
}
|
||||
SysUser user = LoginUserContextHolder.getUser();
|
||||
if (user == null || user.getId() == null) {
|
||||
return Result.failed("获取当前用户失败!");
|
||||
}
|
||||
List<WayPointVO> dataList = new ArrayList<>();
|
||||
List<WayPointDTO> list = routeManager.getPointList(query);
|
||||
if (list != null && list.size() > 0) {
|
||||
WayPointVO model;
|
||||
for (WayPointDTO item : list) {
|
||||
model = new WayPointVO();
|
||||
BeanUtil.copyProperties(item, model);
|
||||
dataList.add(model);
|
||||
}
|
||||
}
|
||||
return Result.succeed(dataList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取摇臂位置列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "获取摇臂位置列表")
|
||||
@PostMapping(value = "rockerRoute")
|
||||
public StationResult getRockerRouteList(@Valid @RequestBody RockerRouteQuery query, BindingResult paramResult) {
|
||||
if (paramResult.hasErrors()) {
|
||||
Map<String, String> map = ParamsErrorUtil.getErrors(paramResult);
|
||||
return StationResult.error(map.values().toString());
|
||||
}
|
||||
SysUser user = LoginUserContextHolder.getUser();
|
||||
if (user == null || user.getId() == null) {
|
||||
return StationResult.error("获取当前用户失败!");
|
||||
}
|
||||
StationResult result = routeManager.getRockerRouteList(query);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
package com.zlt.tourism.api.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 双轴视频上轴标记视图实体类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 双轴视频上轴标记视图实体类
|
||||
* @create 2024/7/18 8:52
|
||||
**/
|
||||
@Data
|
||||
@Schema(description = "双轴视频上轴标记视图实体类")
|
||||
public class BiaxVideoDownTagDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@Schema(description = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 双轴视频ID
|
||||
*/
|
||||
@Schema(description = "双轴视频ID")
|
||||
private Long biaxVideoId;
|
||||
|
||||
/**
|
||||
* 标记位置
|
||||
*/
|
||||
@Schema(description = "标记位置")
|
||||
private String tagPosition;
|
||||
|
||||
/**
|
||||
* 标记名称
|
||||
*/
|
||||
@Schema(description = "标记名称")
|
||||
private String tagName;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
@Schema(description = "排序号")
|
||||
private Integer orderNumber;
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
package com.zlt.tourism.api.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 双轴视频上轴标记视图实体类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 双轴视频上轴标记视图实体类
|
||||
* @create 2024/7/18 8:52
|
||||
**/
|
||||
@Data
|
||||
@Schema(description = "双轴视频上轴标记视图实体类")
|
||||
public class BiaxVideoUpTagDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@Schema(description = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 双轴视频ID
|
||||
*/
|
||||
@Schema(description = "双轴视频ID")
|
||||
private Long biaxVideoId;
|
||||
|
||||
/**
|
||||
* 标记名称
|
||||
*/
|
||||
@Schema(description = "标记名称")
|
||||
private String tagName;
|
||||
|
||||
/**
|
||||
* 标记位置
|
||||
*/
|
||||
@Schema(description = "标记位置")
|
||||
private String tagPosition;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
@Schema(description = "排序号")
|
||||
private Integer orderNumber;
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package com.zlt.tourism.api.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 我的收藏新增实体类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 我的收藏新增实体类
|
||||
* @create 2024/7/18 8:26
|
||||
**/
|
||||
@Data
|
||||
@Schema(description = "我的收藏新增实体类")
|
||||
public class MyFavoriteAddDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 景点ID
|
||||
*/
|
||||
@Schema(description = "景点ID")
|
||||
@NotNull(message = "关联景点不能为空")
|
||||
private Long scenicSpotId;
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package com.zlt.tourism.api.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 我的收藏删除实体类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 我的收藏删除实体类
|
||||
* @create 2024/7/18 8:26
|
||||
**/
|
||||
@Data
|
||||
@Schema(description = "我的收藏删除实体类")
|
||||
public class MyFavoriteDeleteDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 景点ID
|
||||
*/
|
||||
@Schema(description = "景点ID")
|
||||
@NotNull(message = "关联景点不能为空")
|
||||
private Long scenicSpotId;
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.zlt.tourism.api.dto;
|
||||
|
||||
import com.zlt.tourism.annotation.ValidPhoneNumber;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Author: duzhichao
|
||||
* @CreateTime: 2024-09-27 14:24
|
||||
* @Description: 手机号获取验证码
|
||||
*/
|
||||
@Data
|
||||
public class PhoneMobileCodeDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = value = "手机号")
|
||||
@NotNull(message = "手机号不能为空!!!!!!")
|
||||
@ValidPhoneNumber
|
||||
private String mobile;
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package com.zlt.tourism.api.query;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 获取景点坐标列表查询类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 获取景点坐标列表查询类
|
||||
* @create 2024/7/29 8:34
|
||||
**/
|
||||
@Schema(description = "获取景点坐标列表查询类")
|
||||
@Data
|
||||
public class CoordinateListQuery implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 坐标类型(1:景点,2:双轴视频,3:全景照片)
|
||||
*/
|
||||
@Schema(description = "坐标类型(1:景点,2:双轴视频,3:全景照片)")
|
||||
private String coordinateType;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@Schema(description = "经度")
|
||||
/*@NotBlank(message = "经度不能为空")*/
|
||||
private String longitude;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@Schema(description = "纬度")
|
||||
/*@NotBlank(message = "纬度不能为空")*/
|
||||
private String latitude;
|
||||
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package com.zlt.tourism.api.query;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 根据主键查询实体查询类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 根据主键查询实体查询类
|
||||
* @create 2024/7/17 13:59
|
||||
**/
|
||||
@Schema(description = "根据主键查询实体查询类")
|
||||
@Data
|
||||
public class GetByIdQuery implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@Schema(description = "主键ID")
|
||||
@NotBlank(message = "主键ID不能为空")
|
||||
private String id;
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.zlt.tourism.api.query;
|
||||
|
||||
import com.zlt.tourism.core.BasePage;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 我的收藏分页查询类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 我的收藏分页查询类
|
||||
* @create 2024/7/17 13:59
|
||||
**/
|
||||
@Schema(description = "我的收藏分页查询类")
|
||||
@Data
|
||||
public class MyFavoritePageQuery extends BasePage {
|
||||
|
||||
/**
|
||||
* 景点名称
|
||||
*/
|
||||
@Schema(description = "景点名称")
|
||||
private String scenicSpotName;
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.zlt.tourism.api.query;
|
||||
|
||||
import com.zlt.tourism.core.BasePage;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 景点分页查询类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 景点分页查询类
|
||||
* @create 2024/7/17 13:59
|
||||
**/
|
||||
@Schema(description = "景点分页查询类")
|
||||
@Data
|
||||
public class ScenicSpotPageQuery extends BasePage {
|
||||
|
||||
/**
|
||||
* 景点名称
|
||||
*/
|
||||
@Schema(description = "景点名称")
|
||||
private String scenicSpotName;
|
||||
|
||||
/**
|
||||
* 查询类型(1:热门景点,2:热门标签,3:我的收藏)
|
||||
*/
|
||||
@Schema(description = "查询类型(1:热门景点,2:热门标签,3:我的收藏)")
|
||||
private String queryType;
|
||||
|
||||
/**
|
||||
* 热门标签编码
|
||||
*/
|
||||
@Schema(description = "热门标签编码")
|
||||
private String tagCode;
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.zlt.tourism.api.query;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Author: duzhichao
|
||||
* @CreateTime: 2024-12-17 21:14
|
||||
* @Description: 请求订单参数
|
||||
*/
|
||||
@Data
|
||||
public class TourismOrderQuery implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@Schema(description = "机库sn")
|
||||
private String deviceSn;
|
||||
}
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
package com.zlt.tourism.api.vo;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 双轴视频分页视图实体类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 双轴视频分页视图实体类
|
||||
* @create 2024/7/18 8:26
|
||||
**/
|
||||
@Data
|
||||
@Schema(description = "双轴视频分页视图实体类")
|
||||
public class BiaxVideoBaseVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@Schema(description = "主键ID")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 双轴视频名称
|
||||
*/
|
||||
@Schema(description = "双轴视频名称")
|
||||
private String biaxVideoName;
|
||||
|
||||
/**
|
||||
* 视频URL
|
||||
*/
|
||||
@Schema(description = "视频URL")
|
||||
private String fileUrl;
|
||||
|
||||
/**
|
||||
* 视频时长
|
||||
*/
|
||||
@Schema(description = "视频时长")
|
||||
private String videoMins;
|
||||
|
||||
/**
|
||||
* 航线ID
|
||||
*/
|
||||
@Schema(description = "航线ID")
|
||||
private Long routeId;
|
||||
|
||||
/**
|
||||
* 航线名称
|
||||
*/
|
||||
@Schema(description = "航线名称")
|
||||
private String routeName;
|
||||
|
||||
/**
|
||||
* 上轴标记点位置
|
||||
*/
|
||||
@Schema(description = "上轴标记点位置")
|
||||
private String upTagPosition;
|
||||
|
||||
/**
|
||||
* 上轴标记列表
|
||||
*/
|
||||
@Schema(description = "上轴标记列表")
|
||||
private List<BiaxVideoUpTagVO> upTagList;
|
||||
|
||||
/**
|
||||
* 下轴轴标记列表
|
||||
*/
|
||||
@Schema(description = "下轴轴标记列表")
|
||||
private List<BiaxVideoDownTagVO> downTagList;
|
||||
|
||||
/**
|
||||
* 特色景观列表
|
||||
*/
|
||||
@Schema(description = "特色景观列表")
|
||||
private List<String> featureTagList;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Schema(description = "更新时间")
|
||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updatedAt;
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package com.zlt.tourism.api.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 双轴视频上轴标记视图实体类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 双轴视频上轴标记视图实体类
|
||||
* @create 2024/7/18 8:52
|
||||
**/
|
||||
@Data
|
||||
@Schema(description = "双轴视频上轴标记视图实体类")
|
||||
public class BiaxVideoDownTagVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 标记位置
|
||||
*/
|
||||
@Schema(description = "标记位置")
|
||||
private String tagPosition;
|
||||
|
||||
/**
|
||||
* 标记名称
|
||||
*/
|
||||
@Schema(description = "标记名称")
|
||||
private String tagName;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
@Schema(description = "排序号")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Integer orderNumber;
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.zlt.tourism.api.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 双轴视频特色景观标签视图实体类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 双轴视频特色景观标签视图实体类
|
||||
* @create 2024/7/24 15:34
|
||||
**/
|
||||
@Data
|
||||
@Schema(description = "双轴视频特色景观标签视图实体类")
|
||||
public class BiaxVideoFeatureTagBaseVO {
|
||||
|
||||
/**
|
||||
* 双轴视频ID
|
||||
*/
|
||||
@Schema(description = "双轴视频ID")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long biaxVideoId;
|
||||
|
||||
/**
|
||||
* 标记名称
|
||||
*/
|
||||
@Schema(description = "标记名称")
|
||||
private String tagName;
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.zlt.tourism.api.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 双轴视频列表视图实体类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 双轴视频列表视图实体类
|
||||
* @create 2024/7/18 8:26
|
||||
**/
|
||||
@Data
|
||||
@Schema(description = "双轴视频列表视图实体类")
|
||||
public class BiaxVideoListVO extends BiaxVideoBaseVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 景点照片URL
|
||||
*/
|
||||
@Schema(description = "景点照片URL")
|
||||
private String photoUrl;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@Schema(description = "经度")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private BigDecimal longitude;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@Schema(description = "纬度")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private BigDecimal latitude;
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.zlt.tourism.api.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 双轴视频上轴标记视图实体类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 双轴视频上轴标记视图实体类
|
||||
* @create 2024/7/18 8:52
|
||||
**/
|
||||
@Data
|
||||
@Schema(description = "双轴视频上轴标记视图实体类")
|
||||
public class BiaxVideoUpTagVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 标记名称
|
||||
*/
|
||||
@Schema(description = "标记名称")
|
||||
private String tagName;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
@Schema(description = "排序号")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Integer orderNumber;
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.zlt.tourism.api.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 坐标列表视图实体类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 坐标列表视图实体类
|
||||
* @create 2024/7/24 16:02
|
||||
**/
|
||||
@Data
|
||||
@Schema(description = "坐标列表视图实体类")
|
||||
public class CoordinateListVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 景点列表
|
||||
*/
|
||||
@Schema(description = "景点列表")
|
||||
private List<ScenicSpotPageVO> scenicSpotList;
|
||||
|
||||
/**
|
||||
* 双轴视频列表
|
||||
*/
|
||||
@Schema(description = "双轴视频列表")
|
||||
private List<BiaxVideoListVO> biaxVideoList;
|
||||
|
||||
/**
|
||||
* 全景照片列表
|
||||
*/
|
||||
@Schema(description = "全景照片列表")
|
||||
private List<PanoramaPhotoListVO> panoramaPhotoList;
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package com.zlt.tourism.api.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 行业视图实体
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 行业视图实体
|
||||
* @create 2024/7/29 8:56
|
||||
**/
|
||||
@Data
|
||||
@Schema(description = "全景照片图实体类")
|
||||
public class IndustryVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 行业类型
|
||||
*/
|
||||
@Schema(description = "行业类型")
|
||||
private String industryType;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
@Schema(description = "编码")
|
||||
private String code;
|
||||
}
|
||||
+134
@@ -0,0 +1,134 @@
|
||||
package com.zlt.tourism.api.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 我收藏的景点视分页图实体类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 我收藏的景点视分页图实体类
|
||||
* @create 2024/7/17 14:10
|
||||
**/
|
||||
@Schema(description = "我收藏的景点视分页图实体类")
|
||||
@Data
|
||||
public class MyFavoriteScenicSpotPageVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@Schema(description = "主键ID")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 景点名称
|
||||
*/
|
||||
@Schema(description = "景点名称")
|
||||
private String scenicSpotName;
|
||||
|
||||
/**
|
||||
* 景点等级
|
||||
*/
|
||||
@Schema(description = "景点等级")
|
||||
private String scenicSpotGrade;
|
||||
|
||||
/**
|
||||
* 地址-省份
|
||||
*/
|
||||
@Schema(description = "地址-省份")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 地址-地市
|
||||
*/
|
||||
@Schema(description = "地址-地市")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 地址-景区
|
||||
*/
|
||||
@Schema(description = "地址-景区")
|
||||
private String scenicArea;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@Schema(description = "地址")
|
||||
private String scenicSpotAddress;
|
||||
|
||||
/**
|
||||
* 标签名称集合
|
||||
*/
|
||||
@Schema(description = "标签名称集合")
|
||||
private List<String> tagNameList;
|
||||
|
||||
/**
|
||||
* 热度
|
||||
*/
|
||||
@Schema(description = "热度")
|
||||
private Integer hotScore;
|
||||
|
||||
/**
|
||||
* 精选图片集合
|
||||
*/
|
||||
@Schema(description = "精选图片集合")
|
||||
private List<String> featuredPhotoList;
|
||||
|
||||
/**
|
||||
* 简介
|
||||
*/
|
||||
@Schema(description = "简介")
|
||||
private String scenicSpotAbout;
|
||||
|
||||
/**
|
||||
* 关联设备SN
|
||||
*/
|
||||
@Schema(description = "关联设备SN")
|
||||
private String deviceSn;
|
||||
|
||||
/**
|
||||
* 语音讲解URL
|
||||
*/
|
||||
@Schema(description = "语音讲解URL")
|
||||
private String introduceAudioUrl;
|
||||
|
||||
/**
|
||||
* 虚拟飞行图片URL
|
||||
*/
|
||||
@Schema(description = "虚拟飞行图片URL")
|
||||
private String virtualFlyPhotoUrl;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@Schema(description = "经度")
|
||||
private BigDecimal longitude;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@Schema(description = "纬度")
|
||||
private BigDecimal latitude;
|
||||
|
||||
/**
|
||||
* 高度
|
||||
*/
|
||||
@Schema(description = "高度")
|
||||
private BigDecimal altitude;
|
||||
|
||||
/**
|
||||
* 是否已收藏
|
||||
*/
|
||||
@Schema(description = "是否已收藏")
|
||||
private Integer isFavourite;
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.zlt.tourism.api.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 配对设备实体类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 配对设备实体类
|
||||
* @create 2024/7/30 8:23
|
||||
**/
|
||||
@Data
|
||||
@Schema(description = "配对设备实体类")
|
||||
public class PairedDeviceVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 关联设备SN
|
||||
*/
|
||||
@Schema(description = "关联设备SN")
|
||||
private String deviceSn;
|
||||
|
||||
/**
|
||||
* 推流地址
|
||||
*/
|
||||
@Schema(description = "推流地址")
|
||||
private List<String> rtmpUrlList;
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
package com.zlt.tourism.api.vo;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 全景照片图实体类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 全景照片图实体类
|
||||
* @create 2024/7/18 8:26
|
||||
**/
|
||||
@Data
|
||||
@Schema(description = "全景照片图实体类")
|
||||
public class PanoramaPhotoBaseVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@Schema(description = "主键ID")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 图片名称
|
||||
*/
|
||||
@Schema(description = "图片名称")
|
||||
private String photoName;
|
||||
|
||||
/**
|
||||
* 标签列表
|
||||
*/
|
||||
@Schema(description = "标签列表")
|
||||
private List<PanoramaPhotoTagVO> tagList;
|
||||
|
||||
/**
|
||||
* 特色景观列表
|
||||
*/
|
||||
@Schema(description = "特色景观列表")
|
||||
private List<String> featureTagList;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Schema(description = "更新时间")
|
||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updatedAt;
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.zlt.tourism.api.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 全景照片特色景观标签视图实体类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 全景照片特色景观标签视图实体类
|
||||
* @create 2024/7/24 15:34
|
||||
**/
|
||||
@Data
|
||||
@Schema(description = "全景照片特色景观标签视图实体类")
|
||||
public class PanoramaPhotoFeatureTagBaseVO {
|
||||
|
||||
/**
|
||||
* 全景照片ID
|
||||
*/
|
||||
@Schema(description = "全景照片ID")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long panoramaPhotoId;
|
||||
|
||||
|
||||
/**
|
||||
* 标记名称
|
||||
*/
|
||||
@Schema(description = "标记名称")
|
||||
private String tagName;
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.zlt.tourism.api.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 全景照片实体类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 全景照片实体类
|
||||
* @create 2024/7/18 8:26
|
||||
**/
|
||||
@Data
|
||||
@Schema(description = "全景照片实体类")
|
||||
public class PanoramaPhotoListVO extends PanoramaPhotoBaseVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 景点照片URL
|
||||
*/
|
||||
@Schema(description = "景点照片URL")
|
||||
private String photoUrl;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@Schema(description = "经度")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private BigDecimal longitude;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@Schema(description = "纬度")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private BigDecimal latitude;
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.zlt.tourism.api.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 全景照片标记实体类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 全景照片标记实体类
|
||||
* @create 2024/7/18 8:26
|
||||
**/
|
||||
@Data
|
||||
@Schema(description = "全景照片标记实体类")
|
||||
public class PanoramaPhotoTagVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 标记名称
|
||||
*/
|
||||
@Schema(description = "标记名称")
|
||||
private String tagName;
|
||||
|
||||
/**
|
||||
* 照片名称
|
||||
*/
|
||||
@Schema(description = "照片名称")
|
||||
private String photoName;
|
||||
|
||||
/**
|
||||
* 附件URL
|
||||
*/
|
||||
@Schema(description = "附件URL")
|
||||
private String fileUrl;
|
||||
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.zlt.tourism.api.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 热门标签列表实体类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 热门标签列表实体类
|
||||
* @create 2024/7/18 8:46
|
||||
**/
|
||||
@Data
|
||||
@Schema(description = "热门标签列表实体类")
|
||||
public class PopularTagListVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 标签编码
|
||||
*/
|
||||
@Schema(description = "标签编码")
|
||||
private String tagCode;
|
||||
|
||||
/**
|
||||
* 标签名称
|
||||
*/
|
||||
@Schema(description = "标签名称")
|
||||
private String tagName;
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
package com.zlt.tourism.api.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 航线实体类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 航线实体类
|
||||
* @create 2024/7/18 15:40
|
||||
**/
|
||||
@Schema(description = "航线实体类")
|
||||
@Data
|
||||
public class RouteBaseVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 航线ID
|
||||
*/
|
||||
@Schema(description = "航线ID")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long routeId;
|
||||
|
||||
/**
|
||||
* 航点编码
|
||||
*/
|
||||
@Schema(description = "航点编码")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 航线名称
|
||||
*/
|
||||
@Schema(description = "航线名称")
|
||||
private String routeName;
|
||||
|
||||
/**
|
||||
* 航线被执行次数
|
||||
*/
|
||||
@Schema(description = "航线被执行次数")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Integer routeRunNum;
|
||||
|
||||
/**
|
||||
* 航线视频URL
|
||||
*/
|
||||
@Schema(description = "航线视频URL")
|
||||
private String fileUrl;
|
||||
|
||||
/**
|
||||
* 航点ID集合
|
||||
*/
|
||||
@Schema(description = "航点ID集合")
|
||||
private List<String> wayPointIdList;
|
||||
}
|
||||
+181
@@ -0,0 +1,181 @@
|
||||
package com.zlt.tourism.api.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 景点视分页图实体类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 景点视分页图实体类
|
||||
* @create 2024/7/17 14:10
|
||||
**/
|
||||
@Schema(description = "景点视分页图实体类")
|
||||
@Data
|
||||
public class ScenicSpotPageVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@Schema(description = "主键ID")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 景点名称
|
||||
*/
|
||||
@Schema(description = "景点名称")
|
||||
private String scenicSpotName;
|
||||
|
||||
/**
|
||||
* 景点等级
|
||||
*/
|
||||
@Schema(description = "景点等级")
|
||||
private String scenicSpotGrade;
|
||||
|
||||
/**
|
||||
* 地址-省份
|
||||
*/
|
||||
@Schema(description = "地址-省份")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 地址-地市
|
||||
*/
|
||||
@Schema(description = "地址-地市")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 地址-景区
|
||||
*/
|
||||
@Schema(description = "地址-景区")
|
||||
private String scenicArea;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@Schema(description = "地址")
|
||||
private String scenicSpotAddress;
|
||||
|
||||
/**
|
||||
* 标签名称集合
|
||||
*/
|
||||
@Schema(description = "标签名称集合")
|
||||
private List<String> tagNameList;
|
||||
|
||||
/**
|
||||
* 热度
|
||||
*/
|
||||
@Schema(description = "热度")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private BigDecimal hotScore;
|
||||
|
||||
/**
|
||||
* 精选图片集合
|
||||
*/
|
||||
@Schema(description = "精选图片集合")
|
||||
private List<String> featuredPhotoList;
|
||||
|
||||
/**
|
||||
* 双轴视频集合
|
||||
*/
|
||||
@Schema(description = "双轴视频集合")
|
||||
private List<BiaxVideoBaseVO> biaxVideoList;
|
||||
|
||||
/**
|
||||
* 全景照片集合
|
||||
*/
|
||||
@Schema(description = "全景照片集合")
|
||||
private List<PanoramaPhotoBaseVO> panoramaPhotoList;
|
||||
|
||||
/**
|
||||
* 精选航线
|
||||
*/
|
||||
@Schema(description = "精选航线")
|
||||
private List<RouteBaseVO> routeList;
|
||||
|
||||
/**
|
||||
* 简介
|
||||
*/
|
||||
@Schema(description = "简介")
|
||||
private String scenicSpotAbout;
|
||||
|
||||
/**
|
||||
* 关联设备SN
|
||||
*/
|
||||
@Schema(description = "关联设备SN")
|
||||
private String deviceSn;
|
||||
|
||||
/**
|
||||
* 推流地址
|
||||
*/
|
||||
@Schema(description = "推流地址")
|
||||
private List<String> rtmpUrlList;
|
||||
|
||||
/**
|
||||
* 语音介绍URL
|
||||
*/
|
||||
@Schema(description = "语音介绍URL")
|
||||
private String introduceAudioUrl;
|
||||
|
||||
/**
|
||||
* 虚拟浏览入口视频URL
|
||||
*/
|
||||
@Schema(description = "虚拟浏览入口视频URL")
|
||||
private String virtualFlyPhotoUrl;
|
||||
|
||||
/**
|
||||
* 卡片图URL
|
||||
*/
|
||||
@Schema(description = "卡片图URL")
|
||||
private String photoUrl;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@Schema(description = "经度")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private BigDecimal longitude;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@Schema(description = "纬度")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private BigDecimal latitude;
|
||||
|
||||
/**
|
||||
* 高度
|
||||
*/
|
||||
@Schema(description = "高度")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private BigDecimal altitude;
|
||||
|
||||
/**
|
||||
* 是否已收藏(1:是,0:否)
|
||||
*/
|
||||
@Schema(description = "是否已收藏(1:是,0:否)")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Integer isFavourite;
|
||||
|
||||
/**
|
||||
* 配对设备列表
|
||||
*/
|
||||
@Schema(description = "配对设备列表")
|
||||
private List<PairedDeviceVO> pairedDeviceList;
|
||||
|
||||
/**
|
||||
* 机库最新照片
|
||||
*/
|
||||
@Schema(description = "机库最新照片")
|
||||
private String devicePhotoUrl;
|
||||
}
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
package com.zlt.tourism.api.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户视图实体类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 用户视图实体类
|
||||
* @create 2024/7/25 13:30
|
||||
**/
|
||||
@Schema(description = "用户视图实体类")
|
||||
@Data
|
||||
public class SysUserVO {
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@Schema(description = value = "用户头像")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@Schema(description = value = "用户名")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 用户头像URL
|
||||
*/
|
||||
@Schema(description = value = "用户头像URL")
|
||||
private String avatarUrl;
|
||||
|
||||
/**
|
||||
* 员工姓名
|
||||
*/
|
||||
@Schema(description = value = "员工姓名")
|
||||
private String realName;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
@Schema(description = value = "邮箱")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@Schema(description = value = "手机号")
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 用户所属机构由之前的单选变成多选,一个用户可以属于多个机构
|
||||
* 机构IDs
|
||||
*/
|
||||
@Schema(description = value = "用户所属机构")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
/**
|
||||
* 部门 id集合
|
||||
*/
|
||||
@Schema(description = value = "部门 id集合")
|
||||
private List<Long> deptIdList;
|
||||
|
||||
/**
|
||||
* 用户类型 :1 内部账户 2:外部账户 3:临时账户(有过期时间)
|
||||
*/
|
||||
@Schema(description = value = "用户类型")
|
||||
private Integer userType;
|
||||
|
||||
|
||||
/**
|
||||
* 状态 0:禁用 1:正常
|
||||
*/
|
||||
@Schema(description = value = "状态 0:正常 1:禁用")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 主播类型(1:主播,2:副播,-2:不是主播)
|
||||
*/
|
||||
@Schema(description = value = "主播类型(1:主播,2:副播,-2:不是主播)")
|
||||
private Integer streamerType;
|
||||
|
||||
@Schema(description = value = "是否设置密码 0 未设置 1 已设置")
|
||||
private Integer isHasPassword;
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.zlt.tourism.api.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 航点实体类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 航点实体类
|
||||
* @create 2024/7/18 15:40
|
||||
**/
|
||||
@Schema(description = "航点实体类")
|
||||
@Data
|
||||
public class WayPointBaseVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 航点ID
|
||||
*/
|
||||
@Schema(description = "航点ID")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long wayPointId;
|
||||
|
||||
/**
|
||||
* 航点名称
|
||||
*/
|
||||
@Schema(description = "航点名称")
|
||||
private String wayPointName;
|
||||
}
|
||||
+198
@@ -0,0 +1,198 @@
|
||||
package com.zlt.tourism.api.vo;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 航点实体类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 航点实体类
|
||||
* @create 2024/7/19 14:48
|
||||
**/
|
||||
@Schema(description = "航点实体类")
|
||||
@Data
|
||||
public class WayPointVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 航点ID
|
||||
*/
|
||||
@Schema(description = value = "航点ID")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long pointId;
|
||||
|
||||
/**
|
||||
* 航线名称
|
||||
*/
|
||||
@Schema(description = value = "航线名称")
|
||||
private String routeName;
|
||||
|
||||
/**
|
||||
* 航线ID
|
||||
*/
|
||||
@Schema(description = value = "航线ID")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long routeId;
|
||||
|
||||
/**
|
||||
* 航点类型
|
||||
*/
|
||||
@Schema(description = value = "航点类型")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 航点序号
|
||||
*/
|
||||
@Schema(description = value = "航点序号")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Integer index;
|
||||
|
||||
/**
|
||||
* 设备经度
|
||||
*/
|
||||
@Schema(description = value = "设备经度")
|
||||
private String longitude;
|
||||
|
||||
/**
|
||||
* 航点纬度
|
||||
*/
|
||||
@Schema(description = value = "航点纬度")
|
||||
private String latitude;
|
||||
|
||||
/**
|
||||
* 航点高度
|
||||
*/
|
||||
@Schema(description = value = "航点高度")
|
||||
private String altitude;
|
||||
|
||||
/**
|
||||
* 航点方向
|
||||
*/
|
||||
@Schema(description = value = "航点方向")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Float direction;
|
||||
|
||||
/**
|
||||
* 航点速度
|
||||
*/
|
||||
@Schema(description = value = "航点速度")
|
||||
private String speed;
|
||||
|
||||
/**
|
||||
* 航点动作
|
||||
*/
|
||||
@Schema(description = value = "航点动作")
|
||||
private JSONArray action;
|
||||
|
||||
/**
|
||||
* 航点编码
|
||||
*/
|
||||
@Schema(description = value = "航点编码")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 航点属性 0:任务点(有动作的点) 1:起飞点 2:降落点 3:安全点
|
||||
*/
|
||||
@Schema(description = value = "航点属性 0:任务点(有动作的点) 1:起飞点 2:降落点 3:安全点")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Integer propertyType;
|
||||
|
||||
/**
|
||||
* 1 定点转弯 2 协调转弯
|
||||
*/
|
||||
@Schema(description = value = "1 定点转弯 2 协调转弯")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Integer turnType;
|
||||
|
||||
/**
|
||||
* 协调转弯半径
|
||||
*/
|
||||
@Schema(description = value = "协调转弯半径")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Float coordinateRadius;
|
||||
|
||||
/**
|
||||
* 地面机器人地图内x
|
||||
*/
|
||||
@Schema(description = value = "地面机器人地图内x")
|
||||
private String positionX;
|
||||
|
||||
/**
|
||||
* 地面机器人地图内y
|
||||
*/
|
||||
@Schema(description = value = "地面机器人地图内y")
|
||||
private String positionY;
|
||||
|
||||
/**
|
||||
* 机器人的四元数
|
||||
*/
|
||||
@Schema(description = value = "机器人的四元数")
|
||||
private String q1;
|
||||
|
||||
/**
|
||||
* 机器人的四元数
|
||||
*/
|
||||
@Schema(description = value = "机器人的四元数")
|
||||
private String q2;
|
||||
|
||||
/**
|
||||
* 机器人的四元数
|
||||
*/
|
||||
@Schema(description = value = "机器人的四元数")
|
||||
private String q3;
|
||||
|
||||
/**
|
||||
* 机器人的四元数
|
||||
*/
|
||||
@Schema(description = value = "机器人的四元数")
|
||||
private String q4;
|
||||
|
||||
/**
|
||||
* 地图内z
|
||||
*/
|
||||
@Schema(description = value = "地图内z")
|
||||
private String positionZ;
|
||||
|
||||
/**
|
||||
* 转向
|
||||
*/
|
||||
@Schema(description = value = "转向")
|
||||
private String yaw;
|
||||
|
||||
/**
|
||||
* 拍照照片数
|
||||
*/
|
||||
@Schema(description = value = "拍照照片数")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Integer photo;
|
||||
|
||||
/**
|
||||
* 航线类型
|
||||
*/
|
||||
@Schema(description = value = "航线类型")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Integer routeType;
|
||||
|
||||
/**
|
||||
* 航点动作,0:无,1:悬停,2:返航
|
||||
*/
|
||||
@Schema(description = value = "航点动作,0:无,1:悬停,2:返航")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Integer droneActionType;
|
||||
|
||||
/**
|
||||
* 航点ID
|
||||
*/
|
||||
@Schema(description = value = "航点ID")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Integer wayPointId;
|
||||
}
|
||||
+157
@@ -0,0 +1,157 @@
|
||||
package com.zlt.tourism.manager;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.central.common.params.dto.FileInfoDto;
|
||||
import com.zlt.tourism.api.vo.BiaxVideoBaseVO;
|
||||
import com.zlt.tourism.api.vo.BiaxVideoDownTagVO;
|
||||
import com.zlt.tourism.api.vo.BiaxVideoUpTagVO;
|
||||
import com.zlt.tourism.model.tourism.BiaxVideoDownTagEntity;
|
||||
import com.zlt.tourism.model.tourism.BiaxVideoEntity;
|
||||
import com.zlt.tourism.model.tourism.BiaxVideoFeatureTagEntity;
|
||||
import com.zlt.tourism.model.tourism.BiaxVideoUpTagEntity;
|
||||
import com.zlt.tourism.service.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 双轴视频业务类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 双轴视频业务类
|
||||
* @create 2024/7/18 16:15
|
||||
**/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class BiaxVideoManager {
|
||||
|
||||
/**
|
||||
* 双轴视频业务类
|
||||
*/
|
||||
@Autowired
|
||||
private BiaxVideoService biaxVideoService;
|
||||
|
||||
/**
|
||||
* 双轴视频上轴标记业务类
|
||||
*/
|
||||
@Autowired
|
||||
private BiaxVideoUpTagService upTagService;
|
||||
|
||||
/**
|
||||
* 双轴视频下轴标记业务类
|
||||
*/
|
||||
@Autowired
|
||||
private BiaxVideoDownTagService downTagService;
|
||||
|
||||
/**
|
||||
* 标签业务类
|
||||
*/
|
||||
@Autowired
|
||||
private TourismTagService tagService;
|
||||
|
||||
/**
|
||||
* 双轴视频特色景观标签业务类
|
||||
*/
|
||||
@Autowired
|
||||
private BiaxVideoFeatureTagService featureTagService;
|
||||
|
||||
|
||||
/**
|
||||
* 根据主键ID获取实体
|
||||
*
|
||||
* @param id 主键ID
|
||||
* @return
|
||||
*/
|
||||
public BiaxVideoBaseVO getEntity(Long id) {
|
||||
BiaxVideoBaseVO model = new BiaxVideoBaseVO();
|
||||
if (id != null) {
|
||||
BiaxVideoEntity entity = biaxVideoService.getById(id);
|
||||
if (entity != null && entity.getId() != null) {
|
||||
BeanUtil.copyProperties(entity, model);
|
||||
if(StrUtil.isNotEmpty(entity.getVideoFile())){
|
||||
JSONObject json = JSONObject.parseObject(entity.getVideoFile());
|
||||
FileInfoDto fileInfoDto = json.toJavaObject(FileInfoDto.class);
|
||||
model.setFileUrl(fileInfoDto.getUrl());
|
||||
}
|
||||
List<BiaxVideoUpTagVO> upTagList = getBiaxVideoUpTagList(id);
|
||||
model.setUpTagList(upTagList);
|
||||
List<BiaxVideoDownTagVO> downTagList = getBiaxVideoDownTagList(id);
|
||||
model.setDownTagList(downTagList);
|
||||
List<String> featureTagNameList = getBiaxVideoFeatureTagList(id);
|
||||
model.setFeatureTagList(featureTagNameList);
|
||||
}
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据双轴视频ID获取下轴标签列表
|
||||
*
|
||||
* @param biaxVideoId 双轴视频ID
|
||||
* @return
|
||||
*/
|
||||
public List<BiaxVideoDownTagVO> getBiaxVideoDownTagList(Long biaxVideoId) {
|
||||
List<BiaxVideoDownTagVO> list = new ArrayList<>();
|
||||
if (biaxVideoId != null) {
|
||||
List<BiaxVideoDownTagEntity> downTagList = downTagService.getByBiaxVideoId(biaxVideoId);
|
||||
if (downTagList != null && downTagList.size() > 0) {
|
||||
BiaxVideoDownTagVO model;
|
||||
for (BiaxVideoDownTagEntity item : downTagList) {
|
||||
model = new BiaxVideoDownTagVO();
|
||||
BeanUtil.copyProperties(item, model);
|
||||
list.add(model);
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据双轴视频ID获取上轴轴标签列表
|
||||
*
|
||||
* @param biaxVideoId 双轴视频ID
|
||||
* @return
|
||||
*/
|
||||
public List<BiaxVideoUpTagVO> getBiaxVideoUpTagList(Long biaxVideoId) {
|
||||
List<BiaxVideoUpTagVO> list = new ArrayList<>();
|
||||
if (biaxVideoId != null) {
|
||||
List<BiaxVideoUpTagEntity> downTagList = upTagService.getListByBiaxVideoId(biaxVideoId);
|
||||
if (downTagList != null && downTagList.size() > 0) {
|
||||
BiaxVideoUpTagVO model;
|
||||
for (BiaxVideoUpTagEntity item : downTagList) {
|
||||
model = new BiaxVideoUpTagVO();
|
||||
BeanUtil.copyProperties(item, model);
|
||||
list.add(model);
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据双轴视频ID获取特色景观标签列表
|
||||
*
|
||||
* @param biaxVideoId 双轴视频ID
|
||||
* @return
|
||||
*/
|
||||
public List<String> getBiaxVideoFeatureTagList(Long biaxVideoId) {
|
||||
List<String> list = new ArrayList<>();
|
||||
if (biaxVideoId != null) {
|
||||
List<BiaxVideoFeatureTagEntity> featureTagList = featureTagService.getListByBiaxVideoId(biaxVideoId);
|
||||
if (featureTagList != null && featureTagList.size() > 0) {
|
||||
List<String> tagCodeList = featureTagList.stream().filter(o -> o.getTagCode() != null).map(BiaxVideoFeatureTagEntity::getTagCode).collect(Collectors.toList());
|
||||
if (tagCodeList != null && tagCodeList.size() > 0) {
|
||||
list = tagService.getNameListByCodeList(tagCodeList);
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
package com.zlt.tourism.manager;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.central.common.params.dto.FileInfoDto;
|
||||
import com.zlt.tourism.api.vo.PanoramaPhotoBaseVO;
|
||||
import com.zlt.tourism.api.vo.PanoramaPhotoTagVO;
|
||||
import com.zlt.tourism.model.tourism.PanoramaPhotoEntity;
|
||||
import com.zlt.tourism.model.tourism.PanoramaPhotoFeatureTagEntity;
|
||||
import com.zlt.tourism.model.tourism.PanoramaPhotoTagEntity;
|
||||
import com.zlt.tourism.service.PanoramaPhotoFeatureTagService;
|
||||
import com.zlt.tourism.service.PanoramaPhotoService;
|
||||
import com.zlt.tourism.service.PanoramaPhotoTagService;
|
||||
import com.zlt.tourism.service.TourismTagService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 全景照片业务类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 全景照片业务类
|
||||
* @create 2024/7/18 17:37
|
||||
**/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class PanoramaPhotoManager {
|
||||
|
||||
/**
|
||||
* 全景照片业务类
|
||||
*/
|
||||
@Autowired
|
||||
private PanoramaPhotoService panoramaPhotoService;
|
||||
|
||||
/**
|
||||
* 全景照片特色景观标签业务类
|
||||
*/
|
||||
@Autowired
|
||||
private PanoramaPhotoFeatureTagService panoramaPhotoFeatureTagService;
|
||||
|
||||
/**
|
||||
* 标签业务类
|
||||
*/
|
||||
@Autowired
|
||||
private TourismTagService tagService;
|
||||
|
||||
/**
|
||||
* 全景照片标记业务类
|
||||
*/
|
||||
@Autowired
|
||||
private PanoramaPhotoTagService panoramaPhotoTagService;
|
||||
|
||||
/**
|
||||
* 根据主键ID获取记录
|
||||
*
|
||||
* @param id 主键ID
|
||||
* @return
|
||||
*/
|
||||
public PanoramaPhotoBaseVO getEntity(Long id) {
|
||||
PanoramaPhotoBaseVO model = new PanoramaPhotoBaseVO();
|
||||
if (id != null) {
|
||||
PanoramaPhotoEntity entity = panoramaPhotoService.getById(id);
|
||||
if (entity != null && entity.getId() != null) {
|
||||
BeanUtil.copyProperties(entity, model);
|
||||
List<String> featureTagNameList = getPanoramaPhotoFeatureTagList(id);
|
||||
model.setFeatureTagList(featureTagNameList);
|
||||
List<PanoramaPhotoTagVO> tagList = getPanoramaPhotoTagList(id);
|
||||
model.setTagList(tagList);
|
||||
}
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取标记列表
|
||||
* @param panoramaPhotoId 全景照片ID
|
||||
* @return
|
||||
*/
|
||||
public List<PanoramaPhotoTagVO> getPanoramaPhotoTagList(Long panoramaPhotoId) {
|
||||
List<PanoramaPhotoTagVO> list = new ArrayList<>();
|
||||
List<PanoramaPhotoTagEntity> tagList = panoramaPhotoTagService.getListByPanoramaPhotoId(panoramaPhotoId);
|
||||
if(tagList != null && tagList.size() > 0){
|
||||
PanoramaPhotoTagVO model;
|
||||
for (PanoramaPhotoTagEntity item : tagList) {
|
||||
model = new PanoramaPhotoTagVO();
|
||||
BeanUtil.copyProperties(item, model);
|
||||
if(StrUtil.isNotEmpty(item.getPhotoFile())){
|
||||
JSONObject json = JSONObject.parseObject(item.getPhotoFile());
|
||||
FileInfoDto fileInfoDto = json.toJavaObject(FileInfoDto.class);
|
||||
model.setFileUrl(fileInfoDto.getUrl());
|
||||
}
|
||||
list.add(model);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据全景图片ID获取特色景观标签列表
|
||||
*
|
||||
* @param panoramaPhotoId 全景照片ID
|
||||
* @return
|
||||
*/
|
||||
public List<String> getPanoramaPhotoFeatureTagList(Long panoramaPhotoId) {
|
||||
List<String> list = new ArrayList<>();
|
||||
if (panoramaPhotoId != null) {
|
||||
List<PanoramaPhotoFeatureTagEntity> featureTagList = panoramaPhotoFeatureTagService.getListByPanoramaPhotoId(panoramaPhotoId);
|
||||
if (featureTagList != null && featureTagList.size() > 0) {
|
||||
List<String> tagCodeList = featureTagList.stream().filter(o -> o.getTagCode() != null).map(PanoramaPhotoFeatureTagEntity::getTagCode).collect(Collectors.toList());
|
||||
if (tagCodeList != null && tagCodeList.size() > 0) {
|
||||
list = tagService.getNameListByCodeList(tagCodeList);
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
+873
@@ -0,0 +1,873 @@
|
||||
package com.zlt.tourism.manager;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.central.common.params.dto.FileInfoDto;
|
||||
import com.central.common.utils.RSAUtil;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.zlt.tourism.api.dto.BiaxVideoDownTagDTO;
|
||||
import com.zlt.tourism.api.dto.BiaxVideoUpTagDTO;
|
||||
import com.zlt.tourism.api.query.MyFavoritePageQuery;
|
||||
import com.zlt.tourism.api.query.ScenicSpotPageQuery;
|
||||
import com.zlt.tourism.api.vo.*;
|
||||
import com.zlt.tourism.dto.mission.MissionVideoDTO;
|
||||
import com.zlt.tourism.dto.route.WayPointDTO;
|
||||
import com.zlt.tourism.model.iking.IkDeviceEntity;
|
||||
import com.zlt.tourism.model.iking.IkRouteEntity;
|
||||
import com.zlt.tourism.model.iking.MissionImageEntity;
|
||||
import com.zlt.tourism.model.tourism.*;
|
||||
import com.zlt.tourism.service.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 景点业务类
|
||||
*
|
||||
* @author caiji
|
||||
* @version 1.0
|
||||
* @description 景点业务类
|
||||
* @create 2024/7/19 11:43
|
||||
**/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class ScenicSpotManager {
|
||||
|
||||
/**
|
||||
* 景点业务类
|
||||
*/
|
||||
@Autowired
|
||||
private ScenicSpotService scenicSpotService;
|
||||
|
||||
/**
|
||||
* 景点标签业务类
|
||||
*/
|
||||
@Autowired
|
||||
private ScenicSpotTagService scenicSpotTagService;
|
||||
|
||||
/**
|
||||
* 精选图片业务类
|
||||
*/
|
||||
@Autowired
|
||||
private FeaturedPhotoService featuredPhotoService;
|
||||
|
||||
/**
|
||||
* 景点设备关系业务类
|
||||
*/
|
||||
@Autowired
|
||||
private ScenicSpotDeviceService scenicSpotDeviceService;
|
||||
|
||||
/**
|
||||
* 标签业务类
|
||||
*/
|
||||
@Autowired
|
||||
private TourismTagService tagService;
|
||||
|
||||
/**
|
||||
* 精选航线业务类
|
||||
*/
|
||||
@Autowired
|
||||
private FeaturedRouteService featuredRouteService;
|
||||
|
||||
/**
|
||||
* 我的收藏业务类
|
||||
*/
|
||||
@Autowired
|
||||
private MyFavoriteService myFavoriteService;
|
||||
|
||||
/**
|
||||
* 双轴视频业务类
|
||||
*/
|
||||
@Autowired
|
||||
private BiaxVideoService biaxVideoService;
|
||||
|
||||
/**
|
||||
* 上轴标记业务类
|
||||
*/
|
||||
@Autowired
|
||||
private BiaxVideoUpTagService upTagService;
|
||||
|
||||
/**
|
||||
* 下轴标记业务类
|
||||
*/
|
||||
@Autowired
|
||||
private BiaxVideoDownTagService downTagService;
|
||||
|
||||
/**
|
||||
* 双轴视频特色景观标签业务类
|
||||
*/
|
||||
@Autowired
|
||||
private BiaxVideoFeatureTagService biaxVideoFeatureTagService;
|
||||
|
||||
/**
|
||||
* 全景照片业务类
|
||||
*/
|
||||
@Autowired
|
||||
private PanoramaPhotoService panoramaPhotoService;
|
||||
|
||||
/**
|
||||
* 全景照片标签业务类
|
||||
*/
|
||||
@Autowired
|
||||
private PanoramaPhotoTagService panoramaPhotoTagService;
|
||||
|
||||
/**
|
||||
* 航线业务类
|
||||
*/
|
||||
@Resource
|
||||
private RouteManager routeManager;
|
||||
|
||||
/**
|
||||
* 视频业务类
|
||||
*/
|
||||
@Resource
|
||||
private MissionManager missionVideoManager;
|
||||
|
||||
/**
|
||||
* 全景照片特色景观标签业务类
|
||||
*/
|
||||
@Autowired
|
||||
private PanoramaPhotoFeatureTagService panoramaPhotoFeatureTagService;
|
||||
|
||||
/**
|
||||
* 双轴视频业务类
|
||||
*/
|
||||
@Autowired
|
||||
private BiaxVideoManager biaxVideoManager;
|
||||
|
||||
/**
|
||||
* 全景照片业务类
|
||||
*/
|
||||
@Autowired
|
||||
private PanoramaPhotoManager panoramaPhotoManager;
|
||||
|
||||
/**
|
||||
* 设备业务类
|
||||
*/
|
||||
@Autowired
|
||||
private IkDeviceService ikDeviceService;
|
||||
|
||||
/**
|
||||
* 航线业务类
|
||||
*/
|
||||
@Autowired
|
||||
private IkRouteService routeService;
|
||||
|
||||
/**
|
||||
* 任务业务类
|
||||
*/
|
||||
@Autowired
|
||||
private MissionManager missionManager;
|
||||
|
||||
/**
|
||||
* 任务图片业务类
|
||||
*/
|
||||
@Autowired
|
||||
private MissionImageService missionImageService;
|
||||
|
||||
/**
|
||||
* 获取分页
|
||||
*
|
||||
* @param query 查询条件
|
||||
* @param userId 实体
|
||||
* @return
|
||||
*/
|
||||
public PageInfo<ScenicSpotPageVO> getPageList(ScenicSpotPageQuery query, Long userId) {
|
||||
Integer queryType = 1;
|
||||
if (StrUtil.isNotEmpty(query.getQueryType())) {
|
||||
queryType = Integer.parseInt(query.getQueryType());
|
||||
}
|
||||
Map<String, Object> queryMap = new HashMap<>(2);
|
||||
if (StrUtil.isNotEmpty(query.getScenicSpotName())) {
|
||||
queryMap.put("scenicSpotName", query.getScenicSpotName());
|
||||
}
|
||||
PageInfo<ScenicSpotEntity> scenicSpotPageList = new PageInfo();
|
||||
if (queryType == 2) {
|
||||
if(StrUtil.isNotEmpty(query.getTagCode())){
|
||||
queryMap.put("tagCode", query.getTagCode());
|
||||
}
|
||||
scenicSpotPageList = scenicSpotService.getPopularTagPageList(query.getPager(), queryMap);
|
||||
} else if (queryType == 3) {
|
||||
queryMap.put("userId", userId);
|
||||
scenicSpotPageList = scenicSpotService.getMyFavoritePageList(query.getPager(), queryMap);
|
||||
} else {
|
||||
scenicSpotPageList = scenicSpotService.getPopularScenicSpotPageList(query.getPager(), queryMap);
|
||||
}
|
||||
PageInfo<ScenicSpotPageVO> pageList = new PageInfo<>();
|
||||
BeanUtil.copyProperties(scenicSpotPageList, pageList);
|
||||
if (scenicSpotPageList.getList() != null && scenicSpotPageList.getList().size() > 0) {
|
||||
List<ScenicSpotEntity> list = scenicSpotPageList.getList();
|
||||
List<ScenicSpotPageVO> voList = new ArrayList<>(list.size());
|
||||
for (ScenicSpotEntity item : list) {
|
||||
ScenicSpotPageVO model = doToPageVO(item, userId);
|
||||
voList.add(model);
|
||||
}
|
||||
pageList.setList(voList);
|
||||
}
|
||||
return pageList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 实体转换
|
||||
*
|
||||
* @param entity 实体
|
||||
* @param userId 实体
|
||||
* @return
|
||||
*/
|
||||
private ScenicSpotPageVO doToPageVO(ScenicSpotEntity entity, Long userId) {
|
||||
ScenicSpotPageVO model = new ScenicSpotPageVO();
|
||||
BeanUtil.copyProperties(entity, model);
|
||||
if(StrUtil.isNotEmpty(entity.getPhotoFile())){
|
||||
JSONObject json = JSONObject.parseObject(entity.getPhotoFile());
|
||||
FileInfoDto fileInfoDto = json.toJavaObject(FileInfoDto.class);
|
||||
model.setPhotoUrl(fileInfoDto.getUrl());
|
||||
}
|
||||
if(StrUtil.isNotEmpty(entity.getIntroduceAudioFile())){
|
||||
JSONObject json = JSONObject.parseObject(entity.getIntroduceAudioFile());
|
||||
FileInfoDto fileInfoDto = json.toJavaObject(FileInfoDto.class);
|
||||
model.setIntroduceAudioUrl(fileInfoDto.getUrl());
|
||||
}
|
||||
if(StrUtil.isNotEmpty(entity.getVirtualFlyPhotoFile())){
|
||||
JSONObject json = JSONObject.parseObject(entity.getVirtualFlyPhotoFile());
|
||||
FileInfoDto fileInfoDto = json.toJavaObject(FileInfoDto.class);
|
||||
model.setVirtualFlyPhotoUrl(fileInfoDto.getUrl());
|
||||
}
|
||||
List<ScenicSpotDeviceEntity> scenicSpotDeviceList = scenicSpotDeviceService.getListByScenicSpotId(entity.getId());
|
||||
if (scenicSpotDeviceList != null && scenicSpotDeviceList.size() > 0) {
|
||||
model.setDeviceSn(scenicSpotDeviceList.get(0).getDeviceSn());
|
||||
}
|
||||
List<String> tagNameList = new ArrayList<>();
|
||||
List<ScenicSpotTagEntity> scenicSpotTagList = scenicSpotTagService.getListByScenicSpotId(entity.getId());
|
||||
if (scenicSpotTagList != null && scenicSpotTagList.size() > 0) {
|
||||
List<String> tagCodeList = scenicSpotTagList.stream().map(ScenicSpotTagEntity::getTagCode).collect(Collectors.toList());
|
||||
List<TourismTagEntity> tagList = tagService.getListByCodeList(tagCodeList);
|
||||
if (tagList != null && tagList.size() > 0) {
|
||||
tagNameList = tagList.stream().map(TourismTagEntity::getTagName).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
model.setTagNameList(tagNameList);
|
||||
List<String> featuredPhotoUrlList = new ArrayList<>();
|
||||
List<FeaturedPhotoEntity> featuredPhotoList = featuredPhotoService.getListByScenicSpotId(entity.getId());
|
||||
if (featuredPhotoList != null && featuredPhotoList.size() > 0) {
|
||||
for (FeaturedPhotoEntity photoItem : featuredPhotoList) {
|
||||
if(StrUtil.isNotEmpty(photoItem.getPhotoFile())){
|
||||
JSONObject json = JSONObject.parseObject(photoItem.getPhotoFile());
|
||||
FileInfoDto fileInfoDto = json.toJavaObject(FileInfoDto.class);
|
||||
featuredPhotoUrlList.add(fileInfoDto.getUrl());
|
||||
}
|
||||
}
|
||||
}
|
||||
model.setFeaturedPhotoList(featuredPhotoUrlList);
|
||||
List<RouteBaseVO> routeVOList = new ArrayList<>();
|
||||
List<FeaturedRouteEntity> routeList = featuredRouteService.getListByScenicSpotId(entity.getId());
|
||||
if (routeList != null && routeList.size() > 0) {
|
||||
RouteBaseVO routeBaseVO;
|
||||
for (FeaturedRouteEntity item : routeList) {
|
||||
routeBaseVO = new RouteBaseVO();
|
||||
BeanUtil.copyProperties(item, routeBaseVO);
|
||||
if(StrUtil.isNotEmpty(item.getRouteFile())){
|
||||
JSONObject json = JSONObject.parseObject(item.getRouteFile());
|
||||
FileInfoDto fileInfoDto = json.toJavaObject(FileInfoDto.class);
|
||||
routeBaseVO.setFileUrl(fileInfoDto.getUrl());
|
||||
}
|
||||
// if(StrUtil.isEmpty(item.getRouteName())){
|
||||
IkRouteEntity routeDTO = routeService.getById(item.getRouteId());
|
||||
if (routeDTO != null && routeDTO.getRouteRunNum() != null) {
|
||||
/* if (StrUtil.isNotEmpty(routeDTO.getRouteName())) {
|
||||
String routeName = RSAUtil.decryptOne(routeDTO.getRouteName());
|
||||
if(routeName.contains("_")){
|
||||
routeName = routeName.substring(0, routeName.lastIndexOf("_"));
|
||||
}
|
||||
routeBaseVO.setRouteName(routeName);
|
||||
}*/
|
||||
routeBaseVO.setRouteRunNum(routeDTO.getRouteRunNum());
|
||||
}
|
||||
// }
|
||||
List<String> wayPointIdList = new ArrayList<>();
|
||||
List<WayPointDTO> wayPointDTOList = routeManager.getPointListByRoutId(item.getRouteId());
|
||||
if (wayPointDTOList != null && wayPointDTOList.size() > 0) {
|
||||
List<Long> wayPointIdTempList = wayPointDTOList.stream().filter(o -> o.getPointId() != null).map(WayPointDTO::getPointId).collect(Collectors.toList());
|
||||
if(wayPointIdTempList != null && wayPointIdTempList.size() > 0){
|
||||
for (Long wayPointItem :wayPointIdTempList) {
|
||||
wayPointIdList.add(wayPointItem.toString());
|
||||
}
|
||||
}
|
||||
List<String> wayPointCodeList = wayPointDTOList.stream().filter(o -> StrUtil.isNotEmpty(o.getCode())).map(WayPointDTO::getCode).collect(Collectors.toList());
|
||||
if(wayPointCodeList != null && wayPointCodeList.size() > 0){
|
||||
routeBaseVO.setCode(wayPointCodeList.get(0));
|
||||
}
|
||||
}
|
||||
routeBaseVO.setWayPointIdList(wayPointIdList);
|
||||
routeVOList.add(routeBaseVO);
|
||||
}
|
||||
}
|
||||
model.setRouteList(routeVOList);
|
||||
List<BiaxVideoBaseVO> biaxVideoList = new ArrayList<>();
|
||||
List<BiaxVideoEntity> biaxVideoEntityList = biaxVideoService.getListByScenicSpotId(entity.getId());
|
||||
if (biaxVideoEntityList != null && biaxVideoEntityList.size() > 0) {
|
||||
List<Long> biaxVideoIdList = biaxVideoEntityList.stream().map(BiaxVideoEntity::getId).collect(Collectors.toList());
|
||||
List<BiaxVideoDownTagDTO> downTagDTOList = getBiaxVideoDownTagList(biaxVideoIdList);
|
||||
List<BiaxVideoUpTagDTO> upTagDTOList = getBiaxVideoUpTagList(biaxVideoIdList);
|
||||
List<BiaxVideoFeatureTagBaseVO> featureTagList = getBiaxVideoFeatureTagList(biaxVideoIdList);
|
||||
BiaxVideoBaseVO biaxVideoBaseVO;
|
||||
for (BiaxVideoEntity item : biaxVideoEntityList) {
|
||||
biaxVideoBaseVO = new BiaxVideoBaseVO();
|
||||
BeanUtil.copyProperties(item, biaxVideoBaseVO);
|
||||
if(StrUtil.isNotEmpty(item.getVideoFile())){
|
||||
JSONObject json = JSONObject.parseObject(item.getVideoFile());
|
||||
FileInfoDto fileInfoDto = json.toJavaObject(FileInfoDto.class);
|
||||
biaxVideoBaseVO.setFileUrl(fileInfoDto.getUrl());
|
||||
}
|
||||
if (upTagDTOList != null && upTagDTOList.size() > 0) {
|
||||
List<BiaxVideoUpTagDTO> upTagTempList = upTagDTOList.stream().filter(o -> o.getBiaxVideoId().equals(item.getId())).collect(Collectors.toList());
|
||||
if (upTagTempList != null && upTagTempList.size() > 0) {
|
||||
List<BiaxVideoUpTagVO> upTagVOList = new ArrayList<>();
|
||||
BiaxVideoUpTagVO biaxVideoUpTagVO;
|
||||
for (BiaxVideoUpTagDTO biaxVideoUpTagDTO : upTagTempList) {
|
||||
biaxVideoUpTagVO = new BiaxVideoUpTagVO();
|
||||
BeanUtil.copyProperties(biaxVideoUpTagDTO, biaxVideoUpTagVO);
|
||||
upTagVOList.add(biaxVideoUpTagVO);
|
||||
}
|
||||
biaxVideoBaseVO.setUpTagList(upTagVOList);
|
||||
}
|
||||
}
|
||||
if (downTagDTOList != null && downTagDTOList.size() > 0) {
|
||||
List<BiaxVideoDownTagDTO> downTagTempList = downTagDTOList.stream().filter(o -> o.getBiaxVideoId().equals(item.getId())).collect(Collectors.toList());
|
||||
if (downTagTempList != null && downTagTempList.size() > 0) {
|
||||
List<BiaxVideoDownTagVO> biaxVideoDownTagVOList = new ArrayList<>();
|
||||
BiaxVideoDownTagVO biaxVideoDownTagVO;
|
||||
for (BiaxVideoDownTagDTO biaxVideoDownTagDTO : downTagTempList) {
|
||||
biaxVideoDownTagVO = new BiaxVideoDownTagVO();
|
||||
BeanUtil.copyProperties(biaxVideoDownTagDTO, biaxVideoDownTagVO);
|
||||
biaxVideoDownTagVOList.add(biaxVideoDownTagVO);
|
||||
}
|
||||
biaxVideoBaseVO.setDownTagList(biaxVideoDownTagVOList);
|
||||
}
|
||||
}
|
||||
if (featureTagList != null && featureTagList.size() > 0) {
|
||||
List<String> featureTagNameList = featureTagList.stream().filter(o -> o.getBiaxVideoId().equals(item.getId())).map(BiaxVideoFeatureTagBaseVO::getTagName).collect(Collectors.toList());
|
||||
biaxVideoBaseVO.setFeatureTagList(featureTagNameList);
|
||||
}
|
||||
if(item.getRouteId() != null && item.getRouteId() > 0){
|
||||
IkRouteEntity routeDTO = routeService.getById(item.getRouteId());
|
||||
if (routeDTO != null && routeDTO.getRouteRunNum() != null) {
|
||||
if (StrUtil.isNotEmpty(routeDTO.getRouteName())) {
|
||||
String routeName = RSAUtil.decryptOne(routeDTO.getRouteName());
|
||||
if(routeName.contains("_")){
|
||||
routeName = routeName.substring(0, routeName.lastIndexOf("_"));
|
||||
}
|
||||
biaxVideoBaseVO.setRouteName(routeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
biaxVideoList.add(biaxVideoBaseVO);
|
||||
}
|
||||
}
|
||||
model.setBiaxVideoList(biaxVideoList);
|
||||
|
||||
List<PanoramaPhotoBaseVO> panoramaPhotoList = new ArrayList<>();
|
||||
List<PanoramaPhotoEntity> panoramaPhotoEntityList = panoramaPhotoService.getListByScenicSpotId(entity.getId());
|
||||
if (panoramaPhotoEntityList != null && panoramaPhotoEntityList.size() > 0) {
|
||||
List<Long> photoIdList = panoramaPhotoEntityList.stream().map(PanoramaPhotoEntity::getId).collect(Collectors.toList());
|
||||
List<PanoramaPhotoTagEntity> tagList = panoramaPhotoTagService.getListByPanoramaPhotoIdList(photoIdList);
|
||||
PanoramaPhotoBaseVO panoramaPhotoBaseVO;
|
||||
List<PanoramaPhotoFeatureTagBaseVO> featureTagBaseList = getPanoramaPhotoFeatureTagList(photoIdList);
|
||||
for (PanoramaPhotoEntity item : panoramaPhotoEntityList) {
|
||||
panoramaPhotoBaseVO = new PanoramaPhotoBaseVO();
|
||||
BeanUtil.copyProperties(item, panoramaPhotoBaseVO);
|
||||
List<PanoramaPhotoTagVO> panoramaPhotoTagList = new ArrayList<>();
|
||||
if (tagList != null && tagList.size() > 0) {
|
||||
PanoramaPhotoTagVO panoramaPhotoTagVO;
|
||||
for (PanoramaPhotoTagEntity tagItem : tagList) {
|
||||
panoramaPhotoTagVO = new PanoramaPhotoTagVO();
|
||||
BeanUtil.copyProperties(tagItem, panoramaPhotoTagVO);
|
||||
if(StrUtil.isNotEmpty(tagItem.getPhotoFile())){
|
||||
JSONObject json = JSONObject.parseObject(tagItem.getPhotoFile());
|
||||
FileInfoDto fileInfoDto = json.toJavaObject(FileInfoDto.class);
|
||||
panoramaPhotoTagVO.setFileUrl(fileInfoDto.getUrl());
|
||||
}
|
||||
panoramaPhotoTagList.add(panoramaPhotoTagVO);
|
||||
}
|
||||
}
|
||||
panoramaPhotoBaseVO.setTagList(panoramaPhotoTagList);
|
||||
if (featureTagBaseList != null && featureTagBaseList.size() > 0) {
|
||||
List<String> featureTagNameList = featureTagBaseList.stream().filter(o -> o.getPanoramaPhotoId().equals(item.getId())).map(PanoramaPhotoFeatureTagBaseVO::getTagName).collect(Collectors.toList());
|
||||
panoramaPhotoBaseVO.setFeatureTagList(featureTagNameList);
|
||||
}
|
||||
panoramaPhotoList.add(panoramaPhotoBaseVO);
|
||||
}
|
||||
}
|
||||
model.setPanoramaPhotoList(panoramaPhotoList);
|
||||
List<String> rtmpUrlList = new ArrayList<>();
|
||||
if (StrUtil.isNotEmpty(model.getDeviceSn())) {
|
||||
List<MissionVideoDTO> missionVideoDTOList = missionVideoManager.getListByDeviceSn(model.getDeviceSn());
|
||||
if (missionVideoDTOList != null && missionVideoDTOList.size() > 0) {
|
||||
rtmpUrlList = missionVideoDTOList.stream().filter(o -> StrUtil.isNotEmpty(o.getUrl())).map(MissionVideoDTO::getUrl).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
model.setRtmpUrlList(rtmpUrlList);
|
||||
Integer isFavourite = 0;
|
||||
long count = myFavoriteService.countByScenicSpotIdAndUserId(model.getId(), userId);
|
||||
if (count > 0) {
|
||||
isFavourite = 1;
|
||||
}
|
||||
if (StrUtil.isNotEmpty(model.getDeviceSn())) {
|
||||
List<PairedDeviceVO> pairedDeviceList = getPairedDeviceList(model.getDeviceSn());
|
||||
model.setPairedDeviceList(pairedDeviceList);
|
||||
IkDeviceEntity ikDeviceEntity = ikDeviceService.getByDeviceSn(model.getDeviceSn());
|
||||
if(ikDeviceEntity != null && ikDeviceEntity.getId() != null){
|
||||
MissionImageEntity missionImageEntity = missionImageService.getLastOneByDeviceId(ikDeviceEntity.getId());
|
||||
if(missionImageEntity != null && StrUtil.isNotEmpty(missionImageEntity.getThumbnailUrl())){
|
||||
try {
|
||||
String devicePhotoUrl = RSAUtil.decryptOne(missionImageEntity.getThumbnailUrl());
|
||||
model.setDevicePhotoUrl(devicePhotoUrl);
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
model.setIsFavourite(isFavourite);
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据机库SN获取配对设备列表
|
||||
* @param deviceSn 机库SN
|
||||
* @return
|
||||
*/
|
||||
private List<PairedDeviceVO> getPairedDeviceList(String deviceSn){
|
||||
List<PairedDeviceVO> list = new ArrayList<>();
|
||||
List<IkDeviceEntity> pairedList = ikDeviceService.getPairedListByDeviceSn(deviceSn);
|
||||
if (pairedList != null && pairedList.size() > 0) {
|
||||
for (IkDeviceEntity item : pairedList) {
|
||||
PairedDeviceVO model = new PairedDeviceVO();
|
||||
model.setDeviceSn(item.getDeviceSn());
|
||||
List<MissionVideoDTO> missionVideoDTOList = missionVideoManager.getListByDeviceSn(item.getDeviceSn());
|
||||
if (missionVideoDTOList != null && missionVideoDTOList.size() > 0) {
|
||||
List<String> rtmpUrlList = missionVideoDTOList.stream().filter(o -> StrUtil.isNotEmpty(o.getUrl())).map(MissionVideoDTO::getUrl).distinct().collect(Collectors.toList());
|
||||
if(rtmpUrlList != null && rtmpUrlList.size() > 0){
|
||||
List<String> rtmpUrlTempList = rtmpUrlList.stream().filter(o -> o.contains("_red")).collect(Collectors.toList());
|
||||
if(rtmpUrlTempList == null || rtmpUrlTempList.size() == 0){
|
||||
rtmpUrlList.add(rtmpUrlList.get(0) + "_red");
|
||||
}
|
||||
model.setRtmpUrlList(rtmpUrlList);
|
||||
}
|
||||
}
|
||||
list.add(model);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据双轴视频ID集合获取下轴标签列表
|
||||
*
|
||||
* @param biaxVideoIdList 双轴视频ID集合
|
||||
* @return
|
||||
*/
|
||||
public List<BiaxVideoDownTagDTO> getBiaxVideoDownTagList(List<Long> biaxVideoIdList) {
|
||||
List<BiaxVideoDownTagDTO> list = new ArrayList<>();
|
||||
if (biaxVideoIdList != null && biaxVideoIdList.size() > 0) {
|
||||
List<BiaxVideoDownTagEntity> downTagList = downTagService.getListByBiaxVideoIdList(biaxVideoIdList);
|
||||
if (downTagList != null && downTagList.size() > 0) {
|
||||
BiaxVideoDownTagDTO model;
|
||||
for (BiaxVideoDownTagEntity item : downTagList) {
|
||||
model = new BiaxVideoDownTagDTO();
|
||||
BeanUtil.copyProperties(item, model);
|
||||
list.add(model);
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据双轴视频ID集合获取上轴轴标签列表
|
||||
*
|
||||
* @param biaxVideoIdList 双轴视频ID集合
|
||||
* @return
|
||||
*/
|
||||
public List<BiaxVideoUpTagDTO> getBiaxVideoUpTagList(List<Long> biaxVideoIdList) {
|
||||
List<BiaxVideoUpTagDTO> list = new ArrayList<>();
|
||||
if (biaxVideoIdList != null && biaxVideoIdList.size() > 0) {
|
||||
List<BiaxVideoUpTagEntity> downTagList = upTagService.getListByBiaxVideoIdList(biaxVideoIdList);
|
||||
if (downTagList != null && downTagList.size() > 0) {
|
||||
BiaxVideoUpTagDTO model;
|
||||
for (BiaxVideoUpTagEntity item : downTagList) {
|
||||
model = new BiaxVideoUpTagDTO();
|
||||
BeanUtil.copyProperties(item, model);
|
||||
list.add(model);
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据双轴视频ID集合获取特色景观标签列表
|
||||
*
|
||||
* @param biaxVideoIdList 双轴视频ID集合
|
||||
* @return
|
||||
*/
|
||||
public List<BiaxVideoFeatureTagBaseVO> getBiaxVideoFeatureTagList(List<Long> biaxVideoIdList) {
|
||||
List<BiaxVideoFeatureTagBaseVO> list = new ArrayList<>();
|
||||
if (biaxVideoIdList != null && biaxVideoIdList.size() > 0) {
|
||||
List<BiaxVideoFeatureTagEntity> featureTagList = biaxVideoFeatureTagService.getListByBiaxVideoIdList(biaxVideoIdList);
|
||||
if (featureTagList != null && featureTagList.size() > 0) {
|
||||
for (BiaxVideoFeatureTagEntity item : featureTagList) {
|
||||
TourismTagEntity tourismTagEntity = tagService.getByCode(item.getTagCode());
|
||||
if (tourismTagEntity != null && StrUtil.isNotEmpty(tourismTagEntity.getTagName())) {
|
||||
BiaxVideoFeatureTagBaseVO model = new BiaxVideoFeatureTagBaseVO();
|
||||
model.setBiaxVideoId(item.getBiaxVideoId());
|
||||
model.setTagName(tourismTagEntity.getTagName());
|
||||
list.add(model);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据全景图片ID集合获取特色景观标签列表
|
||||
*
|
||||
* @param panoramaPhotoIdList 全景照片ID集合
|
||||
* @return
|
||||
*/
|
||||
public List<PanoramaPhotoFeatureTagBaseVO> getPanoramaPhotoFeatureTagList(List<Long> panoramaPhotoIdList) {
|
||||
List<PanoramaPhotoFeatureTagBaseVO> list = new ArrayList<>();
|
||||
if (panoramaPhotoIdList != null && panoramaPhotoIdList.size() > 0) {
|
||||
List<PanoramaPhotoFeatureTagEntity> featureTagList = panoramaPhotoFeatureTagService.getListByPanoramaPhotoIdList(panoramaPhotoIdList);
|
||||
if (featureTagList != null && featureTagList.size() > 0) {
|
||||
for (PanoramaPhotoFeatureTagEntity item : featureTagList) {
|
||||
TourismTagEntity tourismTagEntity = tagService.getByCode(item.getTagCode());
|
||||
if (tourismTagEntity != null && StrUtil.isNotEmpty(tourismTagEntity.getTagName())) {
|
||||
PanoramaPhotoFeatureTagBaseVO model = new PanoramaPhotoFeatureTagBaseVO();
|
||||
model.setPanoramaPhotoId(item.getPanoramaPhotoId());
|
||||
model.setTagName(tourismTagEntity.getTagName());
|
||||
list.add(model);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取列表
|
||||
*
|
||||
* @param scenicSpotName 景点名称
|
||||
* @param userId 操作用户ID
|
||||
* @return
|
||||
*/
|
||||
public List<ScenicSpotPageVO> getList(String scenicSpotName, Long userId) {
|
||||
List<ScenicSpotPageVO> list = new ArrayList<>();
|
||||
LambdaQueryWrapper<ScenicSpotEntity> qw = new LambdaQueryWrapper<>();
|
||||
qw.like(StrUtil.isNotEmpty(scenicSpotName), ScenicSpotEntity::getScenicSpotName, scenicSpotName);
|
||||
List<ScenicSpotEntity> entityList = scenicSpotService.list(qw);
|
||||
if (entityList != null && entityList.size() > 0) {
|
||||
for (ScenicSpotEntity item : entityList) {
|
||||
ScenicSpotPageVO model = doToPageVO(item, userId);
|
||||
list.add(model);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取我收藏的景点分页
|
||||
*
|
||||
* @param query 查询条件
|
||||
* @param userId 用户ID
|
||||
* @return
|
||||
*/
|
||||
public PageInfo<MyFavoriteScenicSpotPageVO> getMyFavoritePageList(MyFavoritePageQuery query, Long userId) {
|
||||
Map<String, Object> queryMap = new HashMap<>(2);
|
||||
if (StrUtil.isNotEmpty(query.getScenicSpotName())) {
|
||||
queryMap.put("scenicSpotName", query.getScenicSpotName());
|
||||
}
|
||||
queryMap.put("userId", userId);
|
||||
PageInfo<ScenicSpotEntity> scenicSpotPageList = scenicSpotService.getMyFavoritePageList(query.getPager(), queryMap);
|
||||
PageInfo<MyFavoriteScenicSpotPageVO> pageList = new PageInfo<>();
|
||||
BeanUtil.copyProperties(scenicSpotPageList, pageList);
|
||||
if (scenicSpotPageList.getList() != null && scenicSpotPageList.getList().size() > 0) {
|
||||
List<ScenicSpotEntity> list = scenicSpotPageList.getList();
|
||||
List<MyFavoriteScenicSpotPageVO> voList = new ArrayList<>(list.size());
|
||||
for (ScenicSpotEntity item : list) {
|
||||
MyFavoriteScenicSpotPageVO model = doToMyFavoritePageVO(item, userId);
|
||||
voList.add(model);
|
||||
}
|
||||
pageList.setList(voList);
|
||||
}
|
||||
return pageList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 实体转我的收藏景点实体
|
||||
*
|
||||
* @param entity 景点实体
|
||||
* @param userId 用户ID
|
||||
* @return
|
||||
*/
|
||||
private MyFavoriteScenicSpotPageVO doToMyFavoritePageVO(ScenicSpotEntity entity, Long userId) {
|
||||
MyFavoriteScenicSpotPageVO model = new MyFavoriteScenicSpotPageVO();
|
||||
BeanUtil.copyProperties(entity, model);
|
||||
List<ScenicSpotDeviceEntity> scenicSpotDeviceList = scenicSpotDeviceService.getListByScenicSpotId(entity.getId());
|
||||
if (scenicSpotDeviceList != null && scenicSpotDeviceList.size() > 0) {
|
||||
model.setDeviceSn(scenicSpotDeviceList.get(0).getDeviceSn());
|
||||
}
|
||||
List<String> tagNameList = new ArrayList<>();
|
||||
List<ScenicSpotTagEntity> scenicSpotTagList = scenicSpotTagService.getListByScenicSpotId(entity.getId());
|
||||
if (scenicSpotTagList != null && scenicSpotTagList.size() > 0) {
|
||||
List<String> tagCodeList = scenicSpotTagList.stream().map(ScenicSpotTagEntity::getTagCode).collect(Collectors.toList());
|
||||
List<TourismTagEntity> tagList = tagService.getListByCodeList(tagCodeList);
|
||||
if (tagList != null && tagList.size() > 0) {
|
||||
tagNameList = tagList.stream().map(TourismTagEntity::getTagName).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
model.setTagNameList(tagNameList);
|
||||
List<String> featuredPhotoUrlList = new ArrayList<>();
|
||||
List<FeaturedPhotoEntity> featuredPhotoList = featuredPhotoService.getListByScenicSpotId(entity.getId());
|
||||
if (featuredPhotoList != null && featuredPhotoList.size() > 0) {
|
||||
for (FeaturedPhotoEntity photoItem : featuredPhotoList) {
|
||||
if(StrUtil.isNotEmpty(photoItem.getPhotoFile())){
|
||||
JSONObject json = JSONObject.parseObject(entity.getVirtualFlyPhotoFile());
|
||||
FileInfoDto fileInfoDto = json.toJavaObject(FileInfoDto.class);
|
||||
featuredPhotoUrlList.add(fileInfoDto.getUrl());
|
||||
}
|
||||
}
|
||||
}
|
||||
model.setFeaturedPhotoList(featuredPhotoUrlList);
|
||||
Integer isFavourite = -2;
|
||||
long count = myFavoriteService.countByScenicSpotIdAndUserId(model.getId(), userId);
|
||||
if (count > 0) {
|
||||
isFavourite = 1;
|
||||
}
|
||||
model.setIsFavourite(isFavourite);
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取坐标列表
|
||||
*
|
||||
* @param coordinateType 坐标类型(1:景点,2:双轴视频,3:全景照片)
|
||||
* @param longitude 经度
|
||||
* @param latitude 纬度
|
||||
* @return
|
||||
*/
|
||||
public CoordinateListVO getCoordinateList(Integer coordinateType, BigDecimal longitude, BigDecimal latitude, Long userId) {
|
||||
CoordinateListVO coordinateListVO = new CoordinateListVO();
|
||||
if (coordinateType == null) {
|
||||
List<ScenicSpotPageVO> scenicSpotList = getScenicSpotList(longitude, latitude, userId);
|
||||
if (scenicSpotList != null && scenicSpotList.size() > 0) {
|
||||
coordinateListVO.setScenicSpotList(scenicSpotList);
|
||||
}
|
||||
List<BiaxVideoListVO> biaxVideoList = getBiaxVideoList(longitude, latitude);
|
||||
if (biaxVideoList != null && biaxVideoList.size() > 0) {
|
||||
coordinateListVO.setBiaxVideoList(biaxVideoList);
|
||||
}
|
||||
List<PanoramaPhotoListVO> panoramaPhotoList = getPanoramaPhotoList(longitude, latitude);
|
||||
if (panoramaPhotoList != null && panoramaPhotoList.size() > 0) {
|
||||
coordinateListVO.setPanoramaPhotoList(panoramaPhotoList);
|
||||
}
|
||||
} else {
|
||||
if (1 == coordinateType) {
|
||||
List<ScenicSpotPageVO> scenicSpotList = getScenicSpotList(longitude, latitude, userId);
|
||||
if (scenicSpotList != null && scenicSpotList.size() > 0) {
|
||||
coordinateListVO.setScenicSpotList(scenicSpotList);
|
||||
}
|
||||
} else if (2 == coordinateType) {
|
||||
List<BiaxVideoListVO> biaxVideoList = getBiaxVideoList(longitude, latitude);
|
||||
if (biaxVideoList != null && biaxVideoList.size() > 0) {
|
||||
coordinateListVO.setBiaxVideoList(biaxVideoList);
|
||||
}
|
||||
} else if (3 == coordinateType) {
|
||||
List<PanoramaPhotoListVO> panoramaPhotoList = getPanoramaPhotoList(longitude, latitude);
|
||||
if (panoramaPhotoList != null && panoramaPhotoList.size() > 0) {
|
||||
coordinateListVO.setPanoramaPhotoList(panoramaPhotoList);
|
||||
}
|
||||
}
|
||||
}
|
||||
return coordinateListVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取全景照片坐标列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private List<PanoramaPhotoListVO> getPanoramaPhotoList(BigDecimal longitude, BigDecimal latitude) {
|
||||
List<PanoramaPhotoListVO> list = new ArrayList<>();
|
||||
List<PanoramaPhotoEntity> entityList = new ArrayList<>();
|
||||
List<ScenicSpotEntity> scenicSpotList = new ArrayList<>();
|
||||
if(longitude != null && latitude != null){
|
||||
scenicSpotList = getScenicSpotListByCoordinate(longitude, latitude);
|
||||
if (scenicSpotList != null && scenicSpotList.size() > 0) {
|
||||
List<Long> scenicSpotIdList = scenicSpotList.stream().map(ScenicSpotEntity::getId).collect(Collectors.toList());
|
||||
entityList = panoramaPhotoService.getListByScenicSpotIdList(scenicSpotIdList);
|
||||
}
|
||||
}else{
|
||||
entityList = panoramaPhotoService.list();
|
||||
if(entityList != null && entityList.size() > 0){
|
||||
List<Long> scenicSpotIdList = entityList.stream().map(PanoramaPhotoEntity::getScenicSpotId).collect(Collectors.toList());
|
||||
scenicSpotList = scenicSpotService.listByIds(scenicSpotIdList);
|
||||
}
|
||||
}
|
||||
if (entityList != null && entityList.size() > 0) {
|
||||
PanoramaPhotoListVO model;
|
||||
for (PanoramaPhotoEntity item : entityList) {
|
||||
model = new PanoramaPhotoListVO();
|
||||
BeanUtil.copyProperties(item, model);
|
||||
List<String> featureTagNameList = panoramaPhotoManager.getPanoramaPhotoFeatureTagList(item.getId());
|
||||
model.setFeatureTagList(featureTagNameList);
|
||||
List<PanoramaPhotoTagVO> tagList = panoramaPhotoManager.getPanoramaPhotoTagList(item.getId());
|
||||
model.setTagList(tagList);
|
||||
if (scenicSpotList != null && scenicSpotList.size() > 0) {
|
||||
List<ScenicSpotEntity> tempList = scenicSpotList.stream().filter(o -> item.getScenicSpotId().equals(o.getId())).collect(Collectors.toList());
|
||||
if (tempList != null && tempList.size() > 0) {
|
||||
ScenicSpotEntity scenicSpotEntity = tempList.get(0);
|
||||
if(StrUtil.isNotEmpty(scenicSpotEntity.getPhotoFile())){
|
||||
JSONObject json = JSONObject.parseObject(scenicSpotEntity.getPhotoFile());
|
||||
FileInfoDto fileInfoDto = json.toJavaObject(FileInfoDto.class);
|
||||
model.setPhotoUrl(fileInfoDto.getUrl());
|
||||
}
|
||||
}
|
||||
}
|
||||
list.add(model);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取双轴视频坐标列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private List<BiaxVideoListVO> getBiaxVideoList(BigDecimal longitude, BigDecimal latitude) {
|
||||
List<BiaxVideoListVO> list = new ArrayList<>();
|
||||
List<BiaxVideoEntity> entityList = new ArrayList<>();
|
||||
List<ScenicSpotEntity> scenicSpotList = new ArrayList<>();
|
||||
if(longitude != null && latitude != null){
|
||||
scenicSpotList = getScenicSpotListByCoordinate(longitude, latitude);
|
||||
if (scenicSpotList != null && scenicSpotList.size() > 0) {
|
||||
List<Long> scenicSpotIdList = scenicSpotList.stream().map(ScenicSpotEntity::getId).collect(Collectors.toList());
|
||||
entityList = biaxVideoService.getListByScenicSpotIdList(scenicSpotIdList);
|
||||
}
|
||||
}else{
|
||||
entityList = biaxVideoService.list();
|
||||
if(entityList != null && entityList.size() > 0){
|
||||
List<Long> scenicSpotIdList = entityList.stream().map(BiaxVideoEntity::getScenicSpotId).collect(Collectors.toList());
|
||||
scenicSpotList = scenicSpotService.listByIds(scenicSpotIdList);
|
||||
}
|
||||
}
|
||||
if (entityList != null && entityList.size() > 0) {
|
||||
BiaxVideoListVO model;
|
||||
for (BiaxVideoEntity item : entityList) {
|
||||
model = new BiaxVideoListVO();
|
||||
BeanUtil.copyProperties(item, model);
|
||||
if(StrUtil.isNotEmpty(item.getVideoFile())){
|
||||
JSONObject json = JSONObject.parseObject(item.getVideoFile());
|
||||
FileInfoDto fileInfoDto = json.toJavaObject(FileInfoDto.class);
|
||||
model.setFileUrl(fileInfoDto.getUrl());
|
||||
}
|
||||
List<BiaxVideoUpTagVO> upTagList = biaxVideoManager.getBiaxVideoUpTagList(item.getId());
|
||||
model.setUpTagList(upTagList);
|
||||
List<BiaxVideoDownTagVO> downTagList = biaxVideoManager.getBiaxVideoDownTagList(item.getId());
|
||||
model.setDownTagList(downTagList);
|
||||
List<String> featureTagNameList = biaxVideoManager.getBiaxVideoFeatureTagList(item.getId());
|
||||
model.setFeatureTagList(featureTagNameList);
|
||||
if (scenicSpotList != null && scenicSpotList.size() > 0) {
|
||||
List<ScenicSpotEntity> tempList = scenicSpotList.stream().filter(o -> item.getScenicSpotId().equals(o.getId())).collect(Collectors.toList());
|
||||
if (tempList != null && tempList.size() > 0) {
|
||||
ScenicSpotEntity scenicSpotEntity = tempList.get(0);
|
||||
if(StrUtil.isNotEmpty(scenicSpotEntity.getPhotoFile())){
|
||||
JSONObject json = JSONObject.parseObject(scenicSpotEntity.getPhotoFile());
|
||||
FileInfoDto fileInfoDto = json.toJavaObject(FileInfoDto.class);
|
||||
model.setPhotoUrl(fileInfoDto.getUrl());
|
||||
}
|
||||
}
|
||||
}
|
||||
if(item.getRouteId() != null && item.getRouteId() > 0){
|
||||
IkRouteEntity routeDTO = routeService.getById(item.getRouteId());
|
||||
if (routeDTO != null && routeDTO.getRouteRunNum() != null) {
|
||||
if (StrUtil.isNotEmpty(routeDTO.getRouteName())) {
|
||||
String routeName = RSAUtil.decryptOne(routeDTO.getRouteName());
|
||||
if(routeName.contains("_")){
|
||||
routeName = routeName.substring(0, routeName.lastIndexOf("_"));
|
||||
}
|
||||
model.setRouteName(routeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
list.add(model);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据经纬度获取景点列表
|
||||
* @param longitude 经度
|
||||
* @param latitude 纬度
|
||||
* @return
|
||||
*/
|
||||
private List<ScenicSpotEntity> getScenicSpotListByCoordinate(BigDecimal longitude, BigDecimal latitude){
|
||||
List<ScenicSpotEntity> entityList;
|
||||
if(longitude != null && latitude != null){
|
||||
entityList = scenicSpotService.getNearbyList(longitude, latitude);
|
||||
}else{
|
||||
LambdaQueryWrapper<ScenicSpotEntity> qw = new LambdaQueryWrapper<>();
|
||||
entityList = scenicSpotService.list(qw);
|
||||
}
|
||||
return entityList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取景点坐标列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private List<ScenicSpotPageVO> getScenicSpotList(BigDecimal longitude, BigDecimal latitude, Long userId) {
|
||||
List<ScenicSpotPageVO> list = new ArrayList<>();
|
||||
List<ScenicSpotEntity> entityList = getScenicSpotListByCoordinate(longitude, latitude);
|
||||
if (entityList != null && entityList.size() > 0) {
|
||||
ScenicSpotPageVO model;
|
||||
for (ScenicSpotEntity item : entityList) {
|
||||
model = doToPageVO(item, userId);
|
||||
list.add(model);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主键
|
||||
*
|
||||
* @param id 主键ID
|
||||
* @param userId 用户ID
|
||||
* @return
|
||||
*/
|
||||
public ScenicSpotPageVO getEntity(Long id, Long userId) {
|
||||
ScenicSpotPageVO model = new ScenicSpotPageVO();
|
||||
if (id != null) {
|
||||
ScenicSpotEntity entity = scenicSpotService.getById(id);
|
||||
if (entity != null && entity.getId() != null) {
|
||||
model = doToPageVO(entity, userId);
|
||||
}
|
||||
}
|
||||
return model;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
server:
|
||||
port: 8098
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: cultural-tourism-open-api
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
group: CULTURAL_TOURISM_GROUP
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
package com.ikingtec.tourism.service;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.ikingtec.tourism.model.tourism.TourismOrderEnity;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author: duzhichao
|
||||
* @CreateTime: 2024-12-11 16:36
|
||||
* @Description: 订单测试
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
@Slf4j
|
||||
public class TourismOrderServiceTest {
|
||||
|
||||
@Resource
|
||||
private TourismOrderService tourismOrderService;
|
||||
|
||||
@Resource
|
||||
private IkMissionService ikMissionService;
|
||||
|
||||
@Test
|
||||
public void testExecRoute() throws IOException {
|
||||
Map<String, String> map = tourismOrderService.sendExecRoute("011D73", "aaaaaa", "RJCSDRONE20240011");
|
||||
log.info(MapUtils.getString(map, "result"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMonitorOrderStatus() throws Exception {
|
||||
TourismOrderEnity enity = new TourismOrderEnity();
|
||||
enity.setTakeOffDroneSn("RJCSDRONE20240011");
|
||||
String message = JSON.toJSONString(enity);
|
||||
tourismOrderService.monitorOrderStatus(message);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetDeviceStatus() throws Exception {
|
||||
String deviceStatus = ikMissionService.getDeviceStatus("RJCSDRONE20240011", "droneStatus");
|
||||
log.info(deviceStatus);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
|
||||
version="4.0">
|
||||
</web-app>
|
||||
Reference in New Issue
Block a user