| | |
| | | import cc.mrbird.febs.mall.dto.AddMallGoodsDto; |
| | | import cc.mrbird.febs.mall.dto.AddMallGoodsSkuDto; |
| | | import cc.mrbird.febs.mall.dto.UpMallGoodsDto; |
| | | import cc.mrbird.febs.mall.entity.MallGoods; |
| | | import cc.mrbird.febs.mall.entity.MallGoodsCategory; |
| | | import cc.mrbird.febs.mall.entity.MallGoodsSku; |
| | | import cc.mrbird.febs.mall.entity.MallGoodsStyle; |
| | | import cc.mrbird.febs.mall.mapper.MallGoodsCategoryMapper; |
| | | import cc.mrbird.febs.mall.mapper.MallGoodsMapper; |
| | | import cc.mrbird.febs.mall.mapper.MallGoodsSkuMapper; |
| | | import cc.mrbird.febs.mall.mapper.MallGoodsStyleMapper; |
| | | import cc.mrbird.febs.mall.entity.*; |
| | | import cc.mrbird.febs.mall.mapper.*; |
| | | import cc.mrbird.febs.mall.service.IAdminMallGoodsService; |
| | | import cc.mrbird.febs.mall.vo.AdminMailGoodsDetailVo; |
| | | import cc.mrbird.febs.mall.vo.AdminMailGoodsSkuDetailVo; |
| | |
| | | private final MallGoodsMapper mallGoodsMapper; |
| | | private final MallGoodsSkuMapper mallGoodsSkuMapper; |
| | | private final MallGoodsStyleMapper mallGoodsStyleMapper; |
| | | private final MallGoodsImagesMapper mallGoodsImagesMapper; |
| | | |
| | | @Override |
| | | public IPage<AdminMallGoodsVo> getCategoryListInPage(MallGoods mallGoods, QueryRequest request) { |
| | |
| | | mallGoods.setIsSale(MallGoods.ISSALE_STATUS_DISABLED); |
| | | mallGoodsMapper.insert(mallGoods); |
| | | |
| | | String thumbs = addMallGoodsDto.getThumbs(); |
| | | if(StrUtil.isNotEmpty(thumbs)){ |
| | | List<String> imgs = StrUtil.splitTrim(thumbs, ","); |
| | | if(CollUtil.isNotEmpty(imgs)){ |
| | | int i = 1; |
| | | for(String img : imgs){ |
| | | MallGoodsImages mallGoodsImages = new MallGoodsImages(); |
| | | mallGoodsImages.setGoodsId(mallGoods.getId()); |
| | | mallGoodsImages.setImageUrl(img); |
| | | mallGoodsImages.setSeq(i); |
| | | mallGoodsImagesMapper.insert(mallGoodsImages); |
| | | i++; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | List<AddMallGoodsSkuDto> addMallGoodsSkuDtos = addMallGoodsDto.getAddMallGoodsSkuDtos(); |
| | | if(CollUtil.isNotEmpty(addMallGoodsSkuDtos)){ |
| | | for(AddMallGoodsSkuDto addMallGoodsSkuDto : addMallGoodsSkuDtos){ |