diff --git a/src/main/java/com/cultural/heritage/controller/book/PhotoProductsController.java b/src/main/java/com/cultural/heritage/controller/book/PhotoProductsController.java index b362add..bacd6ce 100644 --- a/src/main/java/com/cultural/heritage/controller/book/PhotoProductsController.java +++ b/src/main/java/com/cultural/heritage/controller/book/PhotoProductsController.java @@ -10,7 +10,6 @@ import com.cultural.heritage.annotation.AuthCheck; 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.constant.OrderStatusConstant; import com.cultural.heritage.constant.UserConstant; import com.cultural.heritage.exception.BusinessException; @@ -289,7 +288,7 @@ public class PhotoProductsController { PhotoProductsVO photoProductsVO = new PhotoProductsVO(); BeanUtils.copyProperties(photoProducts, photoProductsVO); // TODO - photoProductsVO.setIntroImg(FileConstant.SERVER_HOST + photoProducts.getIntroImg()); +// photoProductsVO.setIntroImg(FileConstant.SERVER_HOST + photoProducts.getIntroImg()); photoProductsVO.setBookingDateVOList(bookingDateVOList); photoProductsVOList.add(photoProductsVO); } @@ -400,7 +399,7 @@ public class PhotoProductsController { PhotoProductsVO photoProductsVO = new PhotoProductsVO(); BeanUtils.copyProperties(photoProducts, photoProductsVO); // TODO - photoProductsVO.setIntroImg(FileConstant.SERVER_HOST + photoProductsVO.getIntroImg()); +// photoProductsVO.setIntroImg(FileConstant.SERVER_HOST + photoProductsVO.getIntroImg()); photoProductsVO.setBookingDateVOList(bookingDateVOList); return ResultUtils.success(photoProductsVO); 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 6cc6111..c481543 100644 --- a/src/main/java/com/cultural/heritage/controller/good/CartExperienceController.java +++ b/src/main/java/com/cultural/heritage/controller/good/CartExperienceController.java @@ -5,7 +5,6 @@ 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; @@ -268,7 +267,7 @@ public class CartExperienceController { Long goodId = cartExperience.getGoodId(); Good good = goodMap.get(goodId); // TODO - good.setGoodImg(FileConstant.SERVER_HOST + good.getGoodImg()); +// 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 391873a..e425cb4 100644 --- a/src/main/java/com/cultural/heritage/controller/good/CartRecordController.java +++ b/src/main/java/com/cultural/heritage/controller/good/CartRecordController.java @@ -4,7 +4,6 @@ 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; @@ -224,7 +223,7 @@ public class CartRecordController { Long goodId = cartRecord.getGoodId(); Good good = goodMap.get(goodId); // TODO - good.setGoodImg(FileConstant.SERVER_HOST + good.getGoodImg()); +// good.setGoodImg(FileConstant.SERVER_HOST + good.getGoodImg()); CartGoodVO cartGoodVO = new CartGoodVO(); BeanUtils.copyProperties(good, cartGoodVO); diff --git a/src/main/java/com/cultural/heritage/controller/good/CategoryController.java b/src/main/java/com/cultural/heritage/controller/good/CategoryController.java index c1cc59b..4aca630 100644 --- a/src/main/java/com/cultural/heritage/controller/good/CategoryController.java +++ b/src/main/java/com/cultural/heritage/controller/good/CategoryController.java @@ -7,7 +7,6 @@ import com.cultural.heritage.annotation.AuthCheck; 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.constant.UserConstant; import com.cultural.heritage.exception.BusinessException; import com.cultural.heritage.exception.ThrowUtils; @@ -194,9 +193,9 @@ public class CategoryController { userService.getLoginUser(request); List list = categoryService.list(); // TODO - for (Category category : list) { - category.setTypeUrl(FileConstant.SERVER_HOST + category.getTypeUrl()); - } +// for (Category category : list) { +// category.setTypeUrl(FileConstant.SERVER_HOST + category.getTypeUrl()); +// } return ResultUtils.success(list); } @@ -216,9 +215,9 @@ public class CategoryController { // 获取所有存在上架商品的商品类别 List categoryList = commonService.findByFieldInTargetField(goodList, categoryService, Good::getType, "typeName"); // TODO - for (Category category : categoryList) { - category.setTypeUrl(FileConstant.SERVER_HOST + category.getTypeUrl()); - } +// for (Category category : categoryList) { +// category.setTypeUrl(FileConstant.SERVER_HOST + category.getTypeUrl()); +// } return ResultUtils.success(categoryList); } @@ -248,9 +247,9 @@ public class CategoryController { queryWrapper.orderByDesc("id"); List goodList = goodService.list(queryWrapper); // TODO - for (Good good : goodList) { - good.setGoodImg(FileConstant.SERVER_HOST + good.getGoodImg()); - } +// for (Good good : goodList) { +// good.setGoodImg(FileConstant.SERVER_HOST + good.getGoodImg()); +// } Map> map = new HashMap<>(); map.put(id, goodList); return ResultUtils.success(map); diff --git a/src/main/java/com/cultural/heritage/controller/good/FestivalController.java b/src/main/java/com/cultural/heritage/controller/good/FestivalController.java index 68daa96..351d731 100644 --- a/src/main/java/com/cultural/heritage/controller/good/FestivalController.java +++ b/src/main/java/com/cultural/heritage/controller/good/FestivalController.java @@ -5,7 +5,6 @@ import com.cultural.heritage.annotation.AuthCheck; 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.constant.UserConstant; import com.cultural.heritage.exception.BusinessException; import com.cultural.heritage.model.entity.Festival; @@ -74,8 +73,8 @@ public class FestivalController { for (Festival festival : festivalList) { if (festival.getName().equals(festivalName)) { // TODO - String wholeFilePath = FileConstant.SERVER_HOST + festival.getUrl(); - return ResultUtils.success(wholeFilePath); // 返回对应的 URL +// String wholeFilePath = FileConstant.SERVER_HOST + festival.getUrl(); + return ResultUtils.success(festival.getUrl()); // 返回对应的 URL } } throw new BusinessException(ErrorCode.OPERATION_ERROR, "该节日项不存在"); @@ -93,9 +92,9 @@ public class FestivalController { public BaseResponse> getFestivalList() { List festivalList = redisTemplate.opsForList().range(FESTIVAL_KEY, 0, -1); // TODO - for (Festival festival : festivalList) { - festival.setUrl(FileConstant.SERVER_HOST + festival.getUrl()); - } +// for (Festival festival : festivalList) { +// festival.setUrl(FileConstant.SERVER_HOST + festival.getUrl()); +// } return ResultUtils.success(festivalList); } diff --git a/src/main/java/com/cultural/heritage/controller/good/GoodController.java b/src/main/java/com/cultural/heritage/controller/good/GoodController.java index f266c9a..0ef119f 100644 --- a/src/main/java/com/cultural/heritage/controller/good/GoodController.java +++ b/src/main/java/com/cultural/heritage/controller/good/GoodController.java @@ -12,7 +12,6 @@ import com.cultural.heritage.annotation.AuthCheck; 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.constant.UserConstant; import com.cultural.heritage.exception.BusinessException; import com.cultural.heritage.exception.ThrowUtils; @@ -411,14 +410,14 @@ public class GoodController { Page page = goodService.page(new Page<>(current, pageSize), goodQueryWrapper); List records = page.getRecords(); // TODO - for (Good good : records) { - String[] goodImgArr = good.getGoodImg().split(";"); - for (int i = 0; i < goodImgArr.length; i++) { - goodImgArr[i] = FileConstant.SERVER_HOST + goodImgArr[i]; - } - String joinImg = String.join(";", goodImgArr); - good.setGoodImg(joinImg); - } +// for (Good good : records) { +// String[] goodImgArr = good.getGoodImg().split(";"); +// for (int i = 0; i < goodImgArr.length; i++) { +// goodImgArr[i] = FileConstant.SERVER_HOST + goodImgArr[i]; +// } +// String joinImg = String.join(";", goodImgArr); +// good.setGoodImg(joinImg); +// } List goodPageVOS = commonService.convertList(records, GoodPageVO.class); Page goodPageVOPage = new Page<>(); goodPageVOPage.setRecords(goodPageVOS); @@ -470,12 +469,12 @@ public class GoodController { Good good = goodService.getById(id); ThrowUtils.throwIf(good == null, ErrorCode.OPERATION_ERROR, "商品不存在"); // TODO - String[] goodImgArr = good.getGoodImg().split(";"); - for (int i = 0; i < goodImgArr.length; i++) { - goodImgArr[i] = FileConstant.SERVER_HOST + goodImgArr[i]; - } - String joinImg = String.join(";", goodImgArr); - good.setGoodImg(joinImg); +// String[] goodImgArr = good.getGoodImg().split(";"); +// for (int i = 0; i < goodImgArr.length; i++) { +// goodImgArr[i] = FileConstant.SERVER_HOST + goodImgArr[i]; +// } +// String joinImg = String.join(";", goodImgArr); +// good.setGoodImg(joinImg); good.setRichText(DecoderUtils.decodeText(good.getRichText())); GoodPageVO goodPageVO = new GoodPageVO(); @@ -507,9 +506,9 @@ public class GoodController { Page page = goodService.page(new Page<>(current, pageSize), goodQueryWrapper); List records = page.getRecords(); // TODO - for (Good good : records) { - good.setGoodImg(FileConstant.SERVER_HOST + good.getGoodImg()); - } +// for (Good good : records) { +// good.setGoodImg(FileConstant.SERVER_HOST + good.getGoodImg()); +// } // 获取联表(预约日期表, 预约时间段表)查询结果 List appointmentDateTimePeriodVOS = appointmentDateService.queryAppointmentDateDetail(); @@ -605,7 +604,7 @@ public class GoodController { Good good = goodService.getById(id); ThrowUtils.throwIf(good == null, ErrorCode.NOT_FOUND_ERROR, "商品不存在"); // TODO - good.setGoodImg(FileConstant.SERVER_HOST + good.getGoodImg()); +// good.setGoodImg(FileConstant.SERVER_HOST + good.getGoodImg()); ServiceGoodVO serviceGoodVO = new ServiceGoodVO(); BeanUtils.copyProperties(good, serviceGoodVO); Long goodVOId = serviceGoodVO.getId(); @@ -707,9 +706,9 @@ public class GoodController { List goodList = commonService.findByFieldEqTargetFields(conditionMap, goodService); goodList = goodList.stream().filter(good -> good.getName().contains(keyword)).toList(); // TODO - for (Good good : goodList) { - good.setGoodImg(FileConstant.SERVER_HOST + good.getGoodImg()); - } +// for (Good good : goodList) { +// good.setGoodImg(FileConstant.SERVER_HOST + good.getGoodImg()); +// } List serviceGoodCardVOS = commonService.convertList(goodList, ServiceGoodCardVO.class); return ResultUtils.success(serviceGoodCardVOS); } @@ -745,15 +744,15 @@ public class GoodController { } return false; }).toList(); - for (Good good : goodList) { - // TODO - String[] goodImgArr = good.getGoodImg().split(";"); - for (int i = 0; i < goodImgArr.length; i++) { - goodImgArr[i] = FileConstant.SERVER_HOST + goodImgArr[i]; - } - String joinImg = String.join(";", goodImgArr); - good.setGoodImg(joinImg); - } + // TODO +// for (Good good : goodList) { +// String[] goodImgArr = good.getGoodImg().split(";"); +// for (int i = 0; i < goodImgArr.length; i++) { +// goodImgArr[i] = FileConstant.SERVER_HOST + goodImgArr[i]; +// } +// String joinImg = String.join(";", goodImgArr); +// good.setGoodImg(joinImg); +// } List serviceGoodCardVOS = commonService.convertList(goodList, ServiceGoodCardVO.class); return ResultUtils.success(serviceGoodCardVOS); } @@ -777,9 +776,9 @@ public class GoodController { map.put("isShelves", 1); List goodList = commonService.findByFieldEqTargetFields(map, goodService); // TODO - for (Good good : goodList) { - good.setGoodImg(FileConstant.SERVER_HOST + good.getGoodImg()); - } +// for (Good good : goodList) { +// good.setGoodImg(FileConstant.SERVER_HOST + good.getGoodImg()); +// } List serviceGoodCardVOS = commonService.convertList(goodList, ServiceGoodCardVO.class); return ResultUtils.success(serviceGoodCardVOS); } @@ -995,7 +994,7 @@ public class GoodController { Good good = goodService.getById(id); ThrowUtils.throwIf(good == null, ErrorCode.NOT_FOUND_ERROR, "商品不存在"); // TODO - good.setGoodImg(FileConstant.SERVER_HOST + good.getGoodImg()); +// good.setGoodImg(FileConstant.SERVER_HOST + good.getGoodImg()); ServiceGoodCardVO serviceGoodVO = new ServiceGoodCardVO(); BeanUtils.copyProperties(good, serviceGoodVO); diff --git a/src/main/java/com/cultural/heritage/controller/order/AdvanceOrderController.java b/src/main/java/com/cultural/heritage/controller/order/AdvanceOrderController.java index 5196f55..a23fa7c 100644 --- a/src/main/java/com/cultural/heritage/controller/order/AdvanceOrderController.java +++ b/src/main/java/com/cultural/heritage/controller/order/AdvanceOrderController.java @@ -10,7 +10,6 @@ import com.cultural.heritage.annotation.AuthCheck; 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.constant.OrderStatusConstant; import com.cultural.heritage.constant.UserConstant; import com.cultural.heritage.exception.BusinessException; @@ -216,11 +215,11 @@ public class AdvanceOrderController { List records = page.getRecords(); List advanceOrderVOS = commonService.convertList(records, AdvanceOrderVO.class); // TODO - for (AdvanceOrderVO advanceOrderVO : advanceOrderVOS) { - PhotoProductsSnapshot photoProductsSnapshot = advanceOrderVO.getPhotoProductsSnapshot(); - photoProductsSnapshot.setIntroImg(FileConstant.SERVER_HOST + photoProductsSnapshot.getIntroImg()); - advanceOrderVO.setPhotoProductsSnapshot(photoProductsSnapshot); - } +// for (AdvanceOrderVO advanceOrderVO : advanceOrderVOS) { +// PhotoProductsSnapshot photoProductsSnapshot = advanceOrderVO.getPhotoProductsSnapshot(); +// photoProductsSnapshot.setIntroImg(FileConstant.SERVER_HOST + photoProductsSnapshot.getIntroImg()); +// advanceOrderVO.setPhotoProductsSnapshot(photoProductsSnapshot); +// } Page voPage = new Page<>(); voPage.setRecords(advanceOrderVOS); voPage.setTotal(page.getTotal()); @@ -246,11 +245,11 @@ public class AdvanceOrderController { queryWrapper.eq("userId", userId); List advanceOrderList = advanceOrderService.list(queryWrapper); // TODO - for (AdvanceOrder advanceOrder : advanceOrderList) { - PhotoProductsSnapshot photoProductsSnapshot = advanceOrder.getPhotoProductsSnapshot(); - photoProductsSnapshot.setIntroImg(FileConstant.SERVER_HOST + photoProductsSnapshot.getIntroImg()); - advanceOrder.setPhotoProductsSnapshot(photoProductsSnapshot); - } +// for (AdvanceOrder advanceOrder : advanceOrderList) { +// PhotoProductsSnapshot photoProductsSnapshot = advanceOrder.getPhotoProductsSnapshot(); +// photoProductsSnapshot.setIntroImg(FileConstant.SERVER_HOST + photoProductsSnapshot.getIntroImg()); +// advanceOrder.setPhotoProductsSnapshot(photoProductsSnapshot); +// } // 封装成写真预约订单VO List advanceOrderVOS = commonService.convertList(advanceOrderList, AdvanceOrderVO.class); Collections.reverse(advanceOrderVOS); diff --git a/src/main/java/com/cultural/heritage/controller/order/OrderController.java b/src/main/java/com/cultural/heritage/controller/order/OrderController.java index 96b41d0..3d02c97 100644 --- a/src/main/java/com/cultural/heritage/controller/order/OrderController.java +++ b/src/main/java/com/cultural/heritage/controller/order/OrderController.java @@ -7,7 +7,6 @@ import com.cultural.heritage.annotation.AuthCheck; 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.constant.OrderStatusConstant; import com.cultural.heritage.constant.UserConstant; import com.cultural.heritage.exception.BusinessException; @@ -259,26 +258,26 @@ public class OrderController { } // TODO - for (OrderVO orderVO : orderVOS) { - boolean isGeneral = orderService.isGeneralGood(orderVO.getOrderType()); - List orderItemList = orderVO.getOrderItemList(); - for (OrderItems orderItems : orderItemList) { - GoodSnapshot goodSnapshot = orderItems.getGoodSnapshot(); - String goodImg = goodSnapshot.getGoodImg(); - if (isGeneral) { - String[] goodImgArr = goodImg.split(";"); - for (int i = 0; i < goodImgArr.length; i++) { - goodImgArr[i] = FileConstant.SERVER_HOST + goodImgArr[i]; - } - String joinImg = String.join(";", goodImgArr); - goodSnapshot.setGoodImg(joinImg); - } else { - goodSnapshot.setGoodImg(FileConstant.SERVER_HOST + goodSnapshot.getGoodImg()); - } - orderItems.setGoodSnapshot(goodSnapshot); - } - orderVO.setOrderItemList(orderItemList); - } +// for (OrderVO orderVO : orderVOS) { +// boolean isGeneral = orderService.isGeneralGood(orderVO.getOrderType()); +// List orderItemList = orderVO.getOrderItemList(); +// for (OrderItems orderItems : orderItemList) { +// GoodSnapshot goodSnapshot = orderItems.getGoodSnapshot(); +// String goodImg = goodSnapshot.getGoodImg(); +// if (isGeneral) { +// String[] goodImgArr = goodImg.split(";"); +// for (int i = 0; i < goodImgArr.length; i++) { +// goodImgArr[i] = FileConstant.SERVER_HOST + goodImgArr[i]; +// } +// String joinImg = String.join(";", goodImgArr); +// goodSnapshot.setGoodImg(joinImg); +// } else { +// goodSnapshot.setGoodImg(FileConstant.SERVER_HOST + goodSnapshot.getGoodImg()); +// } +// orderItems.setGoodSnapshot(goodSnapshot); +// } +// orderVO.setOrderItemList(orderItemList); +// } Page orderVOPage = new Page<>(); @@ -336,26 +335,26 @@ public class OrderController { }).toList(); // TODO - for (OrderVO orderVO : orderVOS) { - boolean isGeneral = orderService.isGeneralGood(orderVO.getOrderType()); - List orderItemList = orderVO.getOrderItemList(); - for (OrderItems orderItems : orderItemList) { - GoodSnapshot goodSnapshot = orderItems.getGoodSnapshot(); - String goodImg = goodSnapshot.getGoodImg(); - if (isGeneral) { - String[] goodImgArr = goodImg.split(";"); - for (int i = 0; i < goodImgArr.length; i++) { - goodImgArr[i] = FileConstant.SERVER_HOST + goodImgArr[i]; - } - String joinImg = String.join(";", goodImgArr); - goodSnapshot.setGoodImg(joinImg); - } else { - goodSnapshot.setGoodImg(FileConstant.SERVER_HOST + goodSnapshot.getGoodImg()); - } - orderItems.setGoodSnapshot(goodSnapshot); - } - orderVO.setOrderItemList(orderItemList); - } +// for (OrderVO orderVO : orderVOS) { +// boolean isGeneral = orderService.isGeneralGood(orderVO.getOrderType()); +// List orderItemList = orderVO.getOrderItemList(); +// for (OrderItems orderItems : orderItemList) { +// GoodSnapshot goodSnapshot = orderItems.getGoodSnapshot(); +// String goodImg = goodSnapshot.getGoodImg(); +// if (isGeneral) { +// String[] goodImgArr = goodImg.split(";"); +// for (int i = 0; i < goodImgArr.length; i++) { +// goodImgArr[i] = FileConstant.SERVER_HOST + goodImgArr[i]; +// } +// String joinImg = String.join(";", goodImgArr); +// goodSnapshot.setGoodImg(joinImg); +// } else { +// goodSnapshot.setGoodImg(FileConstant.SERVER_HOST + goodSnapshot.getGoodImg()); +// } +// orderItems.setGoodSnapshot(goodSnapshot); +// } +// orderVO.setOrderItemList(orderItemList); +// } return ResultUtils.success(orderVOS); } @@ -404,24 +403,24 @@ public class OrderController { List orderItemsList = commonService.findByFieldEqTargetField("orderId", orderId, orderItemService); orderVO.setOrderItemList(orderItemsList); // TODO - boolean isGeneral = orderService.isGeneralGood(orderVO.getOrderType()); - List orderItemList = orderVO.getOrderItemList(); - for (OrderItems orderItems : orderItemList) { - GoodSnapshot goodSnapshot = orderItems.getGoodSnapshot(); - String goodImg = goodSnapshot.getGoodImg(); - if (isGeneral) { - String[] goodImgArr = goodImg.split(";"); - for (int i = 0; i < goodImgArr.length; i++) { - goodImgArr[i] = FileConstant.SERVER_HOST + goodImgArr[i]; - } - String joinImg = String.join(";", goodImgArr); - goodSnapshot.setGoodImg(joinImg); - } else { - goodSnapshot.setGoodImg(FileConstant.SERVER_HOST + goodSnapshot.getGoodImg()); - } - orderItems.setGoodSnapshot(goodSnapshot); - } - orderVO.setOrderItemList(orderItemList); +// boolean isGeneral = orderService.isGeneralGood(orderVO.getOrderType()); +// List orderItemList = orderVO.getOrderItemList(); +// for (OrderItems orderItems : orderItemList) { +// GoodSnapshot goodSnapshot = orderItems.getGoodSnapshot(); +// String goodImg = goodSnapshot.getGoodImg(); +// if (isGeneral) { +// String[] goodImgArr = goodImg.split(";"); +// for (int i = 0; i < goodImgArr.length; i++) { +// goodImgArr[i] = FileConstant.SERVER_HOST + goodImgArr[i]; +// } +// String joinImg = String.join(";", goodImgArr); +// goodSnapshot.setGoodImg(joinImg); +// } else { +// goodSnapshot.setGoodImg(FileConstant.SERVER_HOST + goodSnapshot.getGoodImg()); +// } +// orderItems.setGoodSnapshot(goodSnapshot); +// } +// orderVO.setOrderItemList(orderItemList); return ResultUtils.success(orderVO); } diff --git a/src/main/java/com/cultural/heritage/controller/order/PendingServiceGoodController.java b/src/main/java/com/cultural/heritage/controller/order/PendingServiceGoodController.java index 523fec4..c523989 100644 --- a/src/main/java/com/cultural/heritage/controller/order/PendingServiceGoodController.java +++ b/src/main/java/com/cultural/heritage/controller/order/PendingServiceGoodController.java @@ -7,7 +7,6 @@ import com.cultural.heritage.annotation.AuthCheck; 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.constant.OrderStatusConstant; import com.cultural.heritage.constant.UserConstant; import com.cultural.heritage.exception.BusinessException; @@ -97,7 +96,7 @@ public class PendingServiceGoodController { List pendingServiceGoodVOList = new ArrayList<>(); for (PendingServiceGood pendingServiceGood : pendingServiceGoodList) { // TODO - pendingServiceGood.setGoodImg(FileConstant.SERVER_HOST + pendingServiceGood.getGoodImg()); +// pendingServiceGood.setGoodImg(FileConstant.SERVER_HOST + pendingServiceGood.getGoodImg()); PendingServiceGoodVO pendingServiceGoodVO = new PendingServiceGoodVO(); BeanUtils.copyProperties(pendingServiceGood, pendingServiceGoodVO); Long goodId = pendingServiceGood.getId(); diff --git a/src/main/java/com/cultural/heritage/controller/user/UserController.java b/src/main/java/com/cultural/heritage/controller/user/UserController.java index cd6aaa5..0c0d858 100644 --- a/src/main/java/com/cultural/heritage/controller/user/UserController.java +++ b/src/main/java/com/cultural/heritage/controller/user/UserController.java @@ -10,7 +10,6 @@ import com.cultural.heritage.common.BaseResponse; import com.cultural.heritage.common.ErrorCode; import com.cultural.heritage.common.ResultUtils; import com.cultural.heritage.config.WxOpenConfig; -import com.cultural.heritage.constant.FileConstant; import com.cultural.heritage.constant.UserConstant; import com.cultural.heritage.exception.BusinessException; import com.cultural.heritage.exception.ThrowUtils; @@ -149,7 +148,7 @@ public class UserController { public BaseResponse getLoginUser(HttpServletRequest request) { User user = userService.getLoginUser(request); // TODO - user.setUserAvatar(FileConstant.SERVER_HOST + user.getUserAvatar()); +// user.setUserAvatar(FileConstant.SERVER_HOST + user.getUserAvatar()); return ResultUtils.success(userService.getUserVO(user)); } @@ -165,7 +164,7 @@ public class UserController { public BaseResponse getWebLoginUser(HttpServletRequest request) { User user = userService.getLoginUser(request); // TODO - user.setUserAvatar(FileConstant.SERVER_HOST + user.getUserAvatar()); +// user.setUserAvatar(FileConstant.SERVER_HOST + user.getUserAvatar()); return ResultUtils.success(user); } @@ -298,9 +297,9 @@ public class UserController { Page page = userService.page(new Page<>(current, pageSize), queryWrapper); List userList = page.getRecords(); // TODO - for (User user : userList) { - user.setUserAvatar(FileConstant.SERVER_HOST + user.getUserAvatar()); - } +// for (User user : userList) { +// user.setUserAvatar(FileConstant.SERVER_HOST + user.getUserAvatar()); +// } page.setRecords(userList); return ResultUtils.success(page); } @@ -328,9 +327,9 @@ public class UserController { Page userVOPage = new Page<>(current, pageSize, userPage.getTotal()); List userVOS = userService.getUserVO(userPage.getRecords()); // TODO - for (UserVO userVO : userVOS) { - userVO.setUserAvatar(FileConstant.SERVER_HOST + userVO); - } +// for (UserVO userVO : userVOS) { +// userVO.setUserAvatar(FileConstant.SERVER_HOST + userVO); +// } userVOPage.setRecords(userVOS); return ResultUtils.success(userVOPage); } diff --git a/src/main/java/com/cultural/heritage/model/dto/coupon/CouponAddRequest.java b/src/main/java/com/cultural/heritage/model/dto/coupon/CouponAddRequest.java index dc3ef31..0533950 100644 --- a/src/main/java/com/cultural/heritage/model/dto/coupon/CouponAddRequest.java +++ b/src/main/java/com/cultural/heritage/model/dto/coupon/CouponAddRequest.java @@ -9,7 +9,7 @@ import java.math.BigDecimal; @Data @Schema(description = "优惠券添加请求体", requiredProperties = - {"name", "standardAmount", "conditionAmount", "requirePoints", "content", "startTime", "endTime", "description"}) + {"name", "standardAmount", "conditionAmount", "requirePoints", "startTime", "endTime"}) public class CouponAddRequest implements Serializable { @@ -41,13 +41,6 @@ public class CouponAddRequest implements Serializable { private Integer requirePoints; - /** - * 优惠券内容 - */ - @Schema(description = "优惠券简介", example = "满200减50,超值优惠") - private String content; - - /** * 有效截止日期 @@ -56,12 +49,6 @@ public class CouponAddRequest implements Serializable { private String endTime; - /** - * 使用说明 - */ - @Schema(description = "使用说明", example = "该优惠券只作用于一个材料包类商品;取消订单后优惠券会自动退回") - private String description; - @Serial private static final long serialVersionUID = 1L; diff --git a/src/main/java/com/cultural/heritage/model/dto/coupon/CouponUpdateRequest.java b/src/main/java/com/cultural/heritage/model/dto/coupon/CouponUpdateRequest.java index a91e2c6..1dab239 100644 --- a/src/main/java/com/cultural/heritage/model/dto/coupon/CouponUpdateRequest.java +++ b/src/main/java/com/cultural/heritage/model/dto/coupon/CouponUpdateRequest.java @@ -9,7 +9,7 @@ import java.math.BigDecimal; @Data @Schema(description = "优惠券更新请求体", requiredProperties = - {"id", "name", "conditionAmount", "requirePoints", "content", "startTime", "endTime", "description"}) + {"id", "name", "conditionAmount", "requirePoints", "startTime", "endTime"}) public class CouponUpdateRequest implements Serializable { /** @@ -51,13 +51,6 @@ public class CouponUpdateRequest implements Serializable { private String endTime; - /** - * 使用说明 - */ - @Schema(description = "使用说明", example = "该优惠券只作用于一个材料包类商品;取消订单后优惠券会自动退回") - private String description; - - @Serial private static final long serialVersionUID = 1L; diff --git a/src/main/java/com/cultural/heritage/model/entity/Coupon.java b/src/main/java/com/cultural/heritage/model/entity/Coupon.java index 00f03a6..ca8a7d2 100644 --- a/src/main/java/com/cultural/heritage/model/entity/Coupon.java +++ b/src/main/java/com/cultural/heritage/model/entity/Coupon.java @@ -34,12 +34,6 @@ public class Coupon implements Serializable { private String name; - /** - * 优惠内容 - */ - private String content; - - /** * 满减金额 */ @@ -70,12 +64,6 @@ public class Coupon implements Serializable { private String endTime; - /** - * 使用说明 - */ - private String description; - - /** * 是否上架 */ diff --git a/src/main/java/com/cultural/heritage/model/vo/coupon/CouponVO.java b/src/main/java/com/cultural/heritage/model/vo/coupon/CouponVO.java index 1d8631d..7339868 100644 --- a/src/main/java/com/cultural/heritage/model/vo/coupon/CouponVO.java +++ b/src/main/java/com/cultural/heritage/model/vo/coupon/CouponVO.java @@ -22,12 +22,6 @@ public class CouponVO implements Serializable { private String name; - /** - * 优惠内容 - */ - private String content; - - /** * 标准金额 */ @@ -58,12 +52,6 @@ public class CouponVO implements Serializable { private String endTime; - /** - * 使用说明 - */ - private String description; - - /** * 优惠券状态 */ diff --git a/src/main/java/com/cultural/heritage/service/good/impl/CartExperienceServiceImpl.java b/src/main/java/com/cultural/heritage/service/good/impl/CartExperienceServiceImpl.java index f088fd5..62978a0 100644 --- a/src/main/java/com/cultural/heritage/service/good/impl/CartExperienceServiceImpl.java +++ b/src/main/java/com/cultural/heritage/service/good/impl/CartExperienceServiceImpl.java @@ -4,7 +4,6 @@ import cn.hutool.core.date.DateUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.cultural.heritage.common.ErrorCode; -import com.cultural.heritage.constant.FileConstant; import com.cultural.heritage.exception.BusinessException; import com.cultural.heritage.exception.ThrowUtils; import com.cultural.heritage.mapper.CartExperienceMapper; @@ -136,7 +135,7 @@ public class CartExperienceServiceImpl extends ServiceImpl impleme Integer requirePoints = coupon.getRequirePoints(); String startTime = coupon.getStartTime(); String endTime = coupon.getEndTime(); - String description = coupon.getDescription(); - String content = coupon.getContent(); String status = coupon.getStatus(); if (update) { @@ -97,7 +95,7 @@ public class CouponServiceImpl extends ServiceImpl impleme if (ObjectUtils.isEmpty(requirePoints) || requirePoints < 0) { throw new BusinessException(ErrorCode.PARAMS_ERROR, "积分参数错误"); } - if (StringUtils.isAnyBlank(name, startTime, endTime, description, content, status)) { + if (StringUtils.isAnyBlank(name, startTime, endTime, status)) { throw new BusinessException(ErrorCode.PARAMS_ERROR, "存在参数为空"); } if (startTime.compareTo(endTime) >= 0) {