diff --git a/src/main/java/com/cultural/heritage/constant/FileConstant.java b/src/main/java/com/cultural/heritage/constant/FileConstant.java index 9e59d29..835dc4a 100644 --- a/src/main/java/com/cultural/heritage/constant/FileConstant.java +++ b/src/main/java/com/cultural/heritage/constant/FileConstant.java @@ -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 = ""; } diff --git a/src/main/java/com/cultural/heritage/controller/good/CartExperienceController.java b/src/main/java/com/cultural/heritage/controller/good/CartExperienceController.java index 2c3de61..6cc6111 100644 --- a/src/main/java/com/cultural/heritage/controller/good/CartExperienceController.java +++ b/src/main/java/com/cultural/heritage/controller/good/CartExperienceController.java @@ -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(); diff --git a/src/main/java/com/cultural/heritage/controller/good/CartRecordController.java b/src/main/java/com/cultural/heritage/controller/good/CartRecordController.java index dabd624..391873a 100644 --- a/src/main/java/com/cultural/heritage/controller/good/CartRecordController.java +++ b/src/main/java/com/cultural/heritage/controller/good/CartRecordController.java @@ -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);