|
@@ -6,6 +6,7 @@ import cn.hutool.http.ContentType;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.fdkankan.common.constant.*;
|
|
|
import com.fdkankan.common.exception.BusinessException;
|
|
|
import com.fdkankan.common.util.FileUtils;
|
|
@@ -32,6 +33,7 @@ import java.io.File;
|
|
|
import java.io.IOException;
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
|
public class InnerServiceImpl implements IInnerService {
|
|
@@ -353,4 +355,15 @@ public class InnerServiceImpl implements IInnerService {
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<ScenePlus> listNewCameraScene(String title) {
|
|
|
+ List<CameraDetail> list = cameraDetailService.list(new LambdaQueryWrapper<CameraDetail>().eq(CameraDetail::getType, 20));
|
|
|
+ Set<Long> cameraIds = list.stream().map(v -> v.getCameraId()).collect(Collectors.toSet());
|
|
|
+ return scenePlusService.list(
|
|
|
+ new LambdaQueryWrapper<ScenePlus>()
|
|
|
+ .like(ScenePlus::getTitle, title)
|
|
|
+ .in(ScenePlus::getCameraId, cameraIds)
|
|
|
+ .orderByDesc(ScenePlus::getId).last("limit 5"));
|
|
|
+ }
|
|
|
}
|