文件上传https

This commit is contained in:
chen-xin-zhi 2025-03-17 11:50:36 +08:00
parent 19bdb53242
commit 18084c2b10
3 changed files with 10 additions and 2 deletions

View File

@ -8,6 +8,9 @@ public interface FileConstant {
// String SERVER_HOST = "http://123.249.108.160:8888/api/file/downloadFile?objectKey=";
String SERVER_HOST = "https://www.carboner.cn:8888/api/file/downloadFile?objectKey=";
// String SERVER_HOST = "https://www.carboner.cn:8888/api/file/downloadFile?objectKey=";
String SERVER_HOST = "";
}

View File

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.cultural.heritage.common.BaseResponse;
import com.cultural.heritage.common.ErrorCode;
import com.cultural.heritage.common.ResultUtils;
import com.cultural.heritage.constant.FileConstant;
import com.cultural.heritage.exception.BusinessException;
import com.cultural.heritage.exception.ThrowUtils;
import com.cultural.heritage.model.dto.CommonBatchRequest;
@ -266,6 +267,8 @@ public class CartExperienceController {
Integer quantity = cartExperience.getQuantity();
Long goodId = cartExperience.getGoodId();
Good good = goodMap.get(goodId);
// TODO
good.setGoodImg(FileConstant.SERVER_HOST + good.getGoodImg());
String reservationDate = cartExperience.getReservationDate();
String timeSlot = cartExperience.getTimeSlot();

View File

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.cultural.heritage.common.BaseResponse;
import com.cultural.heritage.common.ErrorCode;
import com.cultural.heritage.common.ResultUtils;
import com.cultural.heritage.constant.FileConstant;
import com.cultural.heritage.exception.BusinessException;
import com.cultural.heritage.exception.ThrowUtils;
import com.cultural.heritage.model.dto.CommonBatchRequest;
@ -222,7 +223,8 @@ public class CartRecordController {
Integer quantity = cartRecord.getQuantity();
Long goodId = cartRecord.getGoodId();
Good good = goodMap.get(goodId);
// TODO
good.setGoodImg(FileConstant.SERVER_HOST + good.getGoodImg());
CartGoodVO cartGoodVO = new CartGoodVO();
BeanUtils.copyProperties(good, cartGoodVO);