From a7e57e63a967e1580e7f62743b62226f711940c6 Mon Sep 17 00:00:00 2001 From: Ping-6750gre <1131302745@qq.com> Date: Sat, 16 May 2026 12:21:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=90=8E=E5=8F=B0=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E5=A2=9E=E5=8A=A0=E7=9B=B4=E6=92=AD=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/ping/study/model/vo/live/LiveUrl.java | 1 + src/main/java/com/ping/study/service/impl/UrlsServiceImpl.java | 3 +++ src/main/resources/application.yml | 2 +- src/main/resources/mapper/UrlsMapper.xml | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ping/study/model/vo/live/LiveUrl.java b/src/main/java/com/ping/study/model/vo/live/LiveUrl.java index 8ab1210..b0ff4f6 100644 --- a/src/main/java/com/ping/study/model/vo/live/LiveUrl.java +++ b/src/main/java/com/ping/study/model/vo/live/LiveUrl.java @@ -16,5 +16,6 @@ public class LiveUrl { private Integer id; private String type; private String url; + private String m3u8_url; } diff --git a/src/main/java/com/ping/study/service/impl/UrlsServiceImpl.java b/src/main/java/com/ping/study/service/impl/UrlsServiceImpl.java index d92647f..9cc68fc 100644 --- a/src/main/java/com/ping/study/service/impl/UrlsServiceImpl.java +++ b/src/main/java/com/ping/study/service/impl/UrlsServiceImpl.java @@ -4,6 +4,7 @@ import com.ping.study.mapper.UrlsMapper; import com.ping.study.model.dto.addUrls; import com.ping.study.model.vo.live.LiveUrl; import com.ping.study.service.UrlsService; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.StringRedisTemplate; @@ -15,6 +16,7 @@ import java.util.List; import java.util.concurrent.TimeUnit; @Service +@Slf4j public class UrlsServiceImpl implements UrlsService { @Autowired @@ -73,6 +75,7 @@ public class UrlsServiceImpl implements UrlsService { @Override public void addUrls(addUrls addUrls) { + log.info("addUrls:{}",addUrls); urlsMapper.insertUrlsWithGameId(addUrls.getGameId(), addUrls.getUrls()); //删除redis缓存 redisTemplate.delete("live:urls:all"); diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 0fe6000..65b75a6 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -4,7 +4,7 @@ server: cookie: same-site: None secure: true # 生产是 https 必须 true - port: 9005 + port: 9001 #spring: # data: # redis: diff --git a/src/main/resources/mapper/UrlsMapper.xml b/src/main/resources/mapper/UrlsMapper.xml index a8cac0c..d47da68 100644 --- a/src/main/resources/mapper/UrlsMapper.xml +++ b/src/main/resources/mapper/UrlsMapper.xml @@ -89,7 +89,7 @@ (game_id, m3u8_url, type) values - (#{gameId}, #{item.url}, #{item.type}) + (#{gameId}, #{item.m3u8_url}, #{item.type})