| | |
| | | @Override |
| | | public FebsResponse allCategory() { |
| | | List<ApiClothesCategoryInfoVo> vos = new ArrayList<>(); |
| | | ApiClothesCategoryInfoVo apiClothesCategoryInfoVo = new ApiClothesCategoryInfoVo(); |
| | | apiClothesCategoryInfoVo.setId(0L); |
| | | apiClothesCategoryInfoVo.setName("全部"); |
| | | apiClothesCategoryInfoVo.setType(2); |
| | | vos.add(apiClothesCategoryInfoVo); |
| | | List<ClothesSocialCategory> list = clothesSocialCategoryMapper.selectList( |
| | | Wrappers.lambdaQuery(ClothesSocialCategory.class) |
| | | .select(ClothesSocialCategory::getId, ClothesSocialCategory::getName) |
| | |
| | | .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(type); |
| | | vos.add(vo); |
| | | } |
| | | return vos; |
| | |
| | | .orderByAsc(ClothesSocialCategory::getOrderCnt) |
| | | ); |
| | | if(CollUtil.isNotEmpty(list)){ |
| | | vos = buildApiClothesCategoryInfoVo(list, vos); |
| | | vos = buildApiClothesCategoryInfoVo(list, vos,1); |
| | | } |
| | | return new FebsResponse().success().data(vos); |
| | | } |
| | |
| | | Wrappers.lambdaQuery(ClothesSocialFollow.class) |
| | | .select(ClothesSocialFollow::getId, ClothesSocialFollow::getSourceId) |
| | | .in(ClothesSocialFollow::getSourceId, socialIds) |
| | | .eq(ClothesSocialFollow::getType, SocialTypeEnum.LIKE.getValue()) |
| | | .eq(ClothesSocialFollow::getSourceType, SocialSourceTypeEnum.SOCIAL.getValue()) |
| | | ); |
| | | |
| | | Map<Long, Long> likeCountBySocialIdMap = new HashMap<>(); |
| | |
| | | } |
| | | apiSocialMuseVo.setTotalAmount(totalAmount.setScale(2, RoundingMode.DOWN)); |
| | | |
| | | apiSocialInfoVo.setMuse(apiSocialMuseVo); |
| | | |
| | | List<ClothesSocialFollow> clothesSocialFollows = clothesSocialFollowMapper.selectList( |
| | | Wrappers.lambdaQuery(ClothesSocialFollow.class) |
| | | .select(ClothesSocialFollow::getType) |
| | | .eq(ClothesSocialFollow::getSourceId, socialId) |
| | | .eq(ClothesSocialFollow::getSourceType, SocialSourceTypeEnum.SOCIAL.getValue()) |
| | | ); |
| | | if (CollUtil.isNotEmpty(clothesSocialFollows)){ |
| | | |
| | |
| | | |
| | | List<ClothesLocationRemark> clothesLocationRemarks = new ArrayList<>(); |
| | | List<ClothesPatternRemark> clothesPatternRemarks = new ArrayList<>(); |
| | | if(CollUtil.isEmpty(clothesOrderItems)){ |
| | | if(CollUtil.isNotEmpty(clothesOrderItems)){ |
| | | for (ClothesOrderItem item : clothesOrderItems){ |
| | | if (ClothesOrderItemEnum.CLOTH.getCode() == item.getType()) { |
| | | ClothesCloth cloth = clothesClothMapper.selectById(item.getItemId()); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse myCollect(ApiSocialMyCollectAddDto dto) { |
| | | |
| | | Long memberId = LoginUserUtil.getLoginUser().getId(); |
| | | dto.setMemberId(memberId); |
| | | |
| | | // 创建分页对象,传入当前页和每页大小 |
| | | Page<ApiSocialMyCollectVo> page = new Page<>(dto.getPageNow(), dto.getPageSize()); |
| | | // 调用Mapper方法获取活动分页数据 |
| | | Page<ApiSocialMyCollectVo> voPage = clothesSocialFollowMapper.selectPageInMyComment(page, dto); |
| | | return new FebsResponse().success().data(voPage); |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse museToDesign(ApiClothesSocialMuseDto dto) { |
| | | |
| | | Long memberId = LoginUserUtil.getLoginUser().getId(); |
| | |
| | | if(ObjectUtil.isNotNull(clothesSize)){ |
| | | record.setSizeId(sizeId); |
| | | record.setSizeName(clothesSize.getName()); |
| | | record.setSizeImage(clothesSize.getImage()); |
| | | record.setSizePrice(clothesSize.getPrice()); |
| | | } |
| | | } |
| | |
| | | ApiClothesPatternRemarkVo vo = new ApiClothesPatternRemarkVo(); |
| | | ClothesPattern pattern = clothesPatternMapper.selectById(patternRemark.getPatternId()); |
| | | vo.setPatternName(pattern.getName()); |
| | | vo.setPatternImage(pattern.getImage()); |
| | | vo.setPatternPrice(pattern.getPrice()); |
| | | vo.setPatternId(pattern.getId()); |
| | | vo.setPatternRemark(patternRemark.getRemark()); |
| | |
| | | ClothesLocation clothesLocation = clothesLocationMapper.selectById(locationRemark.getLocationId()); |
| | | vo.setLocationName(clothesLocation.getName()); |
| | | vo.setLocationRemark(locationRemark.getRemark()); |
| | | vo.setLocationImage(clothesLocation.getImage()); |
| | | vo.setLocationPrice(clothesLocation.getPrice()); |
| | | vo.setLocationId(clothesLocation.getId()); |
| | | locationRemarkList.add(vo); |
| | |
| | | ClothesArt clothesArt = clothesArtMapper.selectById(artId); |
| | | if (ObjectUtil.isNotNull(clothesArt)){ |
| | | record.setArtId(artId); |
| | | record.setArtImage(clothesArt.getImage()); |
| | | record.setArtName(clothesArt.getName()); |
| | | record.setArtPrice(clothesArt.getPrice()); |
| | | } |
| | |
| | | ClothesCloth clothesCloth = clothesClothMapper.selectById(clothId); |
| | | if (ObjectUtil.isNotNull(clothesCloth)){ |
| | | record.setClothId(clothId); |
| | | record.setClothImage(clothesCloth.getImage()); |
| | | record.setClothName(clothesCloth.getName()); |
| | | record.setClothPrice(clothesCloth.getPrice()); |
| | | } |
| | |
| | | entity.setComment(dto.getComment()); |
| | | ClothesSocialComment clothesSocialComment = clothesSocialCommentMapper.selectById(commentId); |
| | | if(ObjectUtil.isNotNull(clothesSocialComment)){ |
| | | entity.setParentId(clothesSocialComment.getParentId()); |
| | | entity.setParentId(clothesSocialComment.getId()); |
| | | entity.setCommentId(clothesSocialComment.getId()); |
| | | } |
| | | clothesSocialCommentMapper.insert(entity); |