1.nginx配置优化

2.飞行视频优化
3.机库在线逻辑优化
This commit is contained in:
sdy 2026-05-28 14:32:11 +08:00
parent 7d2b0edf78
commit 3162f12835
5 changed files with 10 additions and 10 deletions

View File

@ -43,7 +43,7 @@ public class OsdHandler implements MessageHandler {
if (gateway.equals(dockSn)) { if (gateway.equals(dockSn)) {
// log.debug("dock osd --> topic: {}, payload: {}", topic, payload); // log.debug("dock osd --> topic: {}, payload: {}", topic, payload);
if (data.containsKey("network_state")) {//网络状态机库osd分3次上报信息只有网络状态对程序有用其他前端展示即可 if (data.containsKey("network_state")) {//网络状态机库osd分3次上报信息只有网络状态对程序有用其他前端展示即可
CacheUtils.set(BusinessConstant.DOCK_OSD + dockSn, data); CacheUtils.set(BusinessConstant.DOCK_OSD + dockSn, data, 1000 * 5);
//判断飞行结束任务中切到空闲 //判断飞行结束任务中切到空闲
if (data.containsKey("mode_code")) { if (data.containsKey("mode_code")) {
int modeCode = data.getInt("mode_code", -1); int modeCode = data.getInt("mode_code", -1);

View File

@ -302,7 +302,7 @@ public class FlightTaskServiceImpl extends CrudServiceImpl<FlightTaskDao, Flight
private String getVideoCover(String file, String streamUrl) { private String getVideoCover(String file, String streamUrl) {
String fileName = file.replace("live_record" + streamUrl + "/", ""); String fileName = file.replace("live_record" + streamUrl + "/", "");
String videoCoverPath = "live_record" + streamUrl + "/" + FileUtil.getPrefix(fileName) + BusinessConstant.VIDEO_COVER_SUFFIX; String videoCoverPath = "live_record" + streamUrl + "/" + FileUtil.getPrefix(fileName) + BusinessConstant.VIDEO_COVER_SUFFIX;
FfmpegUtils.generateVideoCover(file, "/" + videoCoverPath); FfmpegUtils.generateVideoCover("/" + file, "/" + videoCoverPath);
return videoCoverPath; return videoCoverPath;
} }

View File

@ -13,7 +13,7 @@
<select id="getPreviousTask" resultType="com.multictrl.modules.business.entity.FlightTaskEntity"> <select id="getPreviousTask" resultType="com.multictrl.modules.business.entity.FlightTaskEntity">
SELECT * SELECT *
FROM bus_flight_task FROM bus_flight_task
WHERE create_date > (SELECT create_date FROM uav_route_task WHERE task_id = #{param1}) WHERE create_date > (SELECT create_date FROM bus_flight_task WHERE task_id = #{param1})
<if test="param2 != null and param2.trim() != ''"> <if test="param2 != null and param2.trim() != ''">
and dock_sn = #{param2} and dock_sn = #{param2}
</if> </if>

View File

@ -26,7 +26,7 @@ services:
- /root/dj_multictrl_data/nginx/cert:/etc/nginx/cert - /root/dj_multictrl_data/nginx/cert:/etc/nginx/cert
- /root/dj_multictrl_data/nginx/html:/usr/share/nginx/html - /root/dj_multictrl_data/nginx/html:/usr/share/nginx/html
- /data/dj_multictrl_data/minio/data:/data - /data/dj_multictrl_data/minio/data:/data
- /data/dj_multictrl_data/live_record:/live_record - /data/dj_multictrl_data/live_record:/data/live_record
- /data/dj_multictrl_data/geoserver:/data/geoserver - /data/dj_multictrl_data/geoserver:/data/geoserver
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro

View File

@ -36,12 +36,12 @@ http {
proxy_pass http://dj-multictrl-api:8080/api/; proxy_pass http://dj-multictrl-api:8080/api/;
} }
location ~* /live_record/(.+)$ { #location ~* /live_record/(.+)$ {
add_header Access-Control-Allow-Origin *; # add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS'; # add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization'; # add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
alias /live_record/$1; # alias /live_record/$1;
} #}
location ~* /video/(.+)$ { location ~* /video/(.+)$ {
add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Origin *;