瀏覽代碼

[feat] obs桶修改、图片url转译修改

limeng 5 月之前
父節點
當前提交
bc70073b41
共有 14 個文件被更改,包括 65 次插入185 次删除
  1. 10 26
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/JobProjectToWebController.java
  2. 0 8
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/LoginToWebsiteController.java
  3. 7 17
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/TourismProjectToWebController.java
  4. 3 4
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/WebsiteTourismProjectTravelNotesController.java
  5. 21 96
      application-webadmin/src/main/java/com/tourism/webadmin/app/website/service/impl/BasicToWebServiceImpl.java
  6. 6 6
      application-webadmin/src/main/java/com/tourism/webadmin/app/wechat/controller/TakeOutProjectController.java
  7. 5 7
      application-webadmin/src/main/java/com/tourism/webadmin/app/wechat/controller/TourProjectController.java
  8. 0 1
      application-webadmin/src/main/java/com/tourism/webadmin/app/wechat/controller/WechatDeliveryOrderController.java
  9. 7 13
      application-webadmin/src/main/java/com/tourism/webadmin/app/wechat/controller/WechatHomeController.java
  10. 0 2
      application-webadmin/src/main/java/com/tourism/webadmin/back/controller/RestaurantInfoController.java
  11. 0 1
      application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourTourismProjectTravelNotesController.java
  12. 1 1
      application-webadmin/src/main/resources/application-dev.yml
  13. 1 1
      application-webadmin/src/main/resources/application-prod.yml
  14. 4 2
      common/common-additional/src/main/java/com/tourism/common/additional/utils/UrlConvertUtils.java

+ 10 - 26
application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/JobProjectToWebController.java

@@ -3,12 +3,9 @@ package com.tourism.webadmin.app.website.controller;
 import cn.dev33.satoken.annotation.SaIgnore;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.github.pagehelper.page.PageMethod;
-import com.tourism.common.additional.model.FileUrlObject;
-import com.tourism.common.additional.utils.JsonUtils;
 import com.tourism.common.additional.utils.MapConvertUtils;
 import com.tourism.common.additional.utils.StringUtils;
 import com.tourism.common.additional.utils.UrlConvertUtils;
-import com.tourism.common.core.annotation.MyRequestBody;
 import com.tourism.common.core.constant.ErrorCodeEnum;
 import com.tourism.common.core.object.*;
 import com.tourism.common.core.util.MyModelUtil;
@@ -16,7 +13,6 @@ import com.tourism.common.core.util.MyPageUtil;
 import com.tourism.webadmin.app.website.dto.TourismProjectToWebDto;
 import com.tourism.webadmin.back.model.DirectoryInfo;
 import com.tourism.webadmin.back.model.JobProject;
-import com.tourism.webadmin.back.model.TourTourismProjectTravelNotes;
 import com.tourism.webadmin.back.model.TourismFile;
 import com.tourism.webadmin.back.service.JobProjectService;
 import com.tourism.webadmin.back.service.TourismProjectService;
@@ -26,10 +22,8 @@ import io.swagger.v3.oas.annotations.tags.Tag;
 import jakarta.validation.Valid;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.util.CollectionUtils;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.ArrayList;
 import java.util.List;
 
 import static java.util.stream.Collectors.toList;
@@ -94,7 +88,7 @@ public class JobProjectToWebController {
         dataList.stream().forEach(item ->
         {
             if (StringUtils.isNotEmpty(item.getJobUrl())) {
-                List<String> jobUrl = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getId(), item.getJobUrl(), "jobUrl");
+                List<String> jobUrl = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getJobUrl());
                 item.setJobUrlsAfterConvert(jobUrl);
             }
         });
@@ -116,27 +110,17 @@ public class JobProjectToWebController {
             return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
         }
         JobProjectVo jobProjectVo = MyModelUtil.copyTo(jobProject, JobProjectVo.class);
-        List<String> jobUrl = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), jobProjectVo.getId(), jobProjectVo.getJobUrl(), "jobUrl");
+        List<String> jobUrl = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), jobProjectVo.getJobUrl());
         jobProjectVo.setJobUrlsAfterConvert(jobUrl);
-            if(jobProjectVo.getJobFile() != null){
-                // 使用 Jackson 的 ObjectMapper 进行转换
-                ObjectMapper objectMapper = new ObjectMapper();
-                TourismFile tourismFile = objectMapper.convertValue(jobProjectVo.getJobFile(), TourismFile.class);
-                if(StringUtils.isNotEmpty(tourismFile.getFileUrl())){
-                    List<FileUrlObject> fileUrlObjectList1 = JsonUtils.parseFileUrlArray(tourismFile.getFileUrl(), FileUrlObject.class);
-                    if(!CollectionUtils.isEmpty(fileUrlObjectList1)){
-                        ArrayList<String> arrayList = new ArrayList<>();
-                        //遍历每个元素的数组对象,对元素的url对象进行拼接
-                        for (FileUrlObject y : fileUrlObjectList1) {
-                            String imgUrlAfterConvert =
-                                    applicationConfig.getHostIpPort() + y.getDownloadUri() + "?id=" + tourismFile.getId() + "&fieldName=fileUrl&asImage=true&filename=" + y.getFilename();
-                            arrayList.add(imgUrlAfterConvert);
-                        }
-                        tourismFile.setFileUrlsAfterConvert(arrayList);
-                    }
-                    jobProjectVo.setJobFile(MapConvertUtils.convertObjectToMap(tourismFile));
-                }
+        if(jobProjectVo.getJobFile() != null) {
+            // 使用 Jackson 的 ObjectMapper 进行转换
+            ObjectMapper objectMapper = new ObjectMapper();
+            TourismFile tourismFile = objectMapper.convertValue(jobProjectVo.getJobFile(), TourismFile.class);
+            if (StringUtils.isNotEmpty(tourismFile.getFileUrl())) {
+                tourismFile.setFileUrlsAfterConvert(UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), tourismFile.getFileUrl()));
+                jobProjectVo.setJobFile(MapConvertUtils.convertObjectToMap(tourismFile));
             }
+        }
         return ResponseResult.success(jobProjectVo);
     }
 }

+ 0 - 8
application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/LoginToWebsiteController.java

@@ -3,7 +3,6 @@ package com.tourism.webadmin.app.website.controller;
 import cn.binarywang.wx.miniapp.api.WxMaService;
 import cn.binarywang.wx.miniapp.api.WxMaUserService;
 import cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo;
-import cn.dev33.satoken.annotation.SaCheckPermission;
 import cn.dev33.satoken.annotation.SaIgnore;
 import cn.dev33.satoken.session.SaSession;
 import cn.dev33.satoken.stp.StpUtil;
@@ -15,11 +14,8 @@ import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.page.PageMethod;
-import com.ibm.icu.text.Transliterator;
 import com.tourism.common.additional.constant.CacheConstants;
 import com.tourism.common.additional.constant.Constants;
-import com.tourism.common.additional.model.AjaxResult;
 import com.tourism.common.additional.sign.Base64;
 import com.tourism.common.additional.uuid.IdUtils;
 import com.tourism.common.core.constant.ApplicationConstant;
@@ -38,7 +34,6 @@ import com.tourism.webadmin.app.website.dto.CheckImageDto;
 import com.tourism.webadmin.app.website.vo.WebSiteCaptchaImageVo;
 import com.tourism.webadmin.back.dto.TourBookInfoDto;
 import com.tourism.webadmin.app.website.dto.TourUserRegisterDto;
-import com.tourism.webadmin.back.dto.TourCountryCodeDto;
 import com.tourism.webadmin.back.model.TourCountryCode;
 import com.tourism.webadmin.back.model.TourUser;
 import com.tourism.webadmin.back.model.constant.TourUserStatus;
@@ -46,7 +41,6 @@ import com.tourism.webadmin.app.website.service.LoginToWebsiteService;
 import com.tourism.webadmin.back.service.TourCountryCodeService;
 import com.tourism.webadmin.back.service.TourUserService;
 import com.tourism.webadmin.back.util.SMSUtils;
-import com.tourism.webadmin.back.vo.TourCountryCodeVo;
 import com.tourism.webadmin.config.ApplicationConfig;
 import com.tourism.webadmin.upms.model.SysUser;
 import io.swagger.v3.oas.annotations.tags.Tag;
@@ -58,8 +52,6 @@ import jakarta.validation.Valid;
 import lombok.extern.slf4j.Slf4j;
 import me.chanjar.weixin.common.error.WxErrorException;
 import org.apache.commons.lang3.StringUtils;
-import org.dromara.sms4j.api.entity.SmsResponse;
-import org.dromara.sms4j.core.factory.SmsFactory;
 import org.redisson.api.RBucket;
 import org.redisson.api.RedissonClient;
 import org.springframework.beans.factory.annotation.Autowired;

+ 7 - 17
application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/TourismProjectToWebController.java

@@ -89,11 +89,11 @@ public class TourismProjectToWebController {
         //先把imgUrl由jaon转换为List<FileUrlObject>
         dataList.stream().forEach(item ->
         {
-            List<String> urlList = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getId(), item.getHomeHotPicture(), "homeHotPicture");
+            List<String> urlList = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getHomeHotPicture());
             item.setHomeHotPicturesAfterConvert(urlList);
-            List<String> arrayList = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getId(), item.getTourismUrl(), "tourismUrl");
+            List<String> arrayList = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getTourismUrl());
             item.setTourismUrlsAfterConvert(arrayList);
-            List<String> arrayList1 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getId(), item.getTravelNotesBanner(), "travelNotesBanner");
+            List<String> arrayList1 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getTravelNotesBanner());
             item.setTravelNotesBannerAfterConvert(arrayList1);
         });
         return ResponseResult.success(tourismProjectVoMyPageData);
@@ -113,28 +113,18 @@ public class TourismProjectToWebController {
             return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
         }
         TourismProjectVo tourismProjectVo = MyModelUtil.copyTo(tourismProject, TourismProjectVo.class);
-        List<String> arrayList = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), tourismProjectVo.getId(), tourismProjectVo.getTourismUrl(), "tourismUrl");
+        List<String> arrayList = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), tourismProjectVo.getTourismUrl());
         tourismProjectVo.setTourismUrlsAfterConvert(arrayList);
-        List<String> arrayList1 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), tourismProjectVo.getId(), tourismProjectVo.getHomeHotPicture(), "homeHotPicture");
+        List<String> arrayList1 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), tourismProjectVo.getHomeHotPicture());
         tourismProjectVo.setHomeHotPicturesAfterConvert(arrayList1);
-        List<String> arrayList2 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), tourismProjectVo.getId(), tourismProjectVo.getTravelNotesBanner(), "travelNotesBanner");
+        List<String> arrayList2 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), tourismProjectVo.getTravelNotesBanner());
         tourismProjectVo.setTravelNotesBannerAfterConvert(arrayList2);
         if(tourismProjectVo.getTourismFile() != null){
             // 使用 Jackson 的 ObjectMapper 进行转换
             ObjectMapper objectMapper = new ObjectMapper();
             TourismFile tourismFile = objectMapper.convertValue(tourismProjectVo.getTourismFile(), TourismFile.class);
             if(StringUtils.isNotEmpty(tourismFile.getFileUrl())){
-                List<FileUrlObject> fileUrlObjectList = JsonUtils.parseFileUrlArray(tourismFile.getFileUrl(), FileUrlObject.class);
-                if(!CollectionUtils.isEmpty(fileUrlObjectList)){
-                    ArrayList<String> arrayList3 = new ArrayList<>();
-                    //遍历每个元素的数组对象,对元素的url对象进行拼接
-                    for (FileUrlObject y : fileUrlObjectList) {
-                        String imgUrlAfterConvert =
-                                applicationConfig.getHostIpPort() + y.getDownloadUri() + "?id=" + tourismFile.getId() + "&fieldName=fileUrl&asImage=true&filename=" + y.getFilename();
-                        arrayList3.add(imgUrlAfterConvert);
-                    }
-                    tourismFile.setFileUrlsAfterConvert(arrayList3);
-                }
+                tourismFile.setFileUrlsAfterConvert(UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), tourismFile.getFileUrl()));
                 tourismProjectVo.setTourismFile(MapConvertUtils.convertObjectToMap(tourismFile));
             }
         }

+ 3 - 4
application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/WebsiteTourismProjectTravelNotesController.java

@@ -6,7 +6,6 @@ import com.tourism.common.core.object.MyOrderParam;
 import com.tourism.common.core.object.MyPageData;
 import com.tourism.common.core.object.ResponseResult;
 import com.tourism.common.core.util.MyModelUtil;
-import com.tourism.common.core.util.MyPageUtil;
 import com.tourism.common.log.annotation.OperationLog;
 import com.tourism.common.log.model.constant.SysOperationLogType;
 import com.tourism.webadmin.app.website.dto.TourismProjectTravelNotesToWebDto;
@@ -199,11 +198,11 @@ public class WebsiteTourismProjectTravelNotesController {
             //先把imgUrl由jaon转换为List<FileUrlObject>
             tourismProjectVoList.stream().forEach(item ->
             {
-                List<String> urlList = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getId(), item.getHomeHotPicture(), "homeHotPicture");
+                List<String> urlList = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getHomeHotPicture());
                 item.setHomeHotPicturesAfterConvert(urlList);
-                List<String> arrayList = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getId(), item.getTourismUrl(), "tourismUrl");
+                List<String> arrayList = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getTourismUrl());
                 item.setTourismUrlsAfterConvert(arrayList);
-                List<String> arrayList1 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getId(), item.getTravelNotesBanner(), "travelNotesBanner");
+                List<String> arrayList1 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getTravelNotesBanner());
                 item.setTravelNotesBannerAfterConvert(arrayList1);
             });
             return ResponseResult.success(tourismProjectVoList);

+ 21 - 96
application-webadmin/src/main/java/com/tourism/webadmin/app/website/service/impl/BasicToWebServiceImpl.java

@@ -1,15 +1,20 @@
 package com.tourism.webadmin.app.website.service.impl;
 
 import com.github.pagehelper.page.PageMethod;
-import com.tourism.common.additional.model.FileUrlObject;
-import com.tourism.common.additional.utils.JsonUtils;
 import com.tourism.common.additional.utils.StringUtils;
-import com.tourism.common.core.object.*;
+import com.tourism.common.additional.utils.UrlConvertUtils;
+import com.tourism.common.core.object.MyOrderParam;
+import com.tourism.common.core.object.MyPageData;
+import com.tourism.common.core.object.MyRelationParam;
+import com.tourism.common.core.object.TokenData;
 import com.tourism.common.core.util.MyModelUtil;
 import com.tourism.common.core.util.MyPageUtil;
 import com.tourism.webadmin.app.website.dto.TourismProjectTravelNotesToWebDto;
 import com.tourism.webadmin.app.website.service.BasicToWebService;
-import com.tourism.webadmin.back.model.*;
+import com.tourism.webadmin.back.model.BannerInfo;
+import com.tourism.webadmin.back.model.DirectoryInfo;
+import com.tourism.webadmin.back.model.TourTourismProjectTravelNotes;
+import com.tourism.webadmin.back.model.TourUserLikeTravelNotes;
 import com.tourism.webadmin.back.service.BannerInfoService;
 import com.tourism.webadmin.back.service.DirectoryInfoService;
 import com.tourism.webadmin.back.service.TourTourismProjectTravelNotesService;
@@ -19,14 +24,10 @@ import com.tourism.webadmin.back.vo.DirectoryInfoVo;
 import com.tourism.webadmin.back.vo.TourTourismProjectTravelNotesVo;
 import com.tourism.webadmin.config.ApplicationConfig;
 import lombok.extern.slf4j.Slf4j;
-import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.CollectionUtils;
-import org.springframework.util.ObjectUtils;
 
-import java.util.ArrayList;
 import java.util.List;
 import java.util.Random;
 import java.util.stream.Collectors;
@@ -69,22 +70,11 @@ public class BasicToWebServiceImpl implements BasicToWebService
 
         List<BannerInfoVo> dataList = bannerInfoVoMyPageData.getDataList();
             //先把imgUrl由jaon转换为List<FileUrlObject>
-            dataList.stream().forEach(item ->
-            {
-                if (StringUtils.isNotEmpty(item.getImgUrl())) {
-                    List<FileUrlObject> fileUrlObjectList = JsonUtils.parseFileUrlArray(item.getImgUrl(), FileUrlObject.class);
-                    if (!CollectionUtils.isEmpty(fileUrlObjectList)) {
-                        ArrayList<String> arrayList = new ArrayList<>();
-                        //遍历每个元素的数组对象,对元素的url对象进行拼接
-                        for (FileUrlObject y : fileUrlObjectList) {
-                            String imgUrlAfterConvert =
-                                    applicationConfig.getHostIpPort() + y.getDownloadUri() + "?id=" + item.getId() + "&fieldName=imgUrl&asImage=true&filename=" + y.getFilename();
-                            arrayList.add(imgUrlAfterConvert);
-                        }
-                        item.setImgUrlsAfterConvert(arrayList);
-                    }
-                }
-            });
+        dataList.stream().forEach(item ->{
+            if (StringUtils.isNotEmpty(item.getImgUrl())) {
+                item.setImgUrlsAfterConvert(UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getImgUrl()));
+            }
+        });
 
         return bannerInfoVoMyPageData;
     }
@@ -126,20 +116,9 @@ public class BasicToWebServiceImpl implements BasicToWebService
 
         List<DirectoryInfoVo> dataList = directoryInfoVoMyPageData.getDataList();
         //先把imgUrl由jaon转换为List<FileUrlObject>
-        dataList.stream().forEach(item ->
-        {
+        dataList.stream().forEach(item ->{
             if (StringUtils.isNotEmpty(item.getHotPictureUrl())) {
-                List<FileUrlObject> fileUrlObjectList = JsonUtils.parseFileUrlArray(item.getHotPictureUrl(), FileUrlObject.class);
-                if (!CollectionUtils.isEmpty(fileUrlObjectList)) {
-                    ArrayList<String> arrayList = new ArrayList<>();
-                    //遍历每个元素的数组对象,对元素的url对象进行拼接
-                    for (FileUrlObject y : fileUrlObjectList) {
-                        String hotPictureUrlsAfterConvert =
-                                applicationConfig.getHostIpPort() + y.getDownloadUri() + "?id=" + item.getId() + "&fieldName=hotPictureUrl&asImage=true&filename=" + y.getFilename();
-                        arrayList.add(hotPictureUrlsAfterConvert);
-                    }
-                    item.setHotPictureUrlsAfterConvert(arrayList);
-                }
+                item.setHotPictureUrlsAfterConvert(UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getHotPictureUrl()));
             }
         });
         return directoryInfoVoMyPageData;
@@ -162,17 +141,7 @@ public class BasicToWebServiceImpl implements BasicToWebService
         List<TourTourismProjectTravelNotesVo> dataList = tourTourismProjectTravelNotesVoMyPageData.getDataList();
         dataList.stream().forEach(item->{
             if (StringUtils.isNotEmpty(item.getHomeHotPicture())) {
-                List<FileUrlObject> fileUrlObjectList = JsonUtils.parseFileUrlArray(item.getHomeHotPicture(), FileUrlObject.class);
-                if (!CollectionUtils.isEmpty(fileUrlObjectList)) {
-                    ArrayList<String> arrayList = new ArrayList<>();
-                    //遍历每个元素的数组对象,对元素的url对象进行拼接
-                    for (FileUrlObject y : fileUrlObjectList) {
-                        String imgUrlAfterConvert =
-                                applicationConfig.getHostIpPort() + y.getDownloadUri() + "?id=" + item.getId() + "&fieldName=homeHotPicture&asImage=true&filename=" + y.getFilename();
-                        arrayList.add(imgUrlAfterConvert);
-                    }
-                    item.setHomeHotPicturesAfterConvert(arrayList);
-                }
+                item.setHomeHotPicturesAfterConvert(UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getHomeHotPicture()));
             }
         });
 
@@ -225,17 +194,7 @@ public class BasicToWebServiceImpl implements BasicToWebService
 
         dataList.stream().forEach(item->{
             if(StringUtils.isNotEmpty(item.getTourismUrl())){
-                List<FileUrlObject> fileUrlObjectList = JsonUtils.parseFileUrlArray(item.getTourismUrl(), FileUrlObject.class);
-                if (!CollectionUtils.isEmpty(fileUrlObjectList)) {
-                    ArrayList<String> arrayList = new ArrayList<>();
-                    //遍历每个元素的数组对象,对元素的url对象进行拼接
-                    for (FileUrlObject y : fileUrlObjectList) {
-                        String imgUrlAfterConvert =
-                                applicationConfig.getHostIpPort() + y.getDownloadUri() + "?id=" + item.getId() + "&fieldName=tourismUrl&asImage=true&filename=" + y.getFilename();
-                        arrayList.add(imgUrlAfterConvert);
-                    }
-                    item.setTourismUrlsAfterConvert(arrayList);
-                }
+                item.setTourismUrlsAfterConvert(UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getTourismUrl()));
             }
         });
 
@@ -252,47 +211,16 @@ public class BasicToWebServiceImpl implements BasicToWebService
 
         if(tourTourismProjectTravelNotesVo != null) {
             if (StringUtils.isNotEmpty(tourTourismProjectTravelNotesVo.getTourismUrl())) {
-                List<FileUrlObject> fileUrlObjectList = JsonUtils.parseFileUrlArray(tourTourismProjectTravelNotesVo.getTourismUrl(), FileUrlObject.class);
-                if (!CollectionUtils.isEmpty(fileUrlObjectList)) {
-                    ArrayList<String> arrayList = new ArrayList<>();
-                    //遍历每个元素的数组对象,对元素的url对象进行拼接
-                    for (FileUrlObject y : fileUrlObjectList) {
-                        String imgUrlAfterConvert =
-                                applicationConfig.getHostIpPort() + y.getDownloadUri() + "?id=" + tourTourismProjectTravelNotesVo.getId() + "&fieldName=tourismUrl&asImage=true&filename=" + y.getFilename();
-                        arrayList.add(imgUrlAfterConvert);
-                    }
-                    tourTourismProjectTravelNotesVo.setTourismUrlsAfterConvert(arrayList);
-                }
+                tourTourismProjectTravelNotesVo.setTourismUrlsAfterConvert(UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), tourTourismProjectTravelNotesVo.getTourismUrl()));
             }
 
             if (StringUtils.isNotEmpty(tourTourismProjectTravelNotesVo.getHomeHotPicture())) {
-                List<FileUrlObject> fileUrlObjectList = JsonUtils.parseFileUrlArray(tourTourismProjectTravelNotesVo.getHomeHotPicture(), FileUrlObject.class);
-                if (!CollectionUtils.isEmpty(fileUrlObjectList)) {
-                    ArrayList<String> arrayList = new ArrayList<>();
-                    //遍历每个元素的数组对象,对元素的url对象进行拼接
-                    for (FileUrlObject y : fileUrlObjectList) {
-                        String hotPictureUrlsAfterConvert =
-                                applicationConfig.getHostIpPort() + y.getDownloadUri() + "?id=" + tourTourismProjectTravelNotesVo.getId() + "&fieldName=homeHotPicturesAfterConvert&asImage=true&filename=" + y.getFilename();
-                        arrayList.add(hotPictureUrlsAfterConvert);
-                    }
-                    tourTourismProjectTravelNotesVo.setHomeHotPicturesAfterConvert(arrayList);
-                }
+                tourTourismProjectTravelNotesVo.setHomeHotPicturesAfterConvert(UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), tourTourismProjectTravelNotesVo.getHomeHotPicture()));
             }
 
             if (StringUtils.isNotEmpty(tourTourismProjectTravelNotesVo.getTravelNotesBanner())) {
-                List<FileUrlObject> fileUrlObjectList = JsonUtils.parseFileUrlArray(tourTourismProjectTravelNotesVo.getTravelNotesBanner(), FileUrlObject.class);
-                if (!CollectionUtils.isEmpty(fileUrlObjectList)) {
-                    ArrayList<String> arrayList = new ArrayList<>();
-                    //遍历每个元素的数组对象,对元素的url对象进行拼接
-                    for (FileUrlObject y : fileUrlObjectList) {
-                        String hotPictureUrlsAfterConvert =
-                                applicationConfig.getHostIpPort() + y.getDownloadUri() + "?id=" + tourTourismProjectTravelNotesVo.getId() + "&fieldName=travelNotesBanner&asImage=true&filename=" + y.getFilename();
-                        arrayList.add(hotPictureUrlsAfterConvert);
-                    }
-                    tourTourismProjectTravelNotesVo.setTravelNotesBannerAfterConvert(arrayList);
-                }
+                tourTourismProjectTravelNotesVo.setTravelNotesBannerAfterConvert(UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), tourTourismProjectTravelNotesVo.getTravelNotesBanner()));
             }
-
         }
         return tourTourismProjectTravelNotesVo;
     }
@@ -303,7 +231,6 @@ public class BasicToWebServiceImpl implements BasicToWebService
 
         TourUserLikeTravelNotes tourUserLikeTravelNotes =
                 new TourUserLikeTravelNotes();
-
         tourUserLikeTravelNotes.setTravelNotesId(travelNotesId);
         tourUserLikeTravelNotes.setUserId(TokenData.takeFromRequest().getUserId());
         TourTourismProjectTravelNotes tourTourismProjectTravelNotes = tourTourismProjectTravelNotesService.getById(travelNotesId);
@@ -331,9 +258,7 @@ public class BasicToWebServiceImpl implements BasicToWebService
 
     @Override
     public Boolean isLikeTravelNotes(Long travelNotesId){
-
         TourUserLikeTravelNotes tourUserLikeTravelNotes = new TourUserLikeTravelNotes();
-
         tourUserLikeTravelNotes.setTravelNotesId(travelNotesId);
         tourUserLikeTravelNotes.setUserId(TokenData.takeFromRequest().getUserId());
         return tourUserLikeTravelNotesService.existByFilter(tourUserLikeTravelNotes);

+ 6 - 6
application-webadmin/src/main/java/com/tourism/webadmin/app/wechat/controller/TakeOutProjectController.java

@@ -90,7 +90,7 @@ public class TakeOutProjectController {
         dataList.stream().forEach(item ->
         {
             if(StringUtils.isNotEmpty(item.getUrl())) {
-                List<String> arrayList2 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getId(), item.getUrl(), "url");
+                List<String> arrayList2 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getUrl());
                 item.setUrlAfterConvert(arrayList2);
             }
         });
@@ -123,11 +123,11 @@ public class TakeOutProjectController {
         dataList.stream().forEach(item ->
         {
             if(StringUtils.isNotEmpty(item.getUrl())) {
-                List<String> arrayList2 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getId(), item.getUrl(), "url");
+                List<String> arrayList2 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getUrl());
                 item.setUrlAfterConvert(arrayList2);
             }
             if(StringUtils.isNotEmpty(item.getEnvironmentImage())) {
-                List<String> arrayList2 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getId(), item.getEnvironmentImage(), "environmentImage");
+                List<String> arrayList2 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getEnvironmentImage());
                 item.setEnvironmentImageAfterConvert(arrayList2);
             }
         });
@@ -184,7 +184,7 @@ public class TakeOutProjectController {
         dataList.stream().forEach(item ->
         {
             if(StringUtils.isNotEmpty(item.getUrl())) {
-                List<String> arrayList2 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getId().toString(), item.getUrl(), "url");
+                List<String> arrayList2 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getUrl());
                 item.setUrlAfterConvert(arrayList2);
             }
         });
@@ -214,11 +214,11 @@ public class TakeOutProjectController {
         RestaurantInfo restaurantInfo = restaurantInfoService.getOne(queryWrapper);
         RestaurantInfoVo restaurantInfoVo = MyModelUtil.copyTo(restaurantInfo, RestaurantInfoVo.class);
         if(StringUtils.isNotEmpty(restaurantInfoVo.getUrl())) {
-            List<String> arrayList2 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), restaurantInfoVo.getId(), restaurantInfoVo.getUrl(), "url");
+            List<String> arrayList2 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), restaurantInfoVo.getUrl());
             restaurantInfoVo.setUrlAfterConvert(arrayList2);
         }
         if(StringUtils.isNotEmpty(restaurantInfoVo.getEnvironmentImage())) {
-            List<String> arrayList2 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), restaurantInfoVo.getId(), restaurantInfoVo.getEnvironmentImage(), "environmentImage");
+            List<String> arrayList2 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), restaurantInfoVo.getEnvironmentImage());
             restaurantInfoVo.setEnvironmentImageAfterConvert(arrayList2);
         }
         return ResponseResult.success(restaurantInfoVo);

+ 5 - 7
application-webadmin/src/main/java/com/tourism/webadmin/app/wechat/controller/TourProjectController.java

@@ -29,10 +29,8 @@ import jakarta.servlet.http.HttpServletRequest;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.CollectionUtils;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.ArrayList;
 import java.util.List;
 
 import static java.util.stream.Collectors.toList;
@@ -90,9 +88,9 @@ public class TourProjectController {
         //先把imgUrl由jaon转换为List<FileUrlObject>
         dataList.stream().forEach(item ->
         {
-            List<String> arrayList2 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getId(), item.getHomeHotPicture(), "homeHotPicture");
+            List<String> arrayList2 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getHomeHotPicture());
             item.setHomeHotPicturesAfterConvert(arrayList2);
-            List<String> arrayList3 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getId(), item.getTourismUrl(), "tourismUrl");
+            List<String> arrayList3 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getTourismUrl());
             item.setTourismUrlsAfterConvert(arrayList3);
         });
         return ResponseResult.success(tourismProjectVoMyPageData);
@@ -111,16 +109,16 @@ public class TourProjectController {
             return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
         }
         TourismProjectVo tourismProjectVo = MyModelUtil.copyTo(tourismProject, TourismProjectVo.class);
-        List<String> arrayList3 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), tourismProjectVo.getId(), tourismProjectVo.getTourismUrl(), "tourismUrl");
+        List<String> arrayList3 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), tourismProjectVo.getTourismUrl());
         tourismProjectVo.setTourismUrlsAfterConvert(arrayList3);
-        List<String> arrayList = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), tourismProjectVo.getId(), tourismProjectVo.getHomeHotPicture(), "homeHotPicture");
+        List<String> arrayList = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), tourismProjectVo.getHomeHotPicture());
         tourismProjectVo.setHomeHotPicturesAfterConvert(arrayList);
         if(tourismProjectVo.getTourismFile() != null){
             // 使用 Jackson 的 ObjectMapper 进行转换
             ObjectMapper objectMapper = new ObjectMapper();
             TourismFile tourismFile = objectMapper.convertValue(tourismProjectVo.getTourismFile(), TourismFile.class);
             if(StringUtils.isNotEmpty(tourismFile.getFileUrl())){
-                List<String> arrayList1 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), tourismFile.getId().toString(), tourismFile.getFileUrl(), "fileUrl");
+                List<String> arrayList1 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), tourismFile.getFileUrl());
                 tourismFile.setFileUrlsAfterConvert(arrayList1);
                 tourismProjectVo.setTourismFile(MapConvertUtils.convertObjectToMap(tourismFile));
             }

+ 0 - 1
application-webadmin/src/main/java/com/tourism/webadmin/app/wechat/controller/WechatDeliveryOrderController.java

@@ -24,7 +24,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
-import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 import java.util.stream.Collectors;

+ 7 - 13
application-webadmin/src/main/java/com/tourism/webadmin/app/wechat/controller/WechatHomeController.java

@@ -2,9 +2,6 @@ package com.tourism.webadmin.app.wechat.controller;
 
 import cn.dev33.satoken.annotation.SaIgnore;
 import com.github.pagehelper.page.PageMethod;
-import com.tourism.common.additional.model.FileUrlObject;
-import com.tourism.common.additional.utils.JsonUtils;
-import com.tourism.common.additional.utils.StringUtils;
 import com.tourism.common.additional.utils.UrlConvertUtils;
 import com.tourism.common.core.object.MyOrderParam;
 import com.tourism.common.core.object.MyPageData;
@@ -38,7 +35,6 @@ import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.util.ArrayList;
 import java.util.List;
 
 import static java.util.stream.Collectors.toList;
@@ -85,7 +81,7 @@ public class WechatHomeController {
         //先把imgUrl由jaon转换为List<FileUrlObject>
         dataList.stream().forEach(item ->
         {
-            List<String> arrayList = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getId(), item.getImgUrl(), "imgUrl");
+            List<String> arrayList = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getImgUrl());
             item.setImgUrlsAfterConvert(arrayList);
         });
         return ResponseResult.success(bannerInfoVoMyPageData);
@@ -106,7 +102,7 @@ public class WechatHomeController {
         List<IconVo> dataList = icnoInfoVoMyPageData.getDataList();
         if(!CollectionUtils.isEmpty(dataList)){
             dataList.stream().forEach(item->{
-                List<String> arrayList = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getId(), item.getIcon(), "icon");
+                List<String> arrayList = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getIcon());
                 item.setIconAfterConvert(arrayList);
             });
         };
@@ -149,11 +145,10 @@ public class WechatHomeController {
 
         List<TourismProjectVo> dataList = tourismProjectVoMyPageData.getDataList();
         //先把imgUrl由jaon转换为List<FileUrlObject>
-        dataList.stream().forEach(item ->
-        {
-            List<String> arrayList = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getId(), item.getHomeHotPicture(), "homeHotPicture");
+        dataList.stream().forEach(item ->{
+            List<String> arrayList = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(),item.getHomeHotPicture());
             item.setHomeHotPicturesAfterConvert(arrayList);
-            List<String> arrayList1 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getId(), item.getTourismUrl(), "tourismUrl");
+            List<String> arrayList1 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getTourismUrl());
             item.setTourismUrlsAfterConvert(arrayList1);
         });
         return ResponseResult.success(tourismProjectVoMyPageData);
@@ -186,9 +181,8 @@ public class WechatHomeController {
 
         List<DirectoryInfoVo> dataList = directoryInfoVoMyPageData.getDataList();
         //先把imgUrl由jaon转换为List<FileUrlObject>
-        dataList.stream().forEach(item ->
-        {
-            List<String> arrayList1 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getId(), item.getHotPictureUrl(), "hotPictureUrl");
+        dataList.stream().forEach(item ->{
+            List<String> arrayList1 = UrlConvertUtils.urlConvert(applicationConfig.getHostIpPort(), item.getHotPictureUrl());
             item.setHotPictureUrlsAfterConvert(arrayList1);
         });
 

+ 0 - 2
application-webadmin/src/main/java/com/tourism/webadmin/back/controller/RestaurantInfoController.java

@@ -2,9 +2,7 @@ package com.tourism.webadmin.back.controller;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import cn.dev33.satoken.annotation.SaIgnore;
-import cn.hutool.core.util.BooleanUtil;
 import cn.hutool.core.util.ReflectUtil;
-import com.github.xiaoymin.knife4j.annotations.Ignore;
 import com.tourism.common.additional.utils.StringUtils;
 import com.tourism.common.core.upload.BaseUpDownloader;
 import com.tourism.common.core.upload.UpDownloaderFactory;

+ 0 - 1
application-webadmin/src/main/java/com/tourism/webadmin/back/controller/TourTourismProjectTravelNotesController.java

@@ -11,7 +11,6 @@ import com.tourism.common.core.upload.UploadStoreInfo;
 import com.tourism.common.log.annotation.OperationLog;
 import com.tourism.common.log.model.constant.SysOperationLogType;
 import com.github.pagehelper.page.PageMethod;
-import com.tourism.webadmin.back.dao.TourTravelNotesProjectRelationMapper;
 import com.tourism.webadmin.back.vo.*;
 import com.tourism.webadmin.back.dto.*;
 import com.tourism.webadmin.back.model.*;

+ 1 - 1
application-webadmin/src/main/resources/application-dev.yml

@@ -173,7 +173,7 @@ huaweicloud:
     endpoint: obs.cn-north-4.myhuaweicloud.com
     accessKey: C9WI47G4DXXN2EMIL1OO
     secretKey: tfrZ9aw8wjfotUlG6IUCMjtAgzIzErL5qpPPt9AO
-    bucketName: xiaoyaotravel
+    bucketName: v-xiaoyaotravel
 
 sa-token:
   # token 名称(同时也是 cookie 名称)

+ 1 - 1
application-webadmin/src/main/resources/application-prod.yml

@@ -69,7 +69,7 @@ application:
   sessionExpiredSeconds: 86400
   # 是否排他登录。
   excludeLogin: false
-  hostIpPort: https://www.xiaoyaotravel.com/api
+  hostIpPort: https://v.xiaoyaotravel.com/
 
 # 这里仅仅是一个第三方配置的示例,如果没有接入斯三方系统,
 # 这里的配置项也不会影响到系统的行为,如果觉得多余,也可以手动删除。

+ 4 - 2
common/common-additional/src/main/java/com/tourism/common/additional/utils/UrlConvertUtils.java

@@ -1,14 +1,16 @@
 package com.tourism.common.additional.utils;
 
 import com.tourism.common.additional.model.FileUrlObject;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.CollectionUtils;
 
+import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
 
 public class UrlConvertUtils {
 
-    public static List<String> urlConvert(String hostIpPort,String id,String url,String filedName){
+    public static List<String> urlConvert(String hostIpPort, String url){
         ArrayList<String> arrayList = new ArrayList<>();
         if (StringUtils.isNotEmpty(url)) {
             List<FileUrlObject> fileUrlObjectList = JsonUtils.parseFileUrlArray(url, FileUrlObject.class);
@@ -16,7 +18,7 @@ public class UrlConvertUtils {
                 //遍历每个元素的数组对象,对元素的url对象进行拼接
                 for (FileUrlObject y : fileUrlObjectList) {
                     String hotPictureUrlsAfterConvert =
-                            hostIpPort + y.getDownloadUri() + "?id=" + id + "&fieldName="+filedName+"&asImage=true&filename=" + y.getFilename();
+                            hostIpPort + y.getUploadPath() + File.separator + y.getFilename();
                     arrayList.add(hotPictureUrlsAfterConvert);
                 }
             }