S0025136190 hace 1 año
padre
commit
bb3db5602a

+ 46 - 0
Backend/pom.xml

@@ -21,6 +21,7 @@
         <maven.compiler.target>11</maven.compiler.target>
         <javax-activation.version>1.1.1</javax-activation.version>
         <mqtt.version>5.5.5</mqtt.version>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     </properties>
 
     <dependencyManagement>
@@ -84,4 +85,49 @@
             </plugin>
         </plugins>
     </build>
+
+
+<!--    <build>-->
+<!--        <plugins>-->
+<!--            <plugin>-->
+<!--                <groupId>org.springframework.boot</groupId>-->
+<!--                <artifactId>spring-boot-maven-plugin</artifactId>-->
+<!--                <version>2.6.3</version>-->
+<!--                <configuration>-->
+<!--                    <mainClass>com.dji.sample.CloudApiSampleApplication</mainClass>-->
+<!--                    &lt;!&ndash;设置为true,以便把本地的system的jar也包括进来&ndash;&gt;-->
+<!--                    <includeSystemScope>true</includeSystemScope>-->
+<!--                    <excludes>-->
+<!--                        <exclude>-->
+<!--                            <groupId>org.projectlombok</groupId>-->
+<!--                            <artifactId>lombok</artifactId>-->
+<!--                        </exclude>-->
+<!--                    </excludes>-->
+<!--                </configuration>-->
+<!--                <executions>-->
+<!--                    <execution>-->
+<!--                        <goals>-->
+<!--                            <goal>repackage</goal>-->
+<!--                        </goals>-->
+<!--                    </execution>-->
+<!--                </executions>-->
+<!--            </plugin>-->
+<!--        </plugins>-->
+<!--    </build>-->
+
+<!--    <build>-->
+<!--        <plugins>-->
+<!--            <plugin>-->
+<!--                <groupId>org.apache.maven.plugins</groupId>-->
+<!--                <artifactId>maven-compiler-plugin</artifactId>-->
+<!--                <version>3.3</version>-->
+<!--                <configuration>-->
+<!--                    <source>${java.version}</source>-->
+<!--                    <target>${java.version}</target>-->
+<!--                    <encoding>${project.build.sourceEncoding}</encoding>-->
+<!--                </configuration>-->
+<!--            </plugin>-->
+<!--        </plugins>-->
+<!--    </build>-->
+
 </project>

+ 30 - 0
Backend/sample/pom.xml

@@ -145,4 +145,34 @@
         </dependency>
 
     </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>2.6.3</version>
+                <configuration>
+                    <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <version>3.1.0</version>
+                <configuration>
+                    <failOnMissingWebXml>false</failOnMissingWebXml>
+                    <warName>${project.artifactId}</warName>
+                </configuration>
+            </plugin>
+        </plugins>
+        <finalName>${project.artifactId}</finalName>
+    </build>
 </project>

+ 4 - 0
Backend/sample/src/main/java/com/dji/sample/CloudApiSampleApplication.java

@@ -1,5 +1,6 @@
 package com.dji.sample;
 
+import lombok.extern.slf4j.Slf4j;
 import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -10,10 +11,13 @@ import org.springframework.scheduling.annotation.EnableScheduling;
 @SpringBootApplication
 @EnableScheduling
 @ComponentScan("com.dji")
+@Slf4j
 public class CloudApiSampleApplication {
 
 	public static void main(String[] args) {
+
 		SpringApplication.run(CloudApiSampleApplication.class, args);
+		log.info("启动成功=============");
 	}
 
 }

+ 13 - 0
Backend/sample/src/main/java/com/dji/sample/manage/controller/WorkspaceController.java

@@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.servlet.http.HttpServletRequest;
+import java.util.List;
 import java.util.Optional;
 
 import static com.dji.sample.component.AuthInterceptor.TOKEN_CLAIM;
@@ -38,4 +39,16 @@ public class WorkspaceController {
 
         return workspaceOpt.isEmpty() ? HttpResultResponse.error() : HttpResultResponse.success(workspaceOpt.get());
     }
+
+    /**
+     * 查询所有工作空间
+     * @param request
+     * @return
+     */
+    @GetMapping("/list")
+    public HttpResultResponse getWorkspaceList(HttpServletRequest request) {
+        List<WorkspaceDTO> workspaceList = workspaceService.getWorkspacList();
+
+        return workspaceList.isEmpty() ? HttpResultResponse.error() : HttpResultResponse.success(workspaceList);
+    }
 }

+ 2 - 0
Backend/sample/src/main/java/com/dji/sample/manage/model/dto/DeviceDTO.java

@@ -72,4 +72,6 @@ public class DeviceDTO {
     private String parentSn;
 
     private String thingVersion;
+
+    private Boolean compatibleStatus;
 }

+ 47 - 0
Backend/sample/src/main/java/com/dji/sample/manage/model/dto/DeviceOprLogsDTO.java

@@ -0,0 +1,47 @@
+package com.dji.sample.manage.model.dto;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.dji.sdk.cloudapi.tsa.TopologyList;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.time.LocalDateTime;
+import java.util.List;
+
+/**
+ * @author hqjiang
+ * @version 1.0
+ * @date 2024/6/21
+ */
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class DeviceOprLogsDTO {
+
+    private String username;
+
+    private String deviceSn;
+
+    private String deviceName;
+
+    private String logInfo;
+
+    private String workspaceId;
+
+    private String workspaceName;
+
+    private Integer type;
+
+    private String bindCode;
+
+    private Long createTime;
+
+    private DeviceDTO children;
+
+}

+ 2 - 0
Backend/sample/src/main/java/com/dji/sample/manage/model/dto/WorkspaceDTO.java

@@ -27,4 +27,6 @@ public class WorkspaceDTO {
     private String platformName;
 
     private String bindCode;
+
+    private String regionName;
 }

+ 49 - 0
Backend/sample/src/main/java/com/dji/sample/manage/model/entity/DeviceOprLogsEntity.java

@@ -0,0 +1,49 @@
+package com.dji.sample.manage.model.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * @author hqjiang
+ * @version 1.0
+ * @date 2024/6/21
+ */
+@TableName("manage_device_opr_logs")
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+public class DeviceOprLogsEntity implements Serializable {
+
+    private static final long serialVersionUID = -12L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    @TableField("username")
+    private String username;
+
+    @TableField("device_sn")
+    private String deviceSn;
+
+    @TableField("log_info")
+    private String logInfo;
+
+    @TableField("workspace_id")
+    private String workspaceId;
+
+    @TableField("type")
+    private Integer type;
+
+    @TableField("bind_code")
+    private String bindCode;
+
+    @TableField(value = "create_time", fill = FieldFill.INSERT)
+    private Long createTime;
+
+}

+ 4 - 0
Backend/sample/src/main/java/com/dji/sample/manage/model/entity/WorkspaceEntity.java

@@ -32,4 +32,8 @@ public class WorkspaceEntity implements Serializable {
 
     @TableField(value = "bind_code")
     private String bindCode;
+
+    @TableField(value = "region_name")
+    private String regionName;
+
 }

+ 8 - 0
Backend/sample/src/main/java/com/dji/sample/manage/service/IUserService.java

@@ -41,4 +41,12 @@ public interface IUserService {
     PaginationData<UserListDTO> getUsersByWorkspaceId(long page, long pageSize, String workspaceId);
 
     Boolean updateUser(String workspaceId, String userId, UserListDTO user);
+
+    /**
+     * 更新用户默认项目工作空间
+     * @param newWorkspaceId
+     * @param userId
+     * @return
+     */
+    Boolean updateUserWorkspace(String newWorkspaceId, String userId);
 }

+ 6 - 0
Backend/sample/src/main/java/com/dji/sample/manage/service/IWorkspaceService.java

@@ -3,6 +3,7 @@ package com.dji.sample.manage.service;
 
 import com.dji.sample.manage.model.dto.WorkspaceDTO;
 
+import java.util.List;
 import java.util.Optional;
 
 public interface IWorkspaceService {
@@ -21,4 +22,9 @@ public interface IWorkspaceService {
      */
     Optional<WorkspaceDTO> getWorkspaceNameByBindCode(String bindCode);
 
+    /**
+     * 查找所有工作空间
+     * @return
+     */
+    List<WorkspaceDTO> getWorkspacList();
 }

+ 32 - 2
Backend/sample/src/main/java/com/dji/sample/manage/service/impl/DeviceServiceImpl.java

@@ -50,6 +50,7 @@ import org.springframework.util.StringUtils;
 import java.time.Instant;
 import java.time.LocalDateTime;
 import java.time.ZoneId;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Optional;
 import java.util.stream.Collectors;
@@ -125,6 +126,9 @@ public class DeviceServiceImpl implements IDeviceService {
     @Autowired
     private AbstractFirmwareService abstractFirmwareService;
 
+    @Autowired
+    private IUserService userService;
+
     @Override
     public void subDeviceOffline(String deviceSn) {
         // If no information about this device exists in the cache, the drone is considered to be offline.
@@ -384,7 +388,8 @@ public class DeviceServiceImpl implements IDeviceService {
                             workspaceService.getWorkspaceByWorkspaceId(entity.getWorkspaceId())
                                     .map(WorkspaceDTO::getWorkspaceName).orElse("") : "")
                     .firmwareStatus(DeviceFirmwareStatusEnum.NOT_UPGRADE)
-                    .thingVersion(entity.getVersion()).build();
+                    .thingVersion(entity.getVersion())
+                    .compatibleStatus(entity.getCompatibleStatus()).build();
         } catch (CloudSDKException e) {
             log.error(e.getLocalizedMessage() + "Entity: {}", entity);
         }
@@ -446,6 +451,11 @@ public class DeviceServiceImpl implements IDeviceService {
             return false;
         }
 
+        //更新登录用户绑定项目工作空间
+        if(StringUtils.hasText(device.getUserId())) {
+            userService.updateUserWorkspace(device.getWorkspaceId(), device.getUserId());
+        }
+
         DeviceDTO redisDevice = deviceOpt.get();
         redisDevice.setWorkspaceId(device.getWorkspaceId());
         deviceRedisService.setDeviceOnline(redisDevice);
@@ -470,7 +480,7 @@ public class DeviceServiceImpl implements IDeviceService {
 
         Page<DeviceEntity> pagination = mapper.selectPage(new Page<>(page, pageSize),
                 new LambdaQueryWrapper<DeviceEntity>()
-                        .eq(DeviceEntity::getDomain, domain)
+                        .in(DeviceEntity::getDomain, DeviceDomainEnum.DRONE.getDomain(),DeviceDomainEnum.DOCK.getDomain())
                         .eq(DeviceEntity::getWorkspaceId, workspaceId)
                         .eq(DeviceEntity::getBoundStatus, true));
         List<DeviceDTO> devicesList = pagination.getRecords().stream().map(this::deviceEntityConvertToDTO)
@@ -484,6 +494,14 @@ public class DeviceServiceImpl implements IDeviceService {
                             device.setChildren(child);
                         });
                     }
+                    //遥控器作为child
+                    if(DeviceDomainEnum.DRONE == device.getDomain()) {
+                        Optional<DeviceDTO> childOpt = getDevice(device.getWorkspaceId(), DeviceDomainEnum.REMOTER_CONTROL.getDomain(), device.getDeviceSn());
+                        childOpt.ifPresent(child -> {
+                            child.setWorkspaceName(device.getWorkspaceName());
+                            device.setChildren(child);
+                        });
+                    }
                 })
                 .collect(Collectors.toList());
         return new PaginationData<DeviceDTO>(devicesList, new Pagination(pagination.getCurrent(), pagination.getSize(), pagination.getTotal()));
@@ -521,6 +539,18 @@ public class DeviceServiceImpl implements IDeviceService {
         return Optional.of(device);
     }
 
+    private Optional<DeviceDTO> getDevice(String workspaceId, Integer domain, String childSn) {
+        List<Integer> domainList = new ArrayList<>();
+        domainList.add(domain);
+        List<DeviceDTO> devicesList = this.getDevicesByParams(DeviceQueryParam.builder().workspaceId(workspaceId).childSn(childSn).domains(domainList).build());
+        if (devicesList.isEmpty()) {
+            return Optional.empty();
+        }
+        DeviceDTO device = devicesList.get(0);
+        device.setStatus(deviceRedisService.checkDeviceOnline(device.getDeviceSn()));
+        return Optional.of(device);
+    }
+
     @Override
     public HttpResultResponse createDeviceOtaJob(String workspaceId, List<DeviceFirmwareUpgradeDTO> upgradeDTOS) {
         List<OtaCreateDevice> deviceOtaFirmwares = deviceFirmwareService.getDeviceOtaFirmware(workspaceId, upgradeDTOS);

+ 16 - 0
Backend/sample/src/main/java/com/dji/sample/manage/service/impl/UserServiceImpl.java

@@ -161,6 +161,22 @@ public class UserServiceImpl implements IUserService {
         return id > 0;
     }
 
+    @Override
+    public Boolean updateUserWorkspace(String newWorkspaceId, String userId) {
+        UserEntity userEntity = mapper.selectOne(
+                new LambdaQueryWrapper<UserEntity>()
+                        .eq(UserEntity::getUserId, userId));
+        if (userEntity == null) {
+            return false;
+        }
+        userEntity.setWorkspaceId(newWorkspaceId);
+        userEntity.setUpdateTime(System.currentTimeMillis());
+        int id = mapper.update(userEntity, new LambdaUpdateWrapper<UserEntity>()
+                .eq(UserEntity::getUserId, userId));
+
+        return id > 0;
+    }
+
     /**
      * Convert database entity objects into user data transfer object.
      * @param entity

+ 9 - 0
Backend/sample/src/main/java/com/dji/sample/manage/service/impl/WorkspaceServiceImpl.java

@@ -10,7 +10,9 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.util.List;
 import java.util.Optional;
+import java.util.stream.Collectors;
 
 @Service
 @Transactional
@@ -36,6 +38,12 @@ public class WorkspaceServiceImpl implements IWorkspaceService {
                 mapper.selectOne(new LambdaQueryWrapper<WorkspaceEntity>().eq(WorkspaceEntity::getBindCode, bindCode))));
     }
 
+    @Override
+    public List<WorkspaceDTO> getWorkspacList() {
+        return mapper.selectList(new LambdaQueryWrapper<WorkspaceEntity>()).stream()
+                        .map(this::entityConvertToDto).collect(Collectors.toList());
+    }
+
     /**
      * Convert database entity objects into workspace data transfer object.
      * @param entity
@@ -52,6 +60,7 @@ public class WorkspaceServiceImpl implements IWorkspaceService {
                 .workspaceDesc(entity.getWorkspaceDesc())
                 .workspaceName(entity.getWorkspaceName())
                 .bindCode(entity.getBindCode())
+                .regionName(entity.getRegionName())
                 .build();
     }
 }

+ 171 - 0
Backend/sample/src/main/resources/application-prd.yml

@@ -0,0 +1,171 @@
+server:
+  port: 6789
+spring:
+  main:
+    allow-bean-definition-overriding: true
+  application:
+    name: cloud-api-sample
+  datasource:
+    druid:
+      type: com.alibaba.druid.pool.DruidDataSource
+      driver-class-name: com.mysql.cj.jdbc.Driver
+      url: jdbc:mysql://60.204.184.98:33308/dji_uas?useSSL=false&allowPublicKeyRetrieval=true
+      username: dji_uas
+      password: AD24cGwazeX5DYeLTaV
+      initial-size: 10
+      min-idle: 10
+      max-active: 20
+      max-wait: 60000
+
+  redis:
+    host: localhost
+    port: 6379
+    database: 0
+    username: # if you enable
+    password:
+    lettuce:
+      pool:
+        max-active: 8
+        max-idle: 8
+        min-idle: 0
+
+  servlet:
+    multipart:
+      max-file-size: 2GB
+      max-request-size: 2GB
+
+jwt:
+  issuer: DJI
+  subject: CloudApiSample
+  secret: CloudApiSample
+  age: 86400
+
+mqtt:
+  # @see com.dji.sample.component.mqtt.model.MqttUseEnum
+  # BASIC parameters are required.
+  BASIC:
+    protocol: MQTT # @see com.dji.sample.component.mqtt.model.MqttProtocolEnum
+    host: xia0miduo.gicp.net
+    port: 1883
+    username: mqttUser
+    password: 123456
+    client-id: hqjiang
+    # If the protocol is ws/wss, this value is required.
+    path:
+  DRC:
+    protocol: WS # @see com.dji.sample.component.mqtt.model.MqttProtocolEnum
+    host: xia0miduo.gicp.net
+    port: 8083
+    path: /mqtt
+    username: mqttUser
+    password: 123456
+
+cloud-sdk:
+  mqtt:
+    # Topics that need to be subscribed when initially connecting to mqtt, multiple topics are divided by ",".
+    inbound-topic: sys/product/+/status,thing/product/+/requests
+
+url:
+  manage:
+    prefix: manage
+    version: /api/v1
+  map:
+    prefix: map
+    version: /api/v1
+  media:
+    prefix: media
+    version: /api/v1
+  wayline:
+    prefix: wayline
+    version: /api/v1
+  storage:
+    prefix: storage
+    version: /api/v1
+  control:
+    prefix: control
+    version: /api/v1
+
+# Tutorial: https://www.alibabacloud.com/help/en/object-storage-service/latest/use-a-temporary-credential-provided-by-sts-to-access-oss
+#oss:
+#  enable: false
+#  provider: ALIYUN # @see com.dji.sample.component.OssConfiguration.model.enums.OssTypeEnum
+#  endpoint: https://oss-cn-hangzhou.aliyuncs.com
+#  access-key: Please enter your access key.
+#  secret-key: Please enter your secret key.
+#  expire: 3600
+#  region: Please enter your oss region. # cn-hangzhou
+#  role-session-name: cloudApi
+#  role-arn: Please enter your role arn. # acs:ram::123456789:role/stsrole
+#  bucket: Please enter your bucket name.
+#  object-dir-prefix: Please enter a folder name.
+
+#oss:
+#  enable: true
+#  provider: aws
+#  endpoint: https://s3.us-east-1.amazonaws.com
+#  access-key:
+#  secret-key:
+#  expire: 3600
+#  region: us-east-1
+#  role-session-name: cloudApi
+#  role-arn:
+#  bucket: cloudapi-bucket
+#  object-dir-prefix: wayline
+
+oss:
+  enable: true
+  provider: minio
+  endpoint: http://xia0miduo.gicp.net:9000
+  access-key: fileadmin
+  secret-key: fileadmin
+  bucket: dji-bucket
+  expire: 3600
+  region: us-east-1
+  object-dir-prefix: wayline
+
+logging:
+  level:
+    com.dji: debug
+  file:
+    name: logs/cloud-api-sample.log
+
+ntp:
+  server:
+    host: Google.mzr.me
+
+# To create a license for an application: https://developer.dji.com/user/apps/#all
+cloud-api:
+  app:
+    id: 146815
+    key: 7c9e9108f2ddcbab32d2b508f452151
+    license: ZK7Dzih4Qc9JCZhDiyDsWJwTW+1rhnnzT1SqDxbdSPVV24bbDC4r1KNjXo7tIPBnPne7ipnXeefP0lJ0OHvxMpkKiag5lFCIndKSvYYdQkyScT3dahCXjmYsd0YyWyHj4tvXoR2DRVq1PdBHLB1iUo2FGLCIZ8QHbGyqglyGdHY=
+
+livestream:
+  url:
+    # It is recommended to use a program to create Token. https://github.com/AgoraIO/Tools/blob/master/DynamicKey/AgoraDynamicKey/java/src/main/java/io/agora/media/RtcTokenBuilder2.java
+    agora:
+      channel: Please enter the agora channel.
+      token: Please enter the agora temporary token.
+      uid:  654321
+
+    # RTMP  Note: This IP is the address of the streaming server. If you want to see livestream on web page, you need to convert the RTMP stream to WebRTC stream.
+    rtmp:
+      url: Please enter the rtmp access address.  # Example: 'rtmp://192.168.1.1/live/'
+    rtsp:
+      username: Please enter the username.
+      password: Please enter the password.
+      port: 8554
+
+    # GB28181 Note:If you don't know what these parameters mean, you can go to Pilot2 and select the GB28181 page in the cloud platform. Where the parameters same as these parameters.
+#    gb28181:
+#      serverIP: Please enter the server ip.
+#      serverPort: Please enter the server port.
+#      serverID: Please enter the server id.
+#      agentID: Please enter the agent id.
+#      agentPassword: Please enter the agent password.
+#      localPort: Please enter the local port.
+#      channel: Please enter the channel.
+
+    # Webrtc: Only supports using whip standard
+    whip:
+      url: Please enter the rtmp access address. #  Example:http://192.168.1.1:1985/rtc/v1/whip/?app=live&stream=

+ 42 - 40
Backend/sample/src/main/resources/application.yml

@@ -1,6 +1,8 @@
 server:
   port: 6789
 spring:
+  profiles:
+    active: prd
   main:
     allow-bean-definition-overriding: true
   application:
@@ -9,7 +11,7 @@ spring:
     druid:
       type: com.alibaba.druid.pool.DruidDataSource
       driver-class-name: com.mysql.cj.jdbc.Driver
-      url: jdbc:mysql://cloud_api_sample_mysql:3306/cloud_sample?useSSL=false&allowPublicKeyRetrieval=true
+      url: jdbc:mysql://localhost:3306/cloud_sample?useSSL=false&allowPublicKeyRetrieval=true
       username: root
       password: root
       initial-size: 10
@@ -18,7 +20,7 @@ spring:
       max-wait: 60000
 
   redis:
-    host: cloud_api_sample_redis
+    host: localhost
     port: 6379
     database: 0
     username: # if you enable
@@ -45,19 +47,19 @@ mqtt:
   # BASIC parameters are required.
   BASIC:
     protocol: MQTT # @see com.dji.sample.component.mqtt.model.MqttProtocolEnum
-    host: Please enter your ip.
+    host: xia0miduo.gicp.net
     port: 1883
-    username: JavaServer
+    username: mqttUser
     password: 123456
-    client-id: 123456
+    client-id: hqjiang
     # If the protocol is ws/wss, this value is required.
     path:
   DRC:
     protocol: WS # @see com.dji.sample.component.mqtt.model.MqttProtocolEnum
-    host: Please enter your ip.
+    host: xia0miduo.gicp.net
     port: 8083
     path: /mqtt
-    username: JavaServer
+    username: mqttUser
     password: 123456
 
 cloud-sdk:
@@ -86,18 +88,18 @@ url:
     version: /api/v1
 
 # Tutorial: https://www.alibabacloud.com/help/en/object-storage-service/latest/use-a-temporary-credential-provided-by-sts-to-access-oss
-oss:
-  enable: false
-  provider: ALIYUN # @see com.dji.sample.component.OssConfiguration.model.enums.OssTypeEnum
-  endpoint: https://oss-cn-hangzhou.aliyuncs.com
-  access-key: Please enter your access key.
-  secret-key: Please enter your secret key.
-  expire: 3600
-  region: Please enter your oss region. # cn-hangzhou
-  role-session-name: cloudApi
-  role-arn: Please enter your role arn. # acs:ram::123456789:role/stsrole
-  bucket: Please enter your bucket name.
-  object-dir-prefix: Please enter a folder name.
+#oss:
+#  enable: false
+#  provider: ALIYUN # @see com.dji.sample.component.OssConfiguration.model.enums.OssTypeEnum
+#  endpoint: https://oss-cn-hangzhou.aliyuncs.com
+#  access-key: Please enter your access key.
+#  secret-key: Please enter your secret key.
+#  expire: 3600
+#  region: Please enter your oss region. # cn-hangzhou
+#  role-session-name: cloudApi
+#  role-arn: Please enter your role arn. # acs:ram::123456789:role/stsrole
+#  bucket: Please enter your bucket name.
+#  object-dir-prefix: Please enter a folder name.
 
 #oss:
 #  enable: true
@@ -112,16 +114,16 @@ oss:
 #  bucket: cloudapi-bucket
 #  object-dir-prefix: wayline
 
-#oss:
-#  enable: true
-#  provider: minio
-#  endpoint: http://192.168.1.1:9000
-#  access-key: minioadmin
-#  secret-key: minioadmin
-#  bucket: cloud-bucket
-#  expire: 3600
-#  region: us-east-1
-#  object-dir-prefix: wayline
+oss:
+  enable: true
+  provider: minio
+  endpoint: http://xia0miduo.gicp.net:9000
+  access-key: fileadmin
+  secret-key: fileadmin
+  bucket: dji-bucket
+  expire: 3600
+  region: us-east-1
+  object-dir-prefix: wayline
 
 logging:
   level:
@@ -136,9 +138,9 @@ ntp:
 # To create a license for an application: https://developer.dji.com/user/apps/#all
 cloud-api:
   app:
-    id: Please enter the app id.
-    key: Please enter the app key.
-    license: Please enter the app license.
+    id: 146815
+    key: 7c9e9108f2ddcbab32d2b508f452151
+    license: ZK7Dzih4Qc9JCZhDiyDsWJwTW+1rhnnzT1SqDxbdSPVV24bbDC4r1KNjXo7tIPBnPne7ipnXeefP0lJ0OHvxMpkKiag5lFCIndKSvYYdQkyScT3dahCXjmYsd0YyWyHj4tvXoR2DRVq1PdBHLB1iUo2FGLCIZ8QHbGyqglyGdHY=
 
 livestream:
   url:
@@ -157,14 +159,14 @@ livestream:
       port: 8554
 
     # GB28181 Note:If you don't know what these parameters mean, you can go to Pilot2 and select the GB28181 page in the cloud platform. Where the parameters same as these parameters.
-    gb28181:
-      serverIP: Please enter the server ip.
-      serverPort: Please enter the server port.
-      serverID: Please enter the server id.
-      agentID: Please enter the agent id.
-      agentPassword: Please enter the agent password.
-      localPort: Please enter the local port.
-      channel: Please enter the channel.
+#    gb28181:
+#      serverIP: Please enter the server ip.
+#      serverPort: Please enter the server port.
+#      serverID: Please enter the server id.
+#      agentID: Please enter the agent id.
+#      agentPassword: Please enter the agent password.
+#      localPort: Please enter the local port.
+#      channel: Please enter the channel.
 
     # Webrtc: Only supports using whip standard
     whip:

+ 2 - 2
Backend/sql/cloud_sample.sql

@@ -1,5 +1,5 @@
-CREATE DATABASE  IF NOT EXISTS `cloud_sample` /*!40100 DEFAULT CHARACTER SET utf8 */;
-USE `cloud_sample`;
+CREATE DATABASE  IF NOT EXISTS `cloud_sample2` /*!40100 DEFAULT CHARACTER SET utf8 */;
+USE `cloud_sample2`;
 
 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;