From 10ccf471c558dfa56e0a18c2a5168ada5d94fe81 Mon Sep 17 00:00:00 2001 From: "1304317391@qq.com" Date: Fri, 25 Nov 2022 18:33:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=90=8E=E5=8F=B0=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E5=95=86=E5=93=81=EF=BC=8C=E8=AE=A2=E5=8D=95=E5=8F=B7?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=97=B6=E9=97=B4=E5=85=B3=E8=81=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-local.yaml | 2 +- .../service/dto/YxStoreCombinationDto.java | 5 +- .../service/YxStoreHotListService.java | 4 ++ .../impl/YxStoreHotListServiceImpl.java | 7 ++- .../order/rest/StoreOrderController.java | 11 +++- .../service/impl/YxStoreOrderServiceImpl.java | 62 +++++++++++++++---- .../impl/StoreAfterSalesServiceImpl.java | 31 +++++++--- 7 files changed, 97 insertions(+), 25 deletions(-) diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index dd16b8ee..52596901 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -270,7 +270,7 @@ dubbo: bxg: shop: # API_URL: http://192.168.10.113:48080/bxgApp - API_URL: http://5205b509.r5.cpolar.top + API_URL: http://7c539556.r5.cpolar.top SITE_URL: http://192.168.10.113:48080/bxgApp UNI_SITE_URL: http://192.168.10.113:48080/bxgApp ADMIN_API_URL: http://192.168.10.113:48080/bxg diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCombinationDto.java b/zsw-bxg/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCombinationDto.java index e328a575..2c59f125 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCombinationDto.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCombinationDto.java @@ -63,9 +63,12 @@ public class YxStoreCombinationDto implements Serializable { // 简介 private String info; - // 价格 + // 拼团价格 private BigDecimal price; + //售价 + private BigDecimal productPrice; + // 排序 private Integer sort; diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/hotList/service/YxStoreHotListService.java b/zsw-bxg/src/main/java/co/yixiang/modules/hotList/service/YxStoreHotListService.java index 899a7683..bed05334 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/hotList/service/YxStoreHotListService.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/hotList/service/YxStoreHotListService.java @@ -60,6 +60,10 @@ public interface YxStoreHotListService extends BaseService { */ List getList(YxStoreHotListRecordQueryParam QueryParam); + + /** + * 首页榜单显示 + */ List getList(); } diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/hotList/service/impl/YxStoreHotListServiceImpl.java b/zsw-bxg/src/main/java/co/yixiang/modules/hotList/service/impl/YxStoreHotListServiceImpl.java index 324c9cc0..ba085b93 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/hotList/service/impl/YxStoreHotListServiceImpl.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/hotList/service/impl/YxStoreHotListServiceImpl.java @@ -248,6 +248,7 @@ public class YxStoreHotListServiceImpl extends BaseServiceImpl { YxStoreProduct yxStoreProduct=storeProductMapper.selectById(yxStoreHotListRecord.getProductId()); if (ObjectUtil.isNotNull(yxStoreProduct)){ + yxStoreProduct.setHotSales(yxStoreHotListRecord.getHotSales()); list.add(yxStoreProduct); } }); @@ -267,7 +268,8 @@ public class YxStoreHotListServiceImpl extends BaseServiceImpl mouthList=new LinkedHashSet<>(); list.forEach(yxStoreHotListRecord -> mouthList.add(yxStoreHotListRecord.getMouth())); - String mouth=Collections.max(mouthList); + String mouth=Collections.max(mouthList);//设定月份为最近的月份 + //获取当前月份的榜单记录 List recordList=yxStoreHotListRecordMapper.selectList(wrapper.eq(YxStoreHotListRecord::getMouth,mouth)); LinkedHashSet hotIdList=new LinkedHashSet<>(); //获得不重复的榜单id @@ -282,6 +284,7 @@ public class YxStoreHotListServiceImpl extends BaseServiceImpl list1=new ArrayList<>(); yxStoreHotListMapper.selectList(wrapperList).forEach(yxHotList->list1.add(yxHotList.getId())); ArrayList hotListDTOS=new ArrayList<>(); + //已经排序过的榜单 list1.forEach(hotId->{ LambdaQueryWrapper wrapper1= SerializationUtils.clone(wrapper); //查出当前月份当前榜单的记录 @@ -295,7 +298,7 @@ public class YxStoreHotListServiceImpl extends BaseServiceImpl cateDtos=new ArrayList<>(); //把该榜单下的分类封为一个数组 diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/order/rest/StoreOrderController.java b/zsw-bxg/src/main/java/co/yixiang/modules/order/rest/StoreOrderController.java index 06adddc6..f2926ceb 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/order/rest/StoreOrderController.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/order/rest/StoreOrderController.java @@ -215,7 +215,7 @@ public class StoreOrderController { return new ResponseEntity(HttpStatus.NO_CONTENT); } - @ApiOperation(value = "通过审核,准备发货") + @ApiOperation(value = "通过审核,可以进行发货") @PutMapping(value = "/ordercheck") @PreAuthorize("@ss.hasAnyPermissions('admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT')") public ResponseEntity checkdate(@Validated @RequestBody YxStoreOrder resources) { @@ -223,6 +223,15 @@ public class StoreOrderController { return new ResponseEntity(HttpStatus.NO_CONTENT); } + @ApiOperation(value = "未付款订单进行取消") + @PutMapping(value = "/orderCancel") + @PreAuthorize("@ss.hasAnyPermissions('admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT')") + public ResponseEntity canceldate(@Validated @RequestBody YxStoreOrder resources) { + yxStoreOrderService.cancelOrder(resources.getOrderId(), resources.getUid()); + return new ResponseEntity(HttpStatus.NO_CONTENT); + } + + @ApiOperation(value = "修改快递单号") @PutMapping(value = "/yxStoreOrder/updateDelivery") diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java b/zsw-bxg/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java index ae8865cd..4d25e90c 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java @@ -39,6 +39,8 @@ import co.yixiang.modules.cart.domain.YxStoreCart; import co.yixiang.modules.cart.service.YxStoreCartService; import co.yixiang.modules.cart.service.mapper.StoreCartMapper; import co.yixiang.modules.cart.vo.YxStoreCartQueryVo; +import co.yixiang.modules.category.domain.YxStoreCategory; +import co.yixiang.modules.category.service.YxStoreCategoryService; import co.yixiang.modules.order.domain.YxExpress; import co.yixiang.modules.order.domain.YxStoreOrder; import co.yixiang.modules.order.domain.YxStoreOrderCartInfo; @@ -51,6 +53,7 @@ import co.yixiang.modules.order.service.YxStoreOrderStatusService; import co.yixiang.modules.order.service.dto.*; import co.yixiang.modules.order.service.mapper.StoreOrderMapper; import co.yixiang.modules.order.vo.*; +import co.yixiang.modules.product.domain.YxStoreProduct; import co.yixiang.modules.product.domain.YxStoreProductReply; import co.yixiang.modules.product.service.YxStoreProductReplyService; import co.yixiang.modules.product.service.YxStoreProductService; @@ -61,6 +64,7 @@ import co.yixiang.modules.shop.domain.YxSystemStore; import co.yixiang.modules.shop.service.YxSystemConfigService; import co.yixiang.modules.shop.service.YxSystemStoreService; import co.yixiang.modules.shop.service.YxSystemStoreStaffService; +import co.yixiang.modules.store.service.YxStoreBrandService; import co.yixiang.modules.template.domain.YxShippingTemplates; import co.yixiang.modules.template.domain.YxShippingTemplatesFree; import co.yixiang.modules.template.domain.YxShippingTemplatesRegion; @@ -103,6 +107,7 @@ import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.math.BigDecimal; +import java.text.SimpleDateFormat; import java.util.*; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; @@ -198,6 +203,15 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl{ Object info = c.getCartInfoMap().get("productInfo"); YxStoreProductQueryVo vo = JSONUtil.toBean(info.toString(), YxStoreProductQueryVo.class); @@ -2505,10 +2529,26 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpllambdaQuery().eq(YxStoreOrder::getOrderId, storeAfterSalesParam.getOrderCode()).eq(YxStoreOrder::getUid, userId)); checkOrder(yxStoreOrder); + //商品除去优惠后的总价格 BigDecimal totalPrice = BigDecimal.ZERO; //拿到所有的商品 @@ -97,6 +103,7 @@ public class StoreAfterSalesServiceImpl extends BaseServiceImpl