|
@@ -11,8 +11,7 @@ import cn.reghao.tnb.content.app.util.redis.ds.RedisSortedSet;
|
|
|
import cn.reghao.tnb.content.app.vod.service.rcmd.RedisKeys;
|
|
import cn.reghao.tnb.content.app.vod.service.rcmd.RedisKeys;
|
|
|
import cn.reghao.tnb.content.app.vod.service.rcmd.UserInterestBased;
|
|
import cn.reghao.tnb.content.app.vod.service.rcmd.UserInterestBased;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.junit.Test;
|
|
|
|
|
-import org.junit.runner.RunWith;
|
|
|
|
|
|
|
+import org.junit.jupiter.api.Test;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
|
import org.springframework.test.context.ActiveProfiles;
|
|
import org.springframework.test.context.ActiveProfiles;
|
|
@@ -29,7 +28,6 @@ import java.util.stream.Collectors;
|
|
|
@Slf4j
|
|
@Slf4j
|
|
|
@ActiveProfiles("dev")
|
|
@ActiveProfiles("dev")
|
|
|
@SpringBootTest(classes = ContentApplication.class)
|
|
@SpringBootTest(classes = ContentApplication.class)
|
|
|
-@RunWith(SpringRunner.class)
|
|
|
|
|
public class VideoPostTest {
|
|
public class VideoPostTest {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
VideoPostMapper videoPostMapper;
|
|
VideoPostMapper videoPostMapper;
|
|
@@ -92,7 +90,7 @@ public class VideoPostTest {
|
|
|
UserInterestBased userInterestBased;
|
|
UserInterestBased userInterestBased;
|
|
|
@Test
|
|
@Test
|
|
|
public void addTags() {
|
|
public void addTags() {
|
|
|
- List<GroupCount> list = videoPostTagMapper.findByGroupBy();
|
|
|
|
|
|
|
+ /*List<GroupCount> list = videoPostTagMapper.findByGroupBy();
|
|
|
List<String> list0 = list.stream().map(groupCount -> {
|
|
List<String> list0 = list.stream().map(groupCount -> {
|
|
|
String tagId = groupCount.getId();
|
|
String tagId = groupCount.getId();
|
|
|
VideoTag videoTag = videoTagMapper.findByTagId(tagId);
|
|
VideoTag videoTag = videoTagMapper.findByTagId(tagId);
|
|
@@ -107,7 +105,7 @@ public class VideoPostTest {
|
|
|
videoTagMapper.deleteByTagId(tagId);
|
|
videoTagMapper.deleteByTagId(tagId);
|
|
|
videoPostTagMapper.deleteByTagId(tagId);
|
|
videoPostTagMapper.deleteByTagId(tagId);
|
|
|
log.info("delete tag id -> {}", tagId);
|
|
log.info("delete tag id -> {}", tagId);
|
|
|
- });
|
|
|
|
|
|
|
+ });*/
|
|
|
|
|
|
|
|
/*Map<String, List<String>> map = new HashMap<>();
|
|
/*Map<String, List<String>> map = new HashMap<>();
|
|
|
List<VideoTag> list = videoTagMapper.findAll();
|
|
List<VideoTag> list = videoTagMapper.findAll();
|