From b9a2bf778aafdaf2ca1cb9d2b96843aa436feff8 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Mon, 21 Jul 2025 16:34:56 +0800
Subject: [PATCH] refactor(mall): 优化衣服分类信息接口返回

---
 src/main/java/cc/mrbird/febs/mall/service/impl/ApiClothesSocialServiceImpl.java |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiClothesSocialServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiClothesSocialServiceImpl.java
index 8077619..512cf44 100644
--- a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiClothesSocialServiceImpl.java
+++ b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiClothesSocialServiceImpl.java
@@ -69,7 +69,6 @@
         ApiClothesCategoryInfoVo apiClothesCategoryInfoVo = new ApiClothesCategoryInfoVo();
         apiClothesCategoryInfoVo.setId(0L);
         apiClothesCategoryInfoVo.setName("全部");
-        apiClothesCategoryInfoVo.setType(2);
         vos.add(apiClothesCategoryInfoVo);
         List<ClothesSocialCategory> list = clothesSocialCategoryMapper.selectList(
                 Wrappers.lambdaQuery(ClothesSocialCategory.class)
@@ -79,18 +78,18 @@
                         .orderByAsc(ClothesSocialCategory::getOrderCnt)
         );
         if(CollUtil.isNotEmpty(list)){
-            vos = buildApiClothesCategoryInfoVo(list, vos);
+            vos = buildApiClothesCategoryInfoVo(list, vos,2);
         }
 
         return new FebsResponse().success().data(vos);
     }
 
-    private List<ApiClothesCategoryInfoVo> buildApiClothesCategoryInfoVo(List<ClothesSocialCategory> list, List<ApiClothesCategoryInfoVo> vos) {
+    private List<ApiClothesCategoryInfoVo> buildApiClothesCategoryInfoVo(List<ClothesSocialCategory> list, List<ApiClothesCategoryInfoVo> vos,Integer  type) {
         for (ClothesSocialCategory entity : list) {
             ApiClothesCategoryInfoVo vo = new ApiClothesCategoryInfoVo();
             vo.setId(entity.getId());
             vo.setName(entity.getName());
-            vo.setType(1);
+            vo.setType(type);
             vos.add(vo);
         }
         return vos;
@@ -108,7 +107,7 @@
                         .orderByAsc(ClothesSocialCategory::getOrderCnt)
         );
         if(CollUtil.isNotEmpty(list)){
-            vos = buildApiClothesCategoryInfoVo(list, vos);
+            vos = buildApiClothesCategoryInfoVo(list, vos,1);
         }
         return new FebsResponse().success().data(vos);
     }

--
Gitblit v1.9.1