Administrator
2025-07-22 317bb4aefb93d4e3797b8a3fd1ac9e82665beb48
feat(mall): 优化衣服社交 muse 数据处理逻辑

- 在设置尺寸、布料、艺术、图案和位置信息时,增加了衣服类型状态的判断
- 只有当相关状态为 1 时,才进行相应的数据处理和价格计算
- 这样可以确保只处理有效的属性,提高数据准确性和系统性能
1 files modified
10 ■■■■ changed files
src/main/java/cc/mrbird/febs/mall/service/impl/ApiClothesSocialServiceImpl.java 10 ●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/mall/service/impl/ApiClothesSocialServiceImpl.java
@@ -197,17 +197,17 @@
                    apiSocialMuseVo.setTypeImg(clothesType.getImage());
                }
                ClothesSize clothesSize = clothesSizeMapper.selectById(clothesSocialMuse.getSizeId());
                if(ObjectUtil.isNotNull(clothesSize)){
                if(ObjectUtil.isNotNull(clothesSize) && clothesType.getSizeState() == 1){
                    apiSocialMuseVo.setSizeName(clothesSize.getName());
                    totalAmount = totalAmount.add(clothesSize.getPrice());
                }
                ClothesCloth clothesCloth = clothesClothMapper.selectById(clothesSocialMuse.getClothId());
                if(ObjectUtil.isNotNull(clothesCloth)){
                if(ObjectUtil.isNotNull(clothesCloth) && clothesType.getClothState() == 1){
                    apiSocialMuseVo.setClothName(clothesCloth.getName());
                    totalAmount = totalAmount.add(clothesCloth.getPrice());
                }
                ClothesArt clothesArt = clothesArtMapper.selectById(clothesSocialMuse.getArtId());
                if(ObjectUtil.isNotNull(clothesArt)){
                if(ObjectUtil.isNotNull(clothesArt) && clothesType.getArtState() == 1){
                    apiSocialMuseVo.setArtName(clothesArt.getName());
                    totalAmount = totalAmount.add(clothesArt.getPrice());
                }
@@ -220,7 +220,7 @@
                                .eq(ClothesPatternRemark::getSourceId, clothesSocialMuse.getId())
                                .eq(ClothesPatternRemark::getType, SocialPatternLocationTypeEnum.MUSE.getValue())
                );
                if(CollUtil.isNotEmpty(patternRemarks)){
                if(CollUtil.isNotEmpty(patternRemarks) && clothesType.getPatternState() == 1){
                    for (ClothesPatternRemark entity : patternRemarks){
                        ApiClothesPatternRemarkVo vo = new ApiClothesPatternRemarkVo();
                        ClothesPattern pattern = clothesPatternMapper.selectById(entity.getPatternId());
@@ -239,7 +239,7 @@
                                .eq(ClothesLocationRemark::getSourceId, clothesSocialMuse.getId())
                                .eq(ClothesLocationRemark::getType, SocialPatternLocationTypeEnum.MUSE.getValue())
                );
                if(CollUtil.isNotEmpty(locationRemarks)){
                if(CollUtil.isNotEmpty(locationRemarks)  && clothesType.getLocationState() == 1){
                    for (ClothesLocationRemark entity : locationRemarks){
                        ApiClothesLocationRemarkVo vo = new ApiClothesLocationRemarkVo();
                        ClothesLocation clothesLocation = clothesLocationMapper.selectById(entity.getLocationId());