From 6af0003840b6bf2d8f42382e0631271a2a640a8b Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Thu, 10 Jul 2025 09:52:12 +0800
Subject: [PATCH] style(clothesType): 优化 socialMuseUpdate 页面表格样式 - 添加 layui-table-cell 类的样式,设置单元格高度为自适应

---
 src/main/java/cc/mrbird/febs/mall/controller/clothes/ViewClothesTypeController.java |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 48 insertions(+), 0 deletions(-)

diff --git a/src/main/java/cc/mrbird/febs/mall/controller/clothes/ViewClothesTypeController.java b/src/main/java/cc/mrbird/febs/mall/controller/clothes/ViewClothesTypeController.java
index 5163636..392ec52 100644
--- a/src/main/java/cc/mrbird/febs/mall/controller/clothes/ViewClothesTypeController.java
+++ b/src/main/java/cc/mrbird/febs/mall/controller/clothes/ViewClothesTypeController.java
@@ -2,6 +2,7 @@
 
 import cc.mrbird.febs.common.controller.BaseController;
 import cc.mrbird.febs.common.entity.FebsConstant;
+import cc.mrbird.febs.common.enumerates.SocialPatternLocationTypeEnum;
 import cc.mrbird.febs.common.utils.FebsUtil;
 import cc.mrbird.febs.mall.entity.*;
 import cc.mrbird.febs.mall.mapper.*;
@@ -10,9 +11,14 @@
 import cc.mrbird.febs.mall.vo.AdminLabelSetVo;
 import cc.mrbird.febs.mall.vo.AdminMallOrderVo;
 import cc.mrbird.febs.mall.vo.clothes.AdminClothesDeliverGoodsVo;
+import cc.mrbird.febs.mall.vo.clothes.AdminClothesLocationRemarkVo;
+import cc.mrbird.febs.mall.vo.clothes.AdminClothesPatternRemarkVo;
 import cc.mrbird.febs.mall.vo.clothes.AdminClothesTypeInfoVo;
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.json.JSON;
+import cn.hutool.json.JSONUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import lombok.RequiredArgsConstructor;
@@ -51,6 +57,8 @@
     private final ClothesSocialMuseMapper clothesSocialMuseMapper;
     private final ClothesSocialFileMapper clothesSocialFileMapper;
     private final MallExpressInfoMapper mallExpressInfoMapper;
+    private final ClothesPatternRemarkMapper clothesPatternRemarkMapper;
+    private final ClothesLocationRemarkMapper clothesLocationRemarkMapper;
 
     /**
      * 社区分类列表
@@ -147,6 +155,46 @@
                         .eq(ClothesSocialMuse::getSocialId, clothesSocial.getId())
                 .last("LIMIT 1")
         );
+
+        List<AdminClothesPatternRemarkVo> patternData = new ArrayList<>();
+        List<ClothesPatternRemark> patternRemarks = clothesPatternRemarkMapper.selectList(
+                Wrappers.lambdaQuery(ClothesPatternRemark.class)
+                        .eq(ClothesPatternRemark::getSourceId, clothesSocialMuse.getId())
+                        .eq(ClothesPatternRemark::getType, SocialPatternLocationTypeEnum.MUSE.getValue())
+        );
+        if(CollUtil.isNotEmpty(patternRemarks)){
+            for (ClothesPatternRemark entity : patternRemarks){
+                AdminClothesPatternRemarkVo vo = new AdminClothesPatternRemarkVo();
+                vo.setPatternId(entity.getPatternId());
+                ClothesPattern clothesPattern = clothesPatternMapper.selectById(entity.getPatternId());
+                vo.setPatternName(clothesPattern.getName());
+                JSON parse = JSONUtil.parse(entity.getRemark());
+                vo.setPatternText(parse.getByPath("text", String.class));
+                vo.setSkuPatternImage(parse.getByPath("file", String.class));
+                patternData.add(vo);
+            }
+            clothesSocialMuse.setPatternData(patternData);
+        }
+        List<AdminClothesLocationRemarkVo> locationData = new ArrayList<>();
+        List<ClothesLocationRemark> locationRemarks = clothesLocationRemarkMapper.selectList(
+                Wrappers.lambdaQuery(ClothesLocationRemark.class)
+                        .eq(ClothesLocationRemark::getSourceId, clothesSocialMuse.getId())
+                        .eq(ClothesLocationRemark::getType, SocialPatternLocationTypeEnum.MUSE.getValue())
+        );
+        if(CollUtil.isNotEmpty(locationRemarks)){
+            for (ClothesLocationRemark entity : locationRemarks){
+                AdminClothesLocationRemarkVo vo = new AdminClothesLocationRemarkVo();
+                vo.setLocationId(entity.getLocationId());
+                ClothesLocation clothesLocation = clothesLocationMapper.selectById(entity.getLocationId());
+                vo.setLocationName(clothesLocation.getName());
+                JSON parse = JSONUtil.parse(entity.getRemark());
+                vo.setLocationText(parse.getByPath("text", String.class));
+                vo.setSkuLocationImage(parse.getByPath("file", String.class));
+                locationData.add(vo);
+            }
+            clothesSocialMuse.setLocationData(locationData);
+        }
+
         model.addAttribute("socialMuse", clothesSocialMuse);
 
         return FebsUtil.view("modules/clothesType/socialMuseUpdate");

--
Gitblit v1.9.1