Commit c3e36ba9da272796406ec3fcc95ef88809129caa
1 parent
6786aa35
修正相关问题让服务正常启动,改动位置都已加上TODO记录
Showing
13 changed files
with
45 additions
and
40 deletions
pom.xml
| @@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
| 16 | <module>yudao-module-member</module> | 16 | <module>yudao-module-member</module> |
| 17 | <module>yudao-module-system</module> | 17 | <module>yudao-module-system</module> |
| 18 | <module>yudao-module-infra</module> | 18 | <module>yudao-module-infra</module> |
| 19 | -<!-- <module>yudao-module-pay</module>--> | 19 | + <module>yudao-module-pay</module> |
| 20 | <!-- <module>yudao-module-bpm</module>--> | 20 | <!-- <module>yudao-module-bpm</module>--> |
| 21 | <!-- <module>yudao-module-report</module>--> | 21 | <!-- <module>yudao-module-report</module>--> |
| 22 | <!-- <module>yudao-module-mp</module>--> | 22 | <!-- <module>yudao-module-mp</module>--> |
yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/spu/dto/ProductSpuRespDTO.java
| @@ -79,7 +79,7 @@ public class ProductSpuRespDTO { | @@ -79,7 +79,7 @@ public class ProductSpuRespDTO { | ||
| 79 | * <p> | 79 | * <p> |
| 80 | * 枚举 {@link ProductSpuSpecTypeEnum} | 80 | * 枚举 {@link ProductSpuSpecTypeEnum} |
| 81 | */ | 81 | */ |
| 82 | - private Integer specType; | 82 | + private Boolean specType; |
| 83 | /** | 83 | /** |
| 84 | * 最小价格,单位使用:分 | 84 | * 最小价格,单位使用:分 |
| 85 | * <p> | 85 | * <p> |
yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/spu/ProductSpuSpecTypeEnum.java
| @@ -16,15 +16,15 @@ import java.util.Arrays; | @@ -16,15 +16,15 @@ import java.util.Arrays; | ||
| 16 | @Deprecated | 16 | @Deprecated |
| 17 | public enum ProductSpuSpecTypeEnum implements IntArrayValuable { | 17 | public enum ProductSpuSpecTypeEnum implements IntArrayValuable { |
| 18 | 18 | ||
| 19 | - RECYCLE(1, "统一规格"), | ||
| 20 | - DISABLE(2, "多规格"); | ||
| 21 | - | ||
| 22 | - public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ProductSpuSpecTypeEnum::getType).toArray(); | 19 | + RECYCLE(false, "统一规格"), |
| 20 | + DISABLE(true, "多规格"); | ||
| 23 | 21 | ||
| 22 | + //public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ProductSpuSpecTypeEnum::getType).toArray();// TODO 暂时先这样跑起来 | ||
| 23 | + public static final int[] ARRAYS = {}; | ||
| 24 | /** | 24 | /** |
| 25 | * 规格类型 | 25 | * 规格类型 |
| 26 | */ | 26 | */ |
| 27 | - private final Integer type; | 27 | + private final Boolean type; |
| 28 | /** | 28 | /** |
| 29 | * 规格名称 | 29 | * 规格名称 |
| 30 | */ | 30 | */ |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuBaseVO.java
| @@ -57,8 +57,7 @@ public class ProductSpuBaseVO { | @@ -57,8 +57,7 @@ public class ProductSpuBaseVO { | ||
| 57 | 57 | ||
| 58 | @Schema(description = "规格类型", required = true, example = "1") | 58 | @Schema(description = "规格类型", required = true, example = "1") |
| 59 | @NotNull(message = "规格类型不能为空") | 59 | @NotNull(message = "规格类型不能为空") |
| 60 | - @InEnum(ProductSpuSpecTypeEnum.class) | ||
| 61 | - private Integer specType; | 60 | + private Boolean specType; |
| 62 | 61 | ||
| 63 | @Schema(description = "是否展示库存", required = true, example = "true") | 62 | @Schema(description = "是否展示库存", required = true, example = "true") |
| 64 | @NotNull(message = "是否展示库存不能为空") | 63 | @NotNull(message = "是否展示库存不能为空") |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/vo/AppProductSpuDetailRespVO.java
| @@ -35,8 +35,8 @@ public class AppProductSpuDetailRespVO { | @@ -35,8 +35,8 @@ public class AppProductSpuDetailRespVO { | ||
| 35 | 35 | ||
| 36 | // ========== SKU 相关字段 ========= | 36 | // ========== SKU 相关字段 ========= |
| 37 | 37 | ||
| 38 | - @Schema(description = "规格类型", required = true, example = "1") | ||
| 39 | - private Integer specType; | 38 | + @Schema(description = "规格类型", required = true, example = "true") |
| 39 | + private Boolean specType; | ||
| 40 | 40 | ||
| 41 | @Schema(description = "是否展示库存", required = true, example = "true") | 41 | @Schema(description = "是否展示库存", required = true, example = "true") |
| 42 | private Boolean showStock; | 42 | private Boolean showStock; |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/convert/sku/ProductSkuConvert.java
| @@ -37,7 +37,8 @@ public interface ProductSkuConvert { | @@ -37,7 +37,8 @@ public interface ProductSkuConvert { | ||
| 37 | 37 | ||
| 38 | default List<ProductSkuDO> convertList06(List<ProductSkuCreateOrUpdateReqVO> list, Long spuId, String spuName) { | 38 | default List<ProductSkuDO> convertList06(List<ProductSkuCreateOrUpdateReqVO> list, Long spuId, String spuName) { |
| 39 | List<ProductSkuDO> result = convertList06(list); | 39 | List<ProductSkuDO> result = convertList06(list); |
| 40 | - result.forEach(item -> item.setSpuId(spuId).setSpuName(spuName)); | 40 | + // result.forEach(item -> item.setSpuId(spuId).setSpuName(spuName)); TODO ProductSkuDO中已经没有name相关属性 |
| 41 | + result.forEach(item -> item.setSpuId(spuId)); | ||
| 41 | return result; | 42 | return result; |
| 42 | } | 43 | } |
| 43 | 44 |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/sku/ProductSkuMapper.java
| @@ -26,8 +26,8 @@ public interface ProductSkuMapper extends BaseMapperX<ProductSkuDO> { | @@ -26,8 +26,8 @@ public interface ProductSkuMapper extends BaseMapperX<ProductSkuDO> { | ||
| 26 | default List<ProductSkuDO> selectListBySpuIdAndStatus(Long spuId, | 26 | default List<ProductSkuDO> selectListBySpuIdAndStatus(Long spuId, |
| 27 | Integer status) { | 27 | Integer status) { |
| 28 | return selectList(new LambdaQueryWrapperX<ProductSkuDO>() | 28 | return selectList(new LambdaQueryWrapperX<ProductSkuDO>() |
| 29 | - .eq(ProductSkuDO::getSpuId, spuId) | ||
| 30 | - .eqIfPresent(ProductSkuDO::getStatus, status)); | 29 | + .eq(ProductSkuDO::getSpuId, spuId)// eqIfPresent(ProductSkuDO::getStatus, status) TODO ProductSkuDO已经没有status属性 |
| 30 | + ); | ||
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | default List<ProductSkuDO> selectListBySpuId(Collection<Long> spuIds) { | 33 | default List<ProductSkuDO> selectListBySpuId(Collection<Long> spuIds) { |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/spu/ProductSpuMapper.java
| @@ -52,7 +52,8 @@ public interface ProductSpuMapper extends BaseMapperX<ProductSpuDO> { | @@ -52,7 +52,8 @@ public interface ProductSpuMapper extends BaseMapperX<ProductSpuDO> { | ||
| 52 | .eqIfPresent(ProductSpuDO::getStatus, status); | 52 | .eqIfPresent(ProductSpuDO::getStatus, status); |
| 53 | // 排序逻辑 | 53 | // 排序逻辑 |
| 54 | if (Objects.equals(pageReqVO.getSortField(), AppProductSpuPageReqVO.SORT_FIELD_PRICE)) { | 54 | if (Objects.equals(pageReqVO.getSortField(), AppProductSpuPageReqVO.SORT_FIELD_PRICE)) { |
| 55 | - query.orderBy(true, pageReqVO.getSortAsc(), ProductSpuDO::getMaxPrice); | 55 | + // TODO ProductSpuDO 已经没有maxPrice 属性 |
| 56 | + //query.orderBy(true, pageReqVO.getSortAsc(), ProductSpuDO::getMaxPrice); | ||
| 56 | } else if (Objects.equals(pageReqVO.getSortField(), AppProductSpuPageReqVO.SORT_FIELD_SALES_COUNT)) { | 57 | } else if (Objects.equals(pageReqVO.getSortField(), AppProductSpuPageReqVO.SORT_FIELD_SALES_COUNT)) { |
| 57 | query.orderBy(true, pageReqVO.getSortAsc(), ProductSpuDO::getSalesCount); | 58 | query.orderBy(true, pageReqVO.getSortAsc(), ProductSpuDO::getSalesCount); |
| 58 | } | 59 | } |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/sku/ProductSkuService.java
| @@ -50,7 +50,7 @@ public interface ProductSkuService { | @@ -50,7 +50,7 @@ public interface ProductSkuService { | ||
| 50 | * | 50 | * |
| 51 | * @param list sku组合的集合 | 51 | * @param list sku组合的集合 |
| 52 | */ | 52 | */ |
| 53 | - void validateSkuList(List<ProductSkuCreateOrUpdateReqVO> list, Integer specType); | 53 | + void validateSkuList(List<ProductSkuCreateOrUpdateReqVO> list, Boolean specType); |
| 54 | 54 | ||
| 55 | /** | 55 | /** |
| 56 | * 批量创建 SKU | 56 | * 批量创建 SKU |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/sku/ProductSkuServiceImpl.java
| @@ -79,7 +79,7 @@ public class ProductSkuServiceImpl implements ProductSkuService { | @@ -79,7 +79,7 @@ public class ProductSkuServiceImpl implements ProductSkuService { | ||
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | @Override | 81 | @Override |
| 82 | - public void validateSkuList(List<ProductSkuCreateOrUpdateReqVO> skus, Integer specType) { | 82 | + public void validateSkuList(List<ProductSkuCreateOrUpdateReqVO> skus, Boolean specType) { |
| 83 | // 非多规格,不需要校验 | 83 | // 非多规格,不需要校验 |
| 84 | if (ObjectUtil.notEqual(specType, ProductSpuSpecTypeEnum.DISABLE.getType())) { | 84 | if (ObjectUtil.notEqual(specType, ProductSpuSpecTypeEnum.DISABLE.getType())) { |
| 85 | return; | 85 | return; |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/spu/ProductSpuServiceImpl.java
| @@ -102,9 +102,10 @@ public class ProductSpuServiceImpl implements ProductSpuService { | @@ -102,9 +102,10 @@ public class ProductSpuServiceImpl implements ProductSpuService { | ||
| 102 | */ | 102 | */ |
| 103 | private void initSpuFromSkus(ProductSpuDO spu, List<ProductSkuCreateOrUpdateReqVO> skus) { | 103 | private void initSpuFromSkus(ProductSpuDO spu, List<ProductSkuCreateOrUpdateReqVO> skus) { |
| 104 | spu.setMarketPrice(getMaxValue(skus, ProductSkuCreateOrUpdateReqVO::getMarketPrice)); | 104 | spu.setMarketPrice(getMaxValue(skus, ProductSkuCreateOrUpdateReqVO::getMarketPrice)); |
| 105 | - spu.setMaxPrice(getMaxValue(skus, ProductSkuCreateOrUpdateReqVO::getPrice)); | ||
| 106 | - spu.setMinPrice(getMinValue(skus, ProductSkuCreateOrUpdateReqVO::getPrice)); | ||
| 107 | - spu.setTotalStock(getSumValue(skus, ProductSkuCreateOrUpdateReqVO::getStock, Integer::sum)); | 105 | + // TODO ProductSpuDO中已没有相关属性 |
| 106 | + //spu.setMaxPrice(getMaxValue(skus, ProductSkuCreateOrUpdateReqVO::getPrice)); | ||
| 107 | + //spu.setMinPrice(getMinValue(skus, ProductSkuCreateOrUpdateReqVO::getPrice)); | ||
| 108 | + //spu.setTotalStock(getSumValue(skus, ProductSkuCreateOrUpdateReqVO::getStock, Integer::sum)); | ||
| 108 | } | 109 | } |
| 109 | 110 | ||
| 110 | /** | 111 | /** |
yudao-module-mall/yudao-module-product-biz/src/test/java/cn/iocoder/yudao/module/product/service/spu/ProductSpuServiceImplTest.java
| @@ -94,6 +94,7 @@ public class ProductSpuServiceImplTest extends BaseDbUnitTest { | @@ -94,6 +94,7 @@ public class ProductSpuServiceImplTest extends BaseDbUnitTest { | ||
| 94 | ProductSpuDO productSpuDO = productSpuMapper.selectById(spu); | 94 | ProductSpuDO productSpuDO = productSpuMapper.selectById(spu); |
| 95 | 95 | ||
| 96 | createReqVO.setMarketPrice(CollectionUtils.getMaxValue(skuCreateReqList, ProductSkuCreateOrUpdateReqVO::getMarketPrice)); | 96 | createReqVO.setMarketPrice(CollectionUtils.getMaxValue(skuCreateReqList, ProductSkuCreateOrUpdateReqVO::getMarketPrice)); |
| 97 | + // TODO ProductSpuCreateReqVO中已没有相关属性 | ||
| 97 | // createReqVO.setMaxPrice(CollectionUtils.getMaxValue(skuCreateReqList, ProductSkuCreateOrUpdateReqVO::getPrice)); | 98 | // createReqVO.setMaxPrice(CollectionUtils.getMaxValue(skuCreateReqList, ProductSkuCreateOrUpdateReqVO::getPrice)); |
| 98 | // createReqVO.setMinPrice(CollectionUtils.getMinValue(skuCreateReqList, ProductSkuCreateOrUpdateReqVO::getPrice)); | 99 | // createReqVO.setMinPrice(CollectionUtils.getMinValue(skuCreateReqList, ProductSkuCreateOrUpdateReqVO::getPrice)); |
| 99 | // createReqVO.setTotalStock(CollectionUtils.getSumValue(skuCreateReqList, ProductSkuCreateOrUpdateReqVO::getStock, Integer::sum)); | 100 | // createReqVO.setTotalStock(CollectionUtils.getSumValue(skuCreateReqList, ProductSkuCreateOrUpdateReqVO::getStock, Integer::sum)); |
| @@ -118,6 +119,7 @@ public class ProductSpuServiceImplTest extends BaseDbUnitTest { | @@ -118,6 +119,7 @@ public class ProductSpuServiceImplTest extends BaseDbUnitTest { | ||
| 118 | 119 | ||
| 119 | List<ProductSkuCreateOrUpdateReqVO> skuCreateReqList = reqVO.getSkus(); | 120 | List<ProductSkuCreateOrUpdateReqVO> skuCreateReqList = reqVO.getSkus(); |
| 120 | reqVO.setMarketPrice(CollectionUtils.getMaxValue(skuCreateReqList, ProductSkuCreateOrUpdateReqVO::getMarketPrice)); | 121 | reqVO.setMarketPrice(CollectionUtils.getMaxValue(skuCreateReqList, ProductSkuCreateOrUpdateReqVO::getMarketPrice)); |
| 122 | + // TODO ProductSpuUpdateReqVO中已没有相关属性 | ||
| 121 | // reqVO.setMaxPrice(CollectionUtils.getMaxValue(skuCreateReqList, ProductSkuCreateOrUpdateReqVO::getPrice)); | 123 | // reqVO.setMaxPrice(CollectionUtils.getMaxValue(skuCreateReqList, ProductSkuCreateOrUpdateReqVO::getPrice)); |
| 122 | // reqVO.setMinPrice(CollectionUtils.getMinValue(skuCreateReqList, ProductSkuCreateOrUpdateReqVO::getPrice)); | 124 | // reqVO.setMinPrice(CollectionUtils.getMinValue(skuCreateReqList, ProductSkuCreateOrUpdateReqVO::getPrice)); |
| 123 | // reqVO.setTotalStock(CollectionUtils.getSumValue(skuCreateReqList, ProductSkuCreateOrUpdateReqVO::getStock, Integer::sum)); | 125 | // reqVO.setTotalStock(CollectionUtils.getSumValue(skuCreateReqList, ProductSkuCreateOrUpdateReqVO::getStock, Integer::sum)); |
| @@ -193,21 +195,21 @@ public class ProductSpuServiceImplTest extends BaseDbUnitTest { | @@ -193,21 +195,21 @@ public class ProductSpuServiceImplTest extends BaseDbUnitTest { | ||
| 193 | // 准备参数 | 195 | // 准备参数 |
| 194 | ProductSpuDO createReqVO = randomPojo(ProductSpuDO.class, o->{ | 196 | ProductSpuDO createReqVO = randomPojo(ProductSpuDO.class, o->{ |
| 195 | o.setStatus(ProductSpuStatusEnum.ENABLE.getStatus()); | 197 | o.setStatus(ProductSpuStatusEnum.ENABLE.getStatus()); |
| 196 | - o.setTotalStock(500); | ||
| 197 | - o.setMinPrice(1); | ||
| 198 | - o.setMaxPrice(50); | 198 | + //o.setTotalStock(500); |
| 199 | + //o.setMinPrice(1); // TODO ProductSpuDO中已没有相关属性 | ||
| 200 | + //o.setMaxPrice(50); | ||
| 199 | o.setMarketPrice(25); | 201 | o.setMarketPrice(25); |
| 200 | o.setSpecType(ProductSpuSpecTypeEnum.RECYCLE.getType()); | 202 | o.setSpecType(ProductSpuSpecTypeEnum.RECYCLE.getType()); |
| 201 | o.setBrandId(brandId); | 203 | o.setBrandId(brandId); |
| 202 | o.setCategoryId(categoryId); | 204 | o.setCategoryId(categoryId); |
| 203 | - o.setClickCount(100); | ||
| 204 | - o.setCode(code); | 205 | + //o.setClickCount(100); |
| 206 | + //o.setCode(code); // TODO ProductSpuDO中已没有相关属性 | ||
| 205 | o.setDescription("测试商品"); | 207 | o.setDescription("测试商品"); |
| 206 | o.setSliderPicUrls(new ArrayList<>()); | 208 | o.setSliderPicUrls(new ArrayList<>()); |
| 207 | o.setName("测试"); | 209 | o.setName("测试"); |
| 208 | o.setSalesCount(100); | 210 | o.setSalesCount(100); |
| 209 | - o.setSellPoint("超级加倍"); | ||
| 210 | - o.setShowStock(true); | 211 | + //o.setSellPoint("超级加倍"); |
| 212 | + //o.setShowStock(true); // TODO ProductSpuDO中已没有相关属性 | ||
| 211 | o.setVideoUrl(""); | 213 | o.setVideoUrl(""); |
| 212 | }); | 214 | }); |
| 213 | productSpuMapper.insert(createReqVO); | 215 | productSpuMapper.insert(createReqVO); |
| @@ -241,21 +243,21 @@ public class ProductSpuServiceImplTest extends BaseDbUnitTest { | @@ -241,21 +243,21 @@ public class ProductSpuServiceImplTest extends BaseDbUnitTest { | ||
| 241 | // 准备参数 | 243 | // 准备参数 |
| 242 | ProductSpuDO createReqVO = randomPojo(ProductSpuDO.class, o->{ | 244 | ProductSpuDO createReqVO = randomPojo(ProductSpuDO.class, o->{ |
| 243 | o.setStatus(ProductSpuStatusEnum.ENABLE.getStatus()); | 245 | o.setStatus(ProductSpuStatusEnum.ENABLE.getStatus()); |
| 244 | - o.setTotalStock(1); | ||
| 245 | - o.setMinPrice(1); | ||
| 246 | - o.setMaxPrice(1); | 246 | + //o.setTotalStock(1); |
| 247 | + //o.setMinPrice(1); // TODO ProductSpuDO中已没有相关属性 | ||
| 248 | + //o.setMaxPrice(1); | ||
| 247 | o.setMarketPrice(1); | 249 | o.setMarketPrice(1); |
| 248 | o.setSpecType(ProductSpuSpecTypeEnum.RECYCLE.getType()); | 250 | o.setSpecType(ProductSpuSpecTypeEnum.RECYCLE.getType()); |
| 249 | o.setBrandId(brandId); | 251 | o.setBrandId(brandId); |
| 250 | o.setCategoryId(categoryId); | 252 | o.setCategoryId(categoryId); |
| 251 | - o.setClickCount(1); | ||
| 252 | - o.setCode(generateNo()); | 253 | + //o.setClickCount(1); // TODO ProductSpuDO中已没有相关属性 |
| 254 | + //o.setCode(generateNo()); | ||
| 253 | o.setDescription("测试商品"); | 255 | o.setDescription("测试商品"); |
| 254 | o.setSliderPicUrls(new ArrayList<>()); | 256 | o.setSliderPicUrls(new ArrayList<>()); |
| 255 | o.setName("测试"); | 257 | o.setName("测试"); |
| 256 | o.setSalesCount(1); | 258 | o.setSalesCount(1); |
| 257 | - o.setSellPoint("卖点"); | ||
| 258 | - o.setShowStock(true); | 259 | + //o.setSellPoint("卖点"); |
| 260 | + //o.setShowStock(true); // TODO ProductSpuDO中已没有相关属性 | ||
| 259 | }); | 261 | }); |
| 260 | 262 | ||
| 261 | // 准备参数 | 263 | // 准备参数 |
| @@ -345,15 +347,15 @@ public class ProductSpuServiceImplTest extends BaseDbUnitTest { | @@ -345,15 +347,15 @@ public class ProductSpuServiceImplTest extends BaseDbUnitTest { | ||
| 345 | public void testUpdateSpuStock() { | 347 | public void testUpdateSpuStock() { |
| 346 | // 准备参数 | 348 | // 准备参数 |
| 347 | Map<Long, Integer> stockIncrCounts = MapUtil.builder(1L, 10).put(2L, -20).build(); | 349 | Map<Long, Integer> stockIncrCounts = MapUtil.builder(1L, 10).put(2L, -20).build(); |
| 348 | - // mock 方法(数据) | ||
| 349 | - productSpuMapper.insert(randomPojo(ProductSpuDO.class, o -> o.setId(1L).setTotalStock(20))); | ||
| 350 | - productSpuMapper.insert(randomPojo(ProductSpuDO.class, o -> o.setId(2L).setTotalStock(30))); | 350 | + // mock 方法(数据) // TODO ProductSpuDO中已没有相关属性 |
| 351 | + //productSpuMapper.insert(randomPojo(ProductSpuDO.class, o -> o.setId(1L).setTotalStock(20))); | ||
| 352 | + //productSpuMapper.insert(randomPojo(ProductSpuDO.class, o -> o.setId(2L).setTotalStock(30))); | ||
| 351 | 353 | ||
| 352 | // 调用 | 354 | // 调用 |
| 353 | productSpuService.updateSpuStock(stockIncrCounts); | 355 | productSpuService.updateSpuStock(stockIncrCounts); |
| 354 | - // 断言 | ||
| 355 | - assertEquals(productSpuService.getSpu(1L).getTotalStock(), 30); | ||
| 356 | - assertEquals(productSpuService.getSpu(2L).getTotalStock(), 10); | 356 | + // 断言 // TODO ProductSpuDO中已没有相关属性 |
| 357 | + //assertEquals(productSpuService.getSpu(1L).getTotalStock(), 30); | ||
| 358 | + //assertEquals(productSpuService.getSpu(2L).getTotalStock(), 10); | ||
| 357 | } | 359 | } |
| 358 | 360 | ||
| 359 | } | 361 | } |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/AppTradeOrderController.java
| @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.trade.controller.app.order; | @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.trade.controller.app.order; | ||
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; | 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 4 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 5 | +import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; | ||
| 5 | import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated; | 6 | import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated; |
| 6 | import cn.iocoder.yudao.module.pay.api.notify.dto.PayOrderNotifyReqDTO; | 7 | import cn.iocoder.yudao.module.pay.api.notify.dto.PayOrderNotifyReqDTO; |
| 7 | import cn.iocoder.yudao.module.product.api.property.ProductPropertyValueApi; | 8 | import cn.iocoder.yudao.module.product.api.property.ProductPropertyValueApi; |