From 46d9a52288d5c36985435e775a8433df4e12000b Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Wed, 16 Jul 2025 14:27:59 +0800
Subject: [PATCH] feat(mall): 添加自定义打印功能并优化订单相关接口

---
 src/main/java/cc/mrbird/febs/mall/service/impl/ApiClothesOrderServiceImpl.java |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiClothesOrderServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiClothesOrderServiceImpl.java
index a6c9631..9f029d3 100644
--- a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiClothesOrderServiceImpl.java
+++ b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiClothesOrderServiceImpl.java
@@ -210,6 +210,8 @@
         ClothesOrderDraft clothesOrderDraft = clothesOrderDraftMapper.selectById(id);
 
         if (ObjectUtil.isNotNull(clothesOrderDraft)){
+            Long draftId = clothesOrderDraft.getId();
+
             Long typeId = clothesOrderDraft.getTypeId();
             ClothesType clothesType = clothesTypeMapper.selectById(typeId);
             record.setTypeId(typeId);
@@ -226,6 +228,7 @@
                         record.setSizeId(sizeId);
                         record.setSizeName(clothesSize.getName());
                         record.setSizePrice(clothesSize.getPrice());
+                        record.setSizeImage(clothesSize.getImage());
                     }
                 }
             }
@@ -240,7 +243,7 @@
             BigDecimal totalPatternPrice = BigDecimal.ZERO;
             List<ClothesPatternRemark> clothesPatternRemarks = clothesPatternRemarkMapper.selectList(
                     Wrappers.lambdaQuery(ClothesPatternRemark.class)
-                            .eq(ClothesPatternRemark::getSourceId, record.getId())
+                            .eq(ClothesPatternRemark::getSourceId, draftId)
                             .eq(ClothesPatternRemark::getType, SocialPatternLocationTypeEnum.DRAFT.getValue())
             );
             if(CollUtil.isNotEmpty(clothesPatternRemarks)){
@@ -253,6 +256,7 @@
                     vo.setPatternName(clothesPattern.getName());
                     vo.setPatternPrice(clothesPattern.getPrice());
                     vo.setPatternRemark(entity.getRemark());
+                    vo.setPatternImage(clothesPattern.getImage());
                     vos.add(vo);
 
                     totalPatternPrice = totalPatternPrice.add(clothesPattern.getPrice());
@@ -263,7 +267,7 @@
             BigDecimal totalLocationPrice = BigDecimal.ZERO;
             List<ClothesLocationRemark> clothesLocationRemarks = clothesLocationRemarkMapper.selectList(
                     Wrappers.lambdaQuery(ClothesLocationRemark.class)
-                            .eq(ClothesLocationRemark::getSourceId, record.getId())
+                            .eq(ClothesLocationRemark::getSourceId, draftId)
                             .eq(ClothesLocationRemark::getType, SocialPatternLocationTypeEnum.DRAFT.getValue())
             );
             if(CollUtil.isNotEmpty(clothesLocationRemarks)){
@@ -276,6 +280,7 @@
                     vo.setLocationName(location.getName());
                     vo.setLocationPrice(location.getPrice());
                     vo.setLocationRemark(entity.getRemark());
+                    vo.setLocationImage(location.getImage());
                     vos.add(vo);
 
                     totalLocationPrice = totalLocationPrice.add(location.getPrice());
@@ -293,6 +298,7 @@
                         record.setArtId(artId);
                         record.setArtName(clothesArt.getName());
                         record.setArtPrice(clothesArt.getPrice());
+                        record.setArtImage(clothesArt.getImage());
                     }
                 }
             }
@@ -307,6 +313,7 @@
                         record.setClothId(clothId);
                         record.setClothName(clothesCloth.getName());
                         record.setClothPrice(clothesCloth.getPrice());
+                        record.setClothImage(clothesCloth.getImage());
                     }
                 }
             }

--
Gitblit v1.9.1