diff --git a/book-coupon/src/main/java/com/bookstore/bookmall/coupon/controller/SpuBoundsController.java b/book-coupon/src/main/java/com/bookstore/bookmall/coupon/controller/SpuBoundsController.java index 58be506..bb6f17a 100644 --- a/book-coupon/src/main/java/com/bookstore/bookmall/coupon/controller/SpuBoundsController.java +++ b/book-coupon/src/main/java/com/bookstore/bookmall/coupon/controller/SpuBoundsController.java @@ -5,11 +5,7 @@ import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import com.bookstore.bookmall.coupon.entity.SpuBoundsEntity; import com.bookstore.bookmall.coupon.service.SpuBoundsService; @@ -57,7 +53,7 @@ public class SpuBoundsController { /** * 保存 */ - @RequestMapping("/save") + @PostMapping("/save") //@RequiresPermissions("coupon:spubounds:save") public R save(@RequestBody SpuBoundsEntity spuBounds){ spuBoundsService.save(spuBounds); diff --git a/book-product/src/main/java/com/bookstore/bookmall/product/controller/SpuInfoController.java b/book-product/src/main/java/com/bookstore/bookmall/product/controller/SpuInfoController.java index 9c12200..da25eea 100644 --- a/book-product/src/main/java/com/bookstore/bookmall/product/controller/SpuInfoController.java +++ b/book-product/src/main/java/com/bookstore/bookmall/product/controller/SpuInfoController.java @@ -4,6 +4,7 @@ import java.util.Arrays; import java.util.Map; +import com.bookstore.bookmall.product.vo.SpuSaveVo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; @@ -59,8 +60,10 @@ public class SpuInfoController { */ @RequestMapping("/save") //@RequiresPermissions("product:spuinfo:save") - public R save(@RequestBody SpuInfoEntity spuInfo){ - spuInfoService.save(spuInfo); + public R save(@RequestBody SpuSaveVo vo){ + //spuInfoService.save(spuInfo); + + spuInfoService.saveSpuInfo(vo); return R.ok(); } diff --git a/book-product/src/main/java/com/bookstore/bookmall/product/feign/CouponFeignService.java b/book-product/src/main/java/com/bookstore/bookmall/product/feign/CouponFeignService.java new file mode 100644 index 0000000..c37e6de --- /dev/null +++ b/book-product/src/main/java/com/bookstore/bookmall/product/feign/CouponFeignService.java @@ -0,0 +1,14 @@ +package com.bookstore.bookmall.product.feign; + +import com.bookstore.common.to.SpuBoundsTo; +import com.bookstore.common.utils.R; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +@FeignClient("book-coupon") +public interface CouponFeignService { + + @PostMapping("/coupon/spubounds/save") + R saveSpuBounds(@RequestBody SpuBoundsTo spuBoundsTo); +} diff --git a/book-product/src/main/java/com/bookstore/bookmall/product/mallProductApplication.java b/book-product/src/main/java/com/bookstore/bookmall/product/mallProductApplication.java index f0f55a6..12988c3 100644 --- a/book-product/src/main/java/com/bookstore/bookmall/product/mallProductApplication.java +++ b/book-product/src/main/java/com/bookstore/bookmall/product/mallProductApplication.java @@ -5,6 +5,7 @@ import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.cloud.openfeign.EnableFeignClients; /* @@ -46,6 +47,7 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +@EnableFeignClients(basePackages = "com.bookstore.bookmall.product.feign") @MapperScan("com.bookstore.bookmall.product.dao") @EnableDiscoveryClient @SpringBootApplication diff --git a/book-product/src/main/java/com/bookstore/bookmall/product/service/ProductAttrValueService.java b/book-product/src/main/java/com/bookstore/bookmall/product/service/ProductAttrValueService.java index 78f4bda..ff3681a 100644 --- a/book-product/src/main/java/com/bookstore/bookmall/product/service/ProductAttrValueService.java +++ b/book-product/src/main/java/com/bookstore/bookmall/product/service/ProductAttrValueService.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService; import com.bookstore.common.utils.PageUtils; import com.bookstore.bookmall.product.entity.ProductAttrValueEntity; +import java.util.List; import java.util.Map; /** @@ -16,5 +17,7 @@ import java.util.Map; public interface ProductAttrValueService extends IService { PageUtils queryPage(Map params); + + void saveProductAttr(List collect); } diff --git a/book-product/src/main/java/com/bookstore/bookmall/product/service/SkuInfoService.java b/book-product/src/main/java/com/bookstore/bookmall/product/service/SkuInfoService.java index 3be081c..886a056 100644 --- a/book-product/src/main/java/com/bookstore/bookmall/product/service/SkuInfoService.java +++ b/book-product/src/main/java/com/bookstore/bookmall/product/service/SkuInfoService.java @@ -16,5 +16,7 @@ import java.util.Map; public interface SkuInfoService extends IService { PageUtils queryPage(Map params); + + void saveSkuInfo(SkuInfoEntity skuInfoEntity); } diff --git a/book-product/src/main/java/com/bookstore/bookmall/product/service/SpuImagesService.java b/book-product/src/main/java/com/bookstore/bookmall/product/service/SpuImagesService.java index d73248d..b18202d 100644 --- a/book-product/src/main/java/com/bookstore/bookmall/product/service/SpuImagesService.java +++ b/book-product/src/main/java/com/bookstore/bookmall/product/service/SpuImagesService.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService; import com.bookstore.common.utils.PageUtils; import com.bookstore.bookmall.product.entity.SpuImagesEntity; +import java.util.List; import java.util.Map; /** @@ -16,5 +17,7 @@ import java.util.Map; public interface SpuImagesService extends IService { PageUtils queryPage(Map params); + + void saveImages(Long id, List images); } diff --git a/book-product/src/main/java/com/bookstore/bookmall/product/service/SpuInfoDescService.java b/book-product/src/main/java/com/bookstore/bookmall/product/service/SpuInfoDescService.java index 2c56f98..a719247 100644 --- a/book-product/src/main/java/com/bookstore/bookmall/product/service/SpuInfoDescService.java +++ b/book-product/src/main/java/com/bookstore/bookmall/product/service/SpuInfoDescService.java @@ -16,5 +16,7 @@ import java.util.Map; public interface SpuInfoDescService extends IService { PageUtils queryPage(Map params); + + void saveSpuInfoDesc(SpuInfoDescEntity descEntity); } diff --git a/book-product/src/main/java/com/bookstore/bookmall/product/service/SpuInfoService.java b/book-product/src/main/java/com/bookstore/bookmall/product/service/SpuInfoService.java index eaf4d43..01abd21 100644 --- a/book-product/src/main/java/com/bookstore/bookmall/product/service/SpuInfoService.java +++ b/book-product/src/main/java/com/bookstore/bookmall/product/service/SpuInfoService.java @@ -1,6 +1,7 @@ package com.bookstore.bookmall.product.service; import com.baomidou.mybatisplus.extension.service.IService; +import com.bookstore.bookmall.product.vo.SpuSaveVo; import com.bookstore.common.utils.PageUtils; import com.bookstore.bookmall.product.entity.SpuInfoEntity; @@ -16,5 +17,9 @@ import java.util.Map; public interface SpuInfoService extends IService { PageUtils queryPage(Map params); + + void saveSpuInfo(SpuSaveVo vo); + + void saveBaseSpuInfo(SpuInfoEntity spuInfoEntity); } diff --git a/book-product/src/main/java/com/bookstore/bookmall/product/service/impl/ProductAttrValueServiceImpl.java b/book-product/src/main/java/com/bookstore/bookmall/product/service/impl/ProductAttrValueServiceImpl.java index 956fbbf..5b20a6e 100644 --- a/book-product/src/main/java/com/bookstore/bookmall/product/service/impl/ProductAttrValueServiceImpl.java +++ b/book-product/src/main/java/com/bookstore/bookmall/product/service/impl/ProductAttrValueServiceImpl.java @@ -1,6 +1,8 @@ package com.bookstore.bookmall.product.service.impl; import org.springframework.stereotype.Service; + +import java.util.List; import java.util.Map; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -26,4 +28,9 @@ public class ProductAttrValueServiceImpl extends ServiceImpl collect) { + this.saveBatch(collect); + } + } \ No newline at end of file diff --git a/book-product/src/main/java/com/bookstore/bookmall/product/service/impl/SkuInfoServiceImpl.java b/book-product/src/main/java/com/bookstore/bookmall/product/service/impl/SkuInfoServiceImpl.java index 42d0d5c..3b62cb4 100644 --- a/book-product/src/main/java/com/bookstore/bookmall/product/service/impl/SkuInfoServiceImpl.java +++ b/book-product/src/main/java/com/bookstore/bookmall/product/service/impl/SkuInfoServiceImpl.java @@ -26,4 +26,9 @@ public class SkuInfoServiceImpl extends ServiceImpl i return new PageUtils(page); } + @Override + public void saveSkuInfo(SkuInfoEntity skuInfoEntity) { + this.baseMapper.insert(skuInfoEntity); + } + } \ No newline at end of file diff --git a/book-product/src/main/java/com/bookstore/bookmall/product/service/impl/SpuImagesServiceImpl.java b/book-product/src/main/java/com/bookstore/bookmall/product/service/impl/SpuImagesServiceImpl.java index 50dddab..5af3b9b 100644 --- a/book-product/src/main/java/com/bookstore/bookmall/product/service/impl/SpuImagesServiceImpl.java +++ b/book-product/src/main/java/com/bookstore/bookmall/product/service/impl/SpuImagesServiceImpl.java @@ -1,7 +1,12 @@ package com.bookstore.bookmall.product.service.impl; import org.springframework.stereotype.Service; + +import java.awt.*; +import java.util.List; import java.util.Map; +import java.util.stream.Collectors; + import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -26,4 +31,19 @@ public class SpuImagesServiceImpl extends ServiceImpl images) { + if (images != null && images.size() > 0) { + List collect = images.stream().map((image) -> { + SpuImagesEntity ImagesEntity = new SpuImagesEntity(); + ImagesEntity.setId(id); + ImagesEntity.setImgUrl(image); + + return ImagesEntity; + }).collect(Collectors.toList()); + this.saveBatch(collect); + } + + } + } \ No newline at end of file diff --git a/book-product/src/main/java/com/bookstore/bookmall/product/service/impl/SpuInfoDescServiceImpl.java b/book-product/src/main/java/com/bookstore/bookmall/product/service/impl/SpuInfoDescServiceImpl.java index 5b1560e..21e15b6 100644 --- a/book-product/src/main/java/com/bookstore/bookmall/product/service/impl/SpuInfoDescServiceImpl.java +++ b/book-product/src/main/java/com/bookstore/bookmall/product/service/impl/SpuInfoDescServiceImpl.java @@ -11,6 +11,7 @@ import com.bookstore.common.utils.Query; import com.bookstore.bookmall.product.dao.SpuInfoDescDao; import com.bookstore.bookmall.product.entity.SpuInfoDescEntity; import com.bookstore.bookmall.product.service.SpuInfoDescService; +import org.springframework.transaction.annotation.Transactional; @Service("spuInfoDescService") @@ -26,4 +27,10 @@ public class SpuInfoDescServiceImpl extends ServiceImpl implements SpuInfoService { + @Autowired + SpuInfoDescService DescService; + @Autowired + SpuImagesService imagesService; + @Autowired + AttrService attrService; + @Autowired + ProductAttrValueService valueService; + @Autowired + SkuInfoService skuInfoService; + @Autowired + SkuImagesService skuImagesService; + @Autowired + SkuSaleAttrValueService skuSaleAttrValueService; + @Autowired + CouponFeignService couponFeignService; + @Override public PageUtils queryPage(Map params) { IPage page = this.page( @@ -26,4 +57,118 @@ public class SpuInfoServiceImpl extends ServiceImpl i return new PageUtils(page); } + //商品保存 + //基本信息在pms_spu_info + //描述信息在pms_spu_info_desc + //sku: spu销售属性笛卡尔积得出了sku + @Transactional + @Override + public void saveSpuInfo(SpuSaveVo vo) { + //1、保存基本信息 pms_spu_info + SpuInfoEntity spuInfoEntity = new SpuInfoEntity(); + BeanUtils.copyProperties(vo, spuInfoEntity); + spuInfoEntity.setCreateTime(new Date()); + spuInfoEntity.setUpdateTime(new Date()); + this.saveBaseSpuInfo(spuInfoEntity); + + //2、保存spu的描述图片 pms_spu_images + List decript = vo.getDecript(); + SpuInfoDescEntity DescEntity = new SpuInfoDescEntity(); + DescEntity.setSpuId(spuInfoEntity.getId()); + DescEntity.setDecript(String.join(",",decript)); + DescService.saveSpuInfoDesc(DescEntity); + + //3、保存spu的图片集 pms_spu_images + List images = vo.getImages(); + imagesService.saveImages(spuInfoEntity.getId(), images); + + //4、保存spu的基本属性(规格参数) //pms_product_attr_value + List baseAttrs = vo.getBaseAttrs(); + List collect = baseAttrs.stream().map(attr -> { + ProductAttrValueEntity valueEntity = new ProductAttrValueEntity(); + valueEntity.setAttrId(attr.getAttrId()); + AttrEntity byId = attrService.getById(attr.getAttrId()); + valueEntity.setAttrName(byId.getAttrName()); + valueEntity.setAttrValue(attr.getAttrValues()); + valueEntity.setQuickShow(attr.getShowDesc()); + valueEntity.setSpuId(spuInfoEntity.getId()); + + return valueEntity; + }).collect(Collectors.toList()); + valueService.saveProductAttr(collect); + + //保存spu的积分信息;mall-sms-> sms_spu_bounds + Bounds bounds = vo.getBounds(); + SpuBoundsTo spuBoundsTo = new SpuBoundsTo(); + BeanUtils.copyProperties(bounds, spuBoundsTo); + spuBoundsTo.setSpuId(spuInfoEntity.getId()); + couponFeignService.saveSpuBounds(spuBoundsTo); + + //5、保存当前spu对应的所有sku信息 + List skus = vo.getSkus(); + if (skus!=null && skus.size()>0) { + skus.forEach(item->{ + String defaultImg = ""; + for (Images image : item.getImages()) { + if (image.getDefaultImg() == 1) { + defaultImg = image.getImgUrl(); + } + } + +// private String skuName; +// private BigDecimal price; +// private String skuTitle; +// private String skuSubtitle; + //5.1 sku的基本属性(pms_sku_info):id, 名字,标题,副标题,价格,默认图片,分类id + SkuInfoEntity skuInfoEntity = new SkuInfoEntity(); + BeanUtils.copyProperties(item, skuInfoEntity); + skuInfoEntity.setBrandId(spuInfoEntity.getBrandId()); + skuInfoEntity.setCatalogId(spuInfoEntity.getCatalogId()); + skuInfoEntity.setSaleCount(0L); + skuInfoEntity.setSpuId(spuInfoEntity.getId()); + skuInfoEntity.setSkuDefaultImg(defaultImg); + skuInfoService.saveSkuInfo(skuInfoEntity); + + //5.2 sku的图片信息: pms_sku_images + Long skuId = skuInfoEntity.getSkuId(); + List skuImagesEntities = item.getImages().stream().map(image -> { + SkuImagesEntity skuImagesEntity = new SkuImagesEntity(); + + skuImagesEntity.setSkuId(skuId); + skuImagesEntity.setImgUrl(image.getImgUrl()); + skuImagesEntity.setDefaultImg(image.getDefaultImg()); + + return skuImagesEntity; + }).collect(Collectors.toList()); + skuImagesService.saveBatch(skuImagesEntities); + + //5.3 sku的销售属性信息 pms_sku_sale_attr_value + List attr = item.getAttr(); + List skuSaleAttrValueEntities = attr.stream().map(a -> { + SkuSaleAttrValueEntity skuSaleAttrValueEntity = new SkuSaleAttrValueEntity(); + BeanUtils.copyProperties(skuSaleAttrValueEntity, a); + skuSaleAttrValueEntity.setSkuId(skuId); + return skuSaleAttrValueEntity; + }).collect(Collectors.toList()); + skuSaleAttrValueService.saveBatch(skuSaleAttrValueEntities); + + //5.4 sku的优惠满减信息 + + }); + + + + } + + + + + +} + + public void saveBaseSpuInfo(SpuInfoEntity spuInfoEntity) { + this.baseMapper.insert(spuInfoEntity); + } + + } \ No newline at end of file diff --git a/book-product/src/main/java/com/bookstore/bookmall/product/vo/Attr.java b/book-product/src/main/java/com/bookstore/bookmall/product/vo/Attr.java new file mode 100644 index 0000000..492c809 --- /dev/null +++ b/book-product/src/main/java/com/bookstore/bookmall/product/vo/Attr.java @@ -0,0 +1,21 @@ +/** + * Copyright 2019 bejson.com + */ +package com.bookstore.bookmall.product.vo; + +import lombok.Data; + +/** + * Auto-generated: 2019-11-26 10:50:34 + * + * @author bejson.com (i@bejson.com) + * @website http://www.bejson.com/java2pojo/ + */ +@Data +public class Attr { + + private Long attrId; + private String attrName; + private String attrValue; + +} \ No newline at end of file diff --git a/book-product/src/main/java/com/bookstore/bookmall/product/vo/BaseAttrs.java b/book-product/src/main/java/com/bookstore/bookmall/product/vo/BaseAttrs.java new file mode 100644 index 0000000..83ee72d --- /dev/null +++ b/book-product/src/main/java/com/bookstore/bookmall/product/vo/BaseAttrs.java @@ -0,0 +1,23 @@ +/** + * Copyright 2019 bejson.com + */ +package com.bookstore.bookmall.product.vo; + +import lombok.Data; + +/** + * Auto-generated: 2019-11-26 10:50:34 + * + * @author bejson.com (i@bejson.com) + * @website http://www.bejson.com/java2pojo/ + */ +@Data +public class BaseAttrs { + + private Long attrId; + private String attrValues; + private int showDesc; + + + +} \ No newline at end of file diff --git a/book-product/src/main/java/com/bookstore/bookmall/product/vo/Bounds.java b/book-product/src/main/java/com/bookstore/bookmall/product/vo/Bounds.java new file mode 100644 index 0000000..9c8000a --- /dev/null +++ b/book-product/src/main/java/com/bookstore/bookmall/product/vo/Bounds.java @@ -0,0 +1,23 @@ +/** + * Copyright 2019 bejson.com + */ +package com.bookstore.bookmall.product.vo; + +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Auto-generated: 2019-11-26 10:50:34 + * + * @author bejson.com (i@bejson.com) + * @website http://www.bejson.com/java2pojo/ + */ +@Data +public class Bounds { + + private BigDecimal buyBounds; + private BigDecimal growBounds; + + +} \ No newline at end of file diff --git a/book-product/src/main/java/com/bookstore/bookmall/product/vo/Images.java b/book-product/src/main/java/com/bookstore/bookmall/product/vo/Images.java new file mode 100644 index 0000000..f5298a7 --- /dev/null +++ b/book-product/src/main/java/com/bookstore/bookmall/product/vo/Images.java @@ -0,0 +1,21 @@ +/** + * Copyright 2019 bejson.com + */ +package com.bookstore.bookmall.product.vo; + +import lombok.Data; + +/** + * Auto-generated: 2019-11-26 10:50:34 + * + * @author bejson.com (i@bejson.com) + * @website http://www.bejson.com/java2pojo/ + */ +@Data +public class Images { + + private String imgUrl; + private int defaultImg; + + +} \ No newline at end of file diff --git a/book-product/src/main/java/com/bookstore/bookmall/product/vo/MemberPrice.java b/book-product/src/main/java/com/bookstore/bookmall/product/vo/MemberPrice.java new file mode 100644 index 0000000..d049787 --- /dev/null +++ b/book-product/src/main/java/com/bookstore/bookmall/product/vo/MemberPrice.java @@ -0,0 +1,23 @@ +/** + * Copyright 2019 bejson.com + */ +package com.bookstore.bookmall.product.vo; + +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Auto-generated: 2019-11-26 10:50:34 + * + * @author bejson.com (i@bejson.com) + * @website http://www.bejson.com/java2pojo/ + */ +@Data +public class MemberPrice { + + private Long id; + private String name; + private BigDecimal price; + +} \ No newline at end of file diff --git a/book-product/src/main/java/com/bookstore/bookmall/product/vo/Skus.java b/book-product/src/main/java/com/bookstore/bookmall/product/vo/Skus.java new file mode 100644 index 0000000..3680e24 --- /dev/null +++ b/book-product/src/main/java/com/bookstore/bookmall/product/vo/Skus.java @@ -0,0 +1,35 @@ +/** + * Copyright 2019 bejson.com + */ +package com.bookstore.bookmall.product.vo; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * Auto-generated: 2019-11-26 10:50:34 + * + * @author bejson.com (i@bejson.com) + * @website http://www.bejson.com/java2pojo/ + */ +@Data +public class Skus { + + private List attr; + private String skuName; + private BigDecimal price; + private String skuTitle; + private String skuSubtitle; + private List images; + private List descar; + private int fullCount; + private BigDecimal discount; + private int countStatus; + private BigDecimal fullPrice; + private BigDecimal reducePrice; + private int priceStatus; + private List memberPrice; + + +} \ No newline at end of file diff --git a/book-product/src/main/java/com/bookstore/bookmall/product/vo/SpuSaveVo.java b/book-product/src/main/java/com/bookstore/bookmall/product/vo/SpuSaveVo.java new file mode 100644 index 0000000..ff0cc46 --- /dev/null +++ b/book-product/src/main/java/com/bookstore/bookmall/product/vo/SpuSaveVo.java @@ -0,0 +1,34 @@ +/** + * Copyright 2019 bejson.com + */ +package com.bookstore.bookmall.product.vo; + +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * Auto-generated: 2019-11-26 10:50:34 + * + * @author bejson.com (i@bejson.com) + * @website http://www.bejson.com/java2pojo/ + */ +@Data +public class SpuSaveVo { + + private String spuName; + private String spuDescription; + private Long catalogId; + private Long brandId; + private BigDecimal weight; + private int publishStatus; + private List decript; + private List images; + private Bounds bounds; + private List baseAttrs; + private List skus; + + + +} \ No newline at end of file diff --git a/mall-common/src/main/java/com/bookstore/common/to/MemberPrice.java b/mall-common/src/main/java/com/bookstore/common/to/MemberPrice.java new file mode 100644 index 0000000..6e8ac94 --- /dev/null +++ b/mall-common/src/main/java/com/bookstore/common/to/MemberPrice.java @@ -0,0 +1,23 @@ +/** + * Copyright 2019 bejson.com + */ +package com.bookstore.common.to; + +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Auto-generated: 2019-11-26 10:50:34 + * + * @author bejson.com (i@bejson.com) + * @website http://www.bejson.com/java2pojo/ + */ +@Data +public class MemberPrice { + + private Long id; + private String name; + private BigDecimal price; + +} \ No newline at end of file diff --git a/mall-common/src/main/java/com/bookstore/common/to/SkuReductionTo.java b/mall-common/src/main/java/com/bookstore/common/to/SkuReductionTo.java new file mode 100644 index 0000000..b7770a5 --- /dev/null +++ b/mall-common/src/main/java/com/bookstore/common/to/SkuReductionTo.java @@ -0,0 +1,16 @@ +package com.bookstore.common.to; + + +import lombok.Data; + +import java.math.BigDecimal; + +@Data +public class skuReductionTo { + private int fullCount; + private BigDecimal discount; + private int countStatus; + private BigDecimal fullPrice; + private BigDecimal reducePrice; + private int priceStatus; +} diff --git a/mall-common/src/main/java/com/bookstore/common/to/SpuBoundsTo.java b/mall-common/src/main/java/com/bookstore/common/to/SpuBoundsTo.java new file mode 100644 index 0000000..03f209b --- /dev/null +++ b/mall-common/src/main/java/com/bookstore/common/to/SpuBoundsTo.java @@ -0,0 +1,12 @@ +package com.bookstore.common.to; + +import lombok.Data; + +import java.math.BigDecimal; + +@Data +public class SpuBoundsTo { + private Long spuId; + private BigDecimal buyBounds; + private BigDecimal growBounds; +}