|
@@ -24,6 +24,7 @@ import com.fdkankan.redis.constant.RedisKey;
|
|
|
import com.fdkankan.redis.constant.RedisLockKey;
|
|
|
import com.fdkankan.redis.util.RedisLockUtil;
|
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -39,6 +40,7 @@ import java.util.stream.Collectors;
|
|
|
/**
|
|
|
* 初始化空间模型
|
|
|
*/
|
|
|
+@Slf4j
|
|
|
@Component("filtersHandler")
|
|
|
public class FiltersHandler implements UserEditDataHandler {
|
|
|
|
|
@@ -66,10 +68,12 @@ public class FiltersHandler implements UserEditDataHandler {
|
|
|
if(!"eur".equals(env)){
|
|
|
return;
|
|
|
}
|
|
|
+ log.info("国际环境,开始初始化滤镜,num:{}", num);
|
|
|
ScenePlus scenePlus = scenePlusService.getScenePlusByNum(num);
|
|
|
if(scenePlus.getSceneSource() != SceneSource.BM.code()){
|
|
|
return;
|
|
|
}
|
|
|
+ log.info("看看场景,开始初始化滤镜,num:{}", num);
|
|
|
ScenePlusExt scenePlusExt = scenePlusExtService.getScenePlusExtByPlusId(scenePlus.getId());
|
|
|
String dataSource = scenePlusExt.getDataSource();
|
|
|
SceneEditInfo sceneEditInfo = sceneEditInfoService.getByScenePlusId(scenePlus.getId());
|
|
@@ -83,6 +87,7 @@ public class FiltersHandler implements UserEditDataHandler {
|
|
|
String visionPath = dataSource + File.separator + "results" + File.separator + "vision.txt";
|
|
|
|
|
|
List<String> panoramaUuidList = SceneUtil.getPanoramaUuidList(visionPath);
|
|
|
+ log.info("点位id,{}",JSON.toJSONString(panoramaUuidList));
|
|
|
//{saturation: 0.35, brightness: 0.35, contrast: 0.4, temperature: 0.25, id: "0"}
|
|
|
List<JSONObject> collect = panoramaUuidList.stream().map(v -> {
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
@@ -96,6 +101,7 @@ public class FiltersHandler implements UserEditDataHandler {
|
|
|
|
|
|
String key = String.format(RedisKey.SCENE_filter_DATA,num);
|
|
|
List<String> filterList = collect.stream().map(item->JSON.toJSONString(item)).collect(Collectors.toList());
|
|
|
+ log.info("滤镜数据,filterList,{}",JSON.toJSONString(filterList));
|
|
|
redisUtil.del(key);
|
|
|
redisUtil.lRightPushAll(key, filterList);
|
|
|
|