修复后台批量增加直播链接
This commit is contained in:
@@ -16,5 +16,6 @@ public class LiveUrl {
|
||||
private Integer id;
|
||||
private String type;
|
||||
private String url;
|
||||
private String m3u8_url;
|
||||
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -4,7 +4,7 @@ server:
|
||||
cookie:
|
||||
same-site: None
|
||||
secure: true # 生产是 https 必须 true
|
||||
port: 9005
|
||||
port: 9001
|
||||
#spring:
|
||||
# data:
|
||||
# redis:
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
(game_id, m3u8_url, type)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{gameId}, #{item.url}, #{item.type})
|
||||
(#{gameId}, #{item.m3u8_url}, #{item.type})
|
||||
</foreach>
|
||||
</insert>
|
||||
<delete id="deleteUrlById" parameterType="java.lang.Integer">
|
||||
|
||||
Reference in New Issue
Block a user