Administrator
2025-07-21 b9a2bf778aafdaf2ca1cb9d2b96843aa436feff8
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);
    }