|
@@ -44,7 +44,7 @@ public class ConvertServiceImpl implements IConvertService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public ResultData scenePush(ScenePushDTO dto) {
|
|
|
+ public ResultData scenePush(ScenePushDTO dto, String convertType) {
|
|
|
JSONObject playload = new JSONObject();
|
|
|
playload.put("stationCode", dto.getStationCode());
|
|
|
playload.put("entityId", dto.getEntityId());
|
|
@@ -56,14 +56,22 @@ public class ConvertServiceImpl implements IConvertService {
|
|
|
JSONObject item = new JSONObject();
|
|
|
item.put("fileName", v.getFileName());
|
|
|
item.put("fileType", v.getFileType());
|
|
|
- item.put("fileUrl", v.getFileUrl());
|
|
|
+ item.put("fileUrl", v.getFileUrl().replace("120.52.40.57", "192.168.53.186").replace("ziyuanfastdfs.chinatowercom.cn", "192.168.53.186"));
|
|
|
return item;
|
|
|
}).collect(Collectors.toList());
|
|
|
playload.put("fileList", fileList);
|
|
|
+ if(StrUtil.isNotEmpty(convertType)){
|
|
|
+ playload.put("convertType", convertType);
|
|
|
+ }
|
|
|
mqProducer.sendByWorkQueue(Constant.QUEUE_SCENE_CONVERT, playload);
|
|
|
return ResultData.ok();
|
|
|
}
|
|
|
|
|
|
+ public static void main(String[] args) {
|
|
|
+ String str = "http://ziyuanfastdfs.chinatowercom.cn:1888/asfsdf/dfsdf.jpg";
|
|
|
+ System.out.println(str.replace("120.52.40.57", "192.168.53.186").replace("ziyuanfastdfs.chinatowercom.cn", "192.168.53.186"));
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public void scenePushHistory() {
|
|
|
List<FullphotoFileindex> fullphotoFileindices = null;
|
|
@@ -79,7 +87,7 @@ public class ConvertServiceImpl implements IConvertService {
|
|
|
String value = redisClient.get(key);
|
|
|
if(StrUtil.isEmpty(value)){
|
|
|
try {
|
|
|
- this.scenePush(ScenePushDTO.builder().stationCode(item.getStationCode()).entityId(item.getEntityId()).build());
|
|
|
+ this.scenePush(ScenePushDTO.builder().stationCode(item.getStationCode()).entityId(item.getEntityId()).build(), null);
|
|
|
redisClient.add(key, "1");
|
|
|
}catch (Exception e){
|
|
|
log.error("history scene push fail, stationCode:{}, entityId:{}", item.getStationCode(), item.getEntityId(), e);
|