| | |
| | | import cc.mrbird.febs.mall.conversion.MallMemberConversion; |
| | | import cc.mrbird.febs.mall.dto.ApiMallGoodsCommentDto; |
| | | import cc.mrbird.febs.mall.dto.MallGoodsQueryDto; |
| | | import cc.mrbird.febs.mall.entity.DataDictionaryCustom; |
| | | import cc.mrbird.febs.mall.entity.MallGoods; |
| | | import cc.mrbird.febs.mall.entity.MallGoodsComment; |
| | | import cc.mrbird.febs.mall.mapper.DataDictionaryCustomMapper; |
| | | import cc.mrbird.febs.mall.mapper.MallGoodsCommentMapper; |
| | | import cc.mrbird.febs.mall.mapper.MallGoodsImagesMapper; |
| | | import cc.mrbird.febs.mall.mapper.MallGoodsMapper; |
| | | import cc.mrbird.febs.mall.entity.*; |
| | | import cc.mrbird.febs.mall.mapper.*; |
| | | import cc.mrbird.febs.mall.service.IApiMallGoodsService; |
| | | import cc.mrbird.febs.mall.vo.*; |
| | | import cn.hutool.core.collection.CollUtil; |
| | |
| | | private final MallGoodsImagesMapper goodsImagesMapper; |
| | | private final MallGoodsCommentMapper mallGoodsCommentMapper; |
| | | private final DataDictionaryCustomMapper dataDictionaryCustomMapper; |
| | | private final MallCarriageRuleMapper mallCarriageRuleMapper; |
| | | private final MallCarriageRuleInfoMapper mallCarriageRuleInfoMapper; |
| | | |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public ApiMallCarriageRuleVo findMallCarriageRuleById(Long id) { |
| | | ApiMallCarriageRuleVo apiMallCarriageRuleVo = new ApiMallCarriageRuleVo(); |
| | | |
| | | MallCarriageRule mallCarriageRule = mallCarriageRuleMapper.selectById(id); |
| | | if(ObjectUtil.isEmpty(mallCarriageRule)){ |
| | | throw new FebsException("商品不存在"); |
| | | } |
| | | apiMallCarriageRuleVo.setName(mallCarriageRule.getName()); |
| | | |
| | | List<MallCarriageRuleInfo> mallCarriageRuleInfos = mallCarriageRuleInfoMapper.selectMallCarriageRuleInfoByRuleIdAndAreaAddress(id, null); |
| | | if(CollUtil.isNotEmpty(mallCarriageRuleInfos)){ |
| | | List<ApiMallCarriageRuleInfoVo> apiMallCarriageRuleInfoVos = new ArrayList<>(); |
| | | for(MallCarriageRuleInfo mallCarriageRuleInfo : mallCarriageRuleInfos){ |
| | | ApiMallCarriageRuleInfoVo apiMallCarriageRuleInfoVo = new ApiMallCarriageRuleInfoVo(); |
| | | apiMallCarriageRuleInfoVo.setAreaAddress(mallCarriageRuleInfo.getAreaAddress()); |
| | | apiMallCarriageRuleInfoVo.setBasicPrice(mallCarriageRuleInfo.getBasicPrice()); |
| | | apiMallCarriageRuleInfoVo.setBasicCnt(mallCarriageRuleInfo.getBasicCnt()); |
| | | apiMallCarriageRuleInfoVo.setMoreCnt(mallCarriageRuleInfo.getMoreCnt()); |
| | | apiMallCarriageRuleInfoVo.setMorePrice(mallCarriageRuleInfo.getMorePrice()); |
| | | apiMallCarriageRuleInfoVos.add(apiMallCarriageRuleInfoVo); |
| | | } |
| | | apiMallCarriageRuleVo.setApiMallCarriageRuleInfoVos(apiMallCarriageRuleInfoVos); |
| | | } |
| | | return apiMallCarriageRuleVo; |
| | | } |
| | | |
| | | @Override |
| | | public MallGoodsDetailsVo findMallGoodsDetailsById(Long id) { |
| | | MallGoods mallGoods = this.baseMapper.selectGoodsDetailById(id); |
| | | if (mallGoods == null) { |