ScenePlusServiceImpl.java 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  1. package com.fdkankan.ucenter.service.impl;
  2. import cn.hutool.core.bean.BeanUtil;
  3. import cn.hutool.core.io.FileUtil;
  4. import cn.hutool.core.thread.ThreadUtil;
  5. import cn.hutool.core.util.StrUtil;
  6. import cn.hutool.extra.qrcode.QrCodeUtil;
  7. import cn.hutool.extra.qrcode.QrConfig;
  8. import cn.hutool.http.HttpUtil;
  9. import com.alibaba.fastjson.JSON;
  10. import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  11. import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
  12. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  13. import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  14. import com.fdkankan.common.constant.CommonStatus;
  15. import com.fdkankan.common.constant.ErrorCode;
  16. import com.fdkankan.common.constant.SceneVersionType;
  17. import com.fdkankan.common.util.FileUtils;
  18. import com.fdkankan.fyun.face.FYunFileServiceInterface;
  19. import com.fdkankan.image.MatrixToImageWriterUtil;
  20. import com.fdkankan.model.utils.CreateObjUtil;
  21. import com.fdkankan.ucenter.common.OssPath;
  22. import com.fdkankan.ucenter.common.PageInfo;
  23. import com.fdkankan.ucenter.common.Result;
  24. import com.fdkankan.ucenter.common.constants.ConstantFilePath;
  25. import com.fdkankan.ucenter.common.constants.NacosProperty;
  26. import com.fdkankan.ucenter.common.constants.UploadFilePath;
  27. import com.fdkankan.redis.constant.RedisKey;
  28. import com.fdkankan.redis.util.RedisUtil;
  29. import com.fdkankan.ucenter.bean.SceneJsonBean;
  30. import com.fdkankan.ucenter.entity.*;
  31. import com.fdkankan.ucenter.httpClient.service.LaserService;
  32. import com.fdkankan.ucenter.mapper.IScenePlusMapper;
  33. import com.fdkankan.ucenter.service.*;
  34. import java.io.File;
  35. import java.nio.charset.StandardCharsets;
  36. import java.util.*;
  37. import java.util.concurrent.CompletableFuture;
  38. import java.util.concurrent.ExecutorService;
  39. import java.util.stream.Collectors;
  40. import com.fdkankan.ucenter.util.RoamingPointUtil;
  41. import com.fdkankan.ucenter.vo.ResponseScene;
  42. import com.fdkankan.ucenter.vo.SceneEditControlsVO;
  43. import com.fdkankan.ucenter.vo.request.RequestScene;
  44. import com.fdkankan.ucenter.vo.response.SceneVo;
  45. import lombok.extern.slf4j.Slf4j;
  46. import org.apache.commons.lang3.ObjectUtils;
  47. import org.springframework.beans.factory.annotation.Autowired;
  48. import org.springframework.beans.factory.annotation.Value;
  49. import org.springframework.stereotype.Service;
  50. import javax.annotation.Resource;
  51. /**
  52. * <p>
  53. * 场景主表 服务实现类
  54. * </p>
  55. *
  56. * @author
  57. * @since 2022-07-04
  58. */
  59. @Service
  60. @Slf4j
  61. public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlus> implements IScenePlusService {
  62. @Value("${fyun.host}")
  63. private String fyunHost;
  64. @Autowired
  65. private IScenePlusExtService scenePlusExtService;
  66. @Autowired
  67. private ISceneEditInfoService sceneEditInfoService;
  68. @Autowired
  69. private ISceneEditInfoExtService sceneEditInfoExtService;
  70. @Autowired
  71. private ISceneEditControlsService sceneEditControlsService;
  72. @Autowired
  73. private ICameraDetailService cameraDetailService;
  74. @Autowired
  75. private ISurveillanceService surveillanceService;
  76. @Autowired
  77. private ISceneProService sceneProService;
  78. @Autowired
  79. FYunFileServiceInterface fYunFileServiceInterface;
  80. @Autowired
  81. RedisUtil redisUtil;
  82. @Autowired
  83. LaserService laserService;
  84. @Autowired
  85. ISceneCopyLogService sceneCopyLogService;
  86. @Autowired
  87. private IUserService userService;
  88. @Autowired
  89. private ICompanyService companyService;
  90. @Override
  91. public Long getCountByUserId(Long userId, List<?> sceneSourceList) {
  92. LambdaQueryWrapper<ScenePlus> wrapper = new LambdaQueryWrapper<>();
  93. wrapper.eq(ScenePlus::getUserId, userId);
  94. wrapper.in(ScenePlus::getSceneSource, sceneSourceList);
  95. return this.count(wrapper);
  96. }
  97. @Override
  98. public Long getCountByUserId(Long userId, Integer cameraType) {
  99. return this.getBaseMapper().getCountByUserId(userId,cameraType);
  100. }
  101. @Override
  102. public List<ScenePlus> getListByCameraId(Long cameraId) {
  103. LambdaQueryWrapper<ScenePlus> wrapper = new LambdaQueryWrapper<>();
  104. wrapper.eq(ScenePlus::getCameraId,cameraId);
  105. return this.list(wrapper);
  106. }
  107. @Override
  108. public void bindOrUnCamera(List<Long> cameraIds, Long userId) {
  109. if(cameraIds.size() >0){
  110. LambdaUpdateWrapper<ScenePlus> wrapper = new LambdaUpdateWrapper<>();
  111. wrapper.set(ScenePlus::getUserId,userId)
  112. .in(ScenePlus::getCameraId,cameraIds);
  113. this.update(wrapper);
  114. }
  115. }
  116. @Override
  117. public List<ScenePlus> getListByCameraIds(List<Long> cameraIds) {
  118. if(cameraIds.size() >0){
  119. LambdaQueryWrapper<ScenePlus> wrapper = new LambdaQueryWrapper<>();
  120. wrapper.in(ScenePlus::getCameraId,cameraIds);
  121. return this.list(wrapper);
  122. }
  123. return new ArrayList<>();
  124. }
  125. @Override
  126. public List<ScenePlus> getListByNums(List<String> numList) {
  127. LambdaQueryWrapper<ScenePlus> wrapper = new LambdaQueryWrapper<>();
  128. wrapper.in(ScenePlus::getNum,numList);
  129. return this.list(wrapper);
  130. }
  131. @Override
  132. public HashMap<Long, ScenePlus> getMapByIds(List<Long> sceneIds) {
  133. LambdaQueryWrapper<ScenePlus> wrapper = new LambdaQueryWrapper<>();
  134. wrapper.in(ScenePlus::getId,sceneIds);
  135. List<ScenePlus> list = this.list(wrapper);
  136. HashMap<Long,ScenePlus> map = new HashMap<>();
  137. list.forEach(entity -> map.put(entity.getId(),entity));
  138. return map;
  139. }
  140. @Override
  141. public ScenePlus getByNum(String sceneNum) {
  142. LambdaQueryWrapper<ScenePlus> wrapper = new LambdaQueryWrapper<>();
  143. wrapper.eq(ScenePlus::getNum,sceneNum);
  144. List<ScenePlus> list = this.list(wrapper);
  145. if(list!=null && list.size() >0){
  146. return list.get(0);
  147. }
  148. return null;
  149. }
  150. @Override
  151. public List<ScenePlus> getByIds(List<Long> plusIds) {
  152. LambdaQueryWrapper<ScenePlus> wrapper = new LambdaQueryWrapper<>();
  153. wrapper.in(ScenePlus::getId,plusIds);
  154. return this.list(wrapper);
  155. }
  156. @Override
  157. public Long copyV4Scene(ScenePlus scenePlus,String newNum ,CameraDetail cameraDetail,String time) throws Exception {
  158. String num = scenePlus.getNum();
  159. Long plusId = scenePlus.getId();
  160. ScenePlusExt plusExt = scenePlusExtService.getByPlusId(plusId);
  161. // 拷贝数据
  162. scenePlus.setNum(newNum);
  163. scenePlus.setId(null);
  164. scenePlus.setSceneStatus(0);
  165. this.save(scenePlus);
  166. ExecutorService executor = ThreadUtil.newSingleExecutor();
  167. try {
  168. CompletableFuture.runAsync(() -> {
  169. try {
  170. // 拷贝场景编辑资源
  171. String oldEditPath = String.format(UploadFilePath.EDIT_PATH, num);
  172. String newEditPath = String.format(UploadFilePath.EDIT_PATH, newNum);
  173. fYunFileServiceInterface.copyFileInBucket(oldEditPath, newEditPath);
  174. // 拷贝场景展示资源
  175. String oldViewPath = String.format(UploadFilePath.VIEW_PATH, num);
  176. String newViewPath = String.format(UploadFilePath.VIEW_PATH, newNum);
  177. fYunFileServiceInterface.copyFileInBucket(oldViewPath, newViewPath);
  178. //复制计算结果文件
  179. String oldResultPath = String.format(UploadFilePath.SCENE_RESULT_DATA_PATH, num);
  180. String newResultPath = String.format(UploadFilePath.SCENE_RESULT_DATA_PATH, newNum);
  181. fYunFileServiceInterface.copyFileInBucket(oldResultPath, newResultPath);
  182. // 拷贝本地资源
  183. String oldPath = String.format("/mnt/4Dkankan/scene/%s/caches/images", num);
  184. String newPath = String.format("/mnt/4Dkankan/scene/%s/caches/images", newNum);
  185. if(new File(oldPath).exists()){
  186. FileUtils.copyDirectiory(oldPath, newPath);
  187. }
  188. String scenePath = ConstantFilePath.SCENE_V4_PATH + num;
  189. File file = new File(scenePath);
  190. if(file.exists()){
  191. String newScenePath = ConstantFilePath.SCENE_V4_PATH + newNum;
  192. FileUtils.copyDirectiory(scenePath, newScenePath);
  193. }
  194. String newVideos = plusExt.getVideos();
  195. if(StrUtil.isNotEmpty(newVideos)){
  196. newVideos = plusExt.getVideos().replaceAll("/data/data" + num, "/scene_view_data/" + newNum + "/data").replaceAll(num, newNum);
  197. }
  198. String oldDataSource = plusExt.getDataSource();
  199. String newDataSource = sceneProService.setDataSource(plusExt.getDataSource(),time);
  200. String buildModelPath = ConstantFilePath.BUILD_MODEL_PATH;
  201. if(scenePlus.getSceneSource() == 4 || scenePlus.getSceneSource() == 5){
  202. buildModelPath = ConstantFilePath.BUILD_MODEL_LASER_PATH;
  203. }
  204. sceneProService.copyFdage(oldDataSource,newDataSource,buildModelPath,time);
  205. plusExt.setId(null);
  206. plusExt.setPlusId(scenePlus.getId());
  207. plusExt.setDataSource(newDataSource);
  208. plusExt.setWebSite(plusExt.getWebSite().replace(num, newNum));
  209. plusExt.setThumb(plusExt.getThumb().replace(num, newNum));
  210. plusExt.setVideos(newVideos);
  211. plusExt.setViewCount(0);
  212. scenePlusExtService.save(plusExt);
  213. SceneEditInfo sceneEditInfo = sceneEditInfoService.getByScenePlusId(plusId);
  214. Long sceneEditInfoId = sceneEditInfo.getId();
  215. sceneEditInfo.setId(null);
  216. sceneEditInfo.setScenePlusId(scenePlus.getId());
  217. sceneEditInfo.setSceneProId(null);
  218. sceneEditInfo.setTitle(scenePlus.getTitle());
  219. sceneEditInfoService.save(sceneEditInfo);
  220. SceneEditInfoExt sceneEditInfoExt = sceneEditInfoExtService.getByEditInfoId(sceneEditInfoId);
  221. sceneEditInfoExt.setId(null);
  222. sceneEditInfoExt.setEditInfoId(sceneEditInfo.getId());
  223. sceneEditInfoExt.setScenePlusId(scenePlus.getId());
  224. sceneEditInfoExt.setSceneProId(null);
  225. sceneEditInfoExtService.save(sceneEditInfoExt);
  226. SceneEditControls sceneEditControls = sceneEditControlsService.getBySceneEditId(sceneEditInfoId);
  227. sceneEditControls.setId(null);
  228. sceneEditControls.setEditInfoId(sceneEditInfo.getId());
  229. sceneEditControlsService.save(sceneEditControls);
  230. if(scenePlus.getSceneSource() == 4 || scenePlus.getSceneSource() == 5){ //深时复制
  231. laserService.copy(num,scenePlus.getCameraId(),scenePlus.getCreateTime(),newNum,0,null,
  232. sceneEditInfo.getScenePassword(),scenePlus.getTitle(),scenePlus.getUserId(),"V4",plusExt.getIsObj(),scenePlus.getSceneSource());
  233. }
  234. List<Surveillance> list = surveillanceService.list(new LambdaQueryWrapper<Surveillance>().eq(Surveillance::getNum, num));
  235. if (!Objects.isNull(list)) {
  236. list.stream().forEach(item -> {
  237. item.setNum(newNum);
  238. item.setId(null);
  239. surveillanceService.save(item);
  240. });
  241. }
  242. //复制马赛克数据
  243. String key = String.format(RedisKey.SCENE_MOSAIC_DATA, num);
  244. Map<String, String> map = redisUtil.hmget(key);
  245. redisUtil.hmset(String.format(RedisKey.SCENE_MOSAIC_DATA, newNum), map);
  246. // 生成scene.json
  247. SceneJsonBean sceneJson = new SceneJsonBean();
  248. BeanUtil.copyProperties(sceneEditInfoExt, sceneJson);
  249. BeanUtil.copyProperties(sceneEditInfo, sceneJson);
  250. SceneEditControlsVO sceneEditControlsVO = BeanUtil.copyProperties(sceneEditControls, SceneEditControlsVO.class);
  251. sceneJson.setControls(sceneEditControlsVO);
  252. sceneJson.setNum(newNum);
  253. sceneJson.setCreateTime(scenePlus.getCreateTime());
  254. sceneJson.setSceneResolution(plusExt.getSceneResolution());
  255. sceneJson.setSceneFrom(plusExt.getSceneFrom());
  256. sceneJson.setSceneKind(plusExt.getSceneKind());
  257. sceneJson.setModelKind(plusExt.getModelKind());
  258. if(StrUtil.isNotEmpty(plusExt.getVideos())){
  259. sceneJson.setVideos(plusExt.getVideos());
  260. }
  261. sceneJson.setMosaicList(sceneEditInfoService.getMosaicList(num));
  262. log.info("开始生成本地json文件……");
  263. String sceneJsonLocalPath = ConstantFilePath.SCENE_PATH + "data" + File.separator + "data" + newNum + File.separator + "scene.json";
  264. FileUtils.writeFile(sceneJsonLocalPath, JSON.toJSONString(sceneJson));
  265. String sceneJsonPath = String.format(UploadFilePath.DATA_VIEW_PATH+"scene.json", newNum);
  266. fYunFileServiceInterface.uploadFile(JSON.toJSONBytes(sceneJson), sceneJsonPath);
  267. //删除scenejson缓存
  268. redisUtil.del(String.format(RedisKey.SCENE_JSON, num));
  269. // 生成二维码
  270. this.createQrCode(newNum, scenePlus.getCameraId(), plusExt.getWebSite(), sceneEditInfoExt.getShareLogoImg(), SceneVersionType.V4.code());
  271. scenePlus.setSceneStatus(-2);
  272. this.updateById(scenePlus);
  273. cameraDetail.setUsedSpace(cameraDetail.getUsedSpace() + plusExt.getSpace());
  274. cameraDetailService.updateById(cameraDetail);
  275. if(scenePlus.getPayStatus() == -2){
  276. sceneProService.updateOssStatus(String.format(OssPath.v4_statusPath,scenePlus.getNum()),-2);
  277. }
  278. if(scenePlus.getSceneSource() == 4 || scenePlus.getSceneSource() == 5){ //深时复制
  279. String laserPath = laserService.copyDataSource(oldDataSource,plusExt.getDataSource());
  280. laserService.copy(num,scenePlus.getCameraId(),scenePlus.getCreateTime(),newNum,2,laserPath,
  281. sceneEditInfo.getScenePassword(),scenePlus.getTitle(),scenePlus.getUserId(),"V4",plusExt.getIsObj(),
  282. scenePlus.getSceneSource());
  283. } else if(!"aws".equals(NacosProperty.uploadType)){
  284. laserService.cloudPointBuild(num,newNum);
  285. }
  286. sceneCopyLogService.saveByNum(num,newNum,scenePlus.getUserId());
  287. }catch (Exception e){
  288. this.removeById(scenePlus.getId());
  289. log.error("复制场景异常", e);
  290. }
  291. }, executor).whenComplete((reslut, e) -> {
  292. log.info("复制场景oldNum:{},newNum:{}结束-{}",num,newNum, new Date());
  293. });
  294. }catch (Exception e){
  295. log.error("线程错误:{}",e);
  296. }finally {
  297. executor.shutdown();
  298. }
  299. return scenePlus.getId();
  300. }
  301. public static void main(String[] args) {
  302. String ext = FileUtil.extName("downloads/scene/KK-gz55kk3T/QRcode/shareLogo.png");
  303. System.out.println(ext);
  304. }
  305. public void createQrCode(String num, Long cameraId, String website, String shareLogoImg, String sceneVersion) {
  306. String localLogoPath = null;
  307. if(StrUtil.isNotEmpty(shareLogoImg)){
  308. if(sceneVersion.equals(SceneVersionType.V3.code())){
  309. localLogoPath = ConstantFilePath.SCENE_PATH + shareLogoImg;
  310. }else{
  311. localLogoPath = ConstantFilePath.SCENE_PATH + "qrLogo/" + UUID.randomUUID().toString() + "." + FileUtil.extName(shareLogoImg);
  312. fYunFileServiceInterface.downloadFile(shareLogoImg, localLogoPath);
  313. }
  314. if(!FileUtil.exist(localLogoPath)){
  315. localLogoPath = null;
  316. }
  317. }
  318. if(StrUtil.isEmpty(localLogoPath)){
  319. CameraDetail cameraDetail = null;
  320. Company company = null;
  321. if(Objects.nonNull(cameraId)){
  322. cameraDetail = cameraDetailService.getByCameraId(cameraId);
  323. if(Objects.nonNull(cameraDetail)){
  324. company = !ObjectUtils.isEmpty(cameraDetail.getCompanyId()) ? companyService.getById(cameraDetail.getCompanyId()) : null;
  325. }
  326. }
  327. shareLogoImg = !ObjectUtils.isEmpty(company) && !ObjectUtils.isEmpty(company.getQrLogo()) ? company.getQrLogo() : null;
  328. if (StrUtil.isNotEmpty(shareLogoImg)) {
  329. try {
  330. localLogoPath = ConstantFilePath.SCENE_PATH + "qrLogo/" + shareLogoImg.substring(shareLogoImg.lastIndexOf("//") + 1);
  331. HttpUtil.downloadFile(shareLogoImg, localLogoPath);
  332. } catch (Exception e) {
  333. log.error("logo下载失败:{}", shareLogoImg);
  334. localLogoPath = null;
  335. }
  336. }
  337. }
  338. //生成二维码
  339. String outPathZh = com.fdkankan.model.constants.ConstantFilePath.BASE_PATH + File.separator + "sceneQRcode/"+ num +".png";
  340. String outPathEn = com.fdkankan.model.constants.ConstantFilePath.BASE_PATH + File.separator + "sceneQRcode/"+ num +"_en.png";
  341. QrConfig qrConfig = QrConfig.create();
  342. qrConfig.setWidth(512);
  343. qrConfig.setHeight(512);
  344. if(!ObjectUtils.isEmpty(localLogoPath)){
  345. qrConfig.setImg(localLogoPath);
  346. }
  347. QrCodeUtil.generate(website, qrConfig, FileUtil.file(outPathZh));
  348. QrCodeUtil.generate(website + "&lang=en", qrConfig, FileUtil.file(outPathEn));
  349. //上传二维码
  350. if(sceneVersion.equals(SceneVersionType.V4.code())){
  351. fYunFileServiceInterface.uploadFile(outPathZh, String.format(com.fdkankan.model.constants.UploadFilePath.DOWNLOADS_QRCODE, num) + num + ".png");
  352. fYunFileServiceInterface.uploadFile(outPathEn, String.format(com.fdkankan.model.constants.UploadFilePath.DOWNLOADS_QRCODE, num) + num + "_en.png");
  353. }
  354. if(!ObjectUtils.isEmpty(localLogoPath)){
  355. FileUtils.deleteFile(localLogoPath);
  356. }
  357. }
  358. @Override
  359. public Result pageSceneWithHouseType(RequestScene param, String token) {
  360. User ssoUser = userService.getByToken(token);
  361. Page<ScenePlus> page = this.page(new Page<>(param.getPageNum(), param.getPageSize()),
  362. new LambdaQueryWrapper<ScenePlus>().eq(ScenePlus::getUserId, ssoUser.getId()).eq(ScenePlus::getHouseType, CommonStatus.YES.code().intValue()));
  363. List<SceneVo> records = null;
  364. if(page.getRecords().size() > 0){
  365. records = page.getRecords().parallelStream().map(plus -> {
  366. return SceneVo.builder().createTime(plus.getCreateTime())
  367. .id(plus.getId()).roamingPointUrl(this.createRoamingPoint(plus.getNum())).sceneName(plus.getTitle())
  368. .num(plus.getNum()).updateTime(plus.getUpdateTime()).userId(plus.getUserId()).build();
  369. }).collect(Collectors.toList());
  370. }
  371. PageInfo pageInfo = PageInfo.PageInfo(page);
  372. pageInfo.setList(records);
  373. return Result.success(pageInfo);
  374. }
  375. @Override
  376. public Result getArPathByNum(String num) {
  377. ScenePro scenePro = sceneProService.getByNum(num);
  378. if(Objects.nonNull(scenePro)){
  379. return Result.success("成功", String.format("images/images%s/ar", num));
  380. }
  381. ScenePlus scenePlus = this.getByNum(num);
  382. if(Objects.nonNull(scenePlus)){
  383. return Result.success("成功", String.format(UploadFilePath.IMG_VIEW_PATH, num) + "ar");
  384. }
  385. return Result.failure(ErrorCode.FAILURE_CODE_5005.code(), ErrorCode.FAILURE_CODE_5005.message());
  386. }
  387. private String createRoamingPoint(String num){
  388. String roamingPointOssPath = String.format(UploadFilePath.DATA_VIEW_PATH, num) + "roamingPoint.json";
  389. String url = null;
  390. try {
  391. if(!fYunFileServiceInterface.fileExist(roamingPointOssPath)){
  392. String visionModeldataPath = ConstantFilePath.SCENE_V4_PATH + num + File.separator + "vision.modeldata";
  393. String visionModeldataOssPath = String.format(UploadFilePath.IMG_VIEW_PATH, num) + "vision.modeldata";
  394. fYunFileServiceInterface.downloadFile(visionModeldataOssPath, visionModeldataPath);
  395. String visionTxtLocalPath = ConstantFilePath.SCENE_V4_PATH + num + File.separator + "vision.txt";
  396. CreateObjUtil.convertVisionmodeldataToTxt(visionModeldataPath, visionTxtLocalPath);
  397. String roamingPoint = RoamingPointUtil.createRoamingPoint(num, visionTxtLocalPath);
  398. if (StrUtil.isNotEmpty(roamingPoint)) {
  399. fYunFileServiceInterface.uploadFile(roamingPoint.getBytes(StandardCharsets.UTF_8), roamingPointOssPath);
  400. url = fyunHost + roamingPointOssPath;
  401. }
  402. }else{
  403. url = fyunHost + roamingPointOssPath;
  404. }
  405. }catch (Exception e){
  406. log.warn("生成roamingPointJson出错,num:" + num, e);
  407. }
  408. return url;
  409. }
  410. }