Commit e8bdd8349c45893128171ab907b6c4c77b235f43
1 parent
bdd81e4c
code review:订单部分逻辑
Showing
14 changed files
with
33 additions
and
40 deletions
yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/sku/dto/ProductSkuRespDTO.java
| @@ -59,6 +59,7 @@ public class ProductSkuRespDTO { | @@ -59,6 +59,7 @@ public class ProductSkuRespDTO { | ||
| 59 | * 商品体积,单位:m^3 平米 | 59 | * 商品体积,单位:m^3 平米 |
| 60 | */ | 60 | */ |
| 61 | private Double volume; | 61 | private Double volume; |
| 62 | + // TODO @puhui999:firstBrokeragePrice ;尴尬,我当时打错了;secondBrokeragePrice | ||
| 62 | /** | 63 | /** |
| 63 | * 一级分销的佣金,单位:分 | 64 | * 一级分销的佣金,单位:分 |
| 64 | */ | 65 | */ |
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/api/combination/CombinationApi.java
| @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.promotion.api.combination; | @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.promotion.api.combination; | ||
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.module.promotion.api.combination.dto.CombinationActivityUpdateStockReqDTO; | 3 | import cn.iocoder.yudao.module.promotion.api.combination.dto.CombinationActivityUpdateStockReqDTO; |
| 4 | 4 | ||
| 5 | +// TODO @puhui999:是不是改成 CombinationActivityApi | ||
| 5 | /** | 6 | /** |
| 6 | * 拼团活动 Api 接口 | 7 | * 拼团活动 Api 接口 |
| 7 | * | 8 | * |
| @@ -14,6 +15,7 @@ public interface CombinationApi { | @@ -14,6 +15,7 @@ public interface CombinationApi { | ||
| 14 | * | 15 | * |
| 15 | * @param reqDTO 请求 | 16 | * @param reqDTO 请求 |
| 16 | */ | 17 | */ |
| 18 | + // TODO @puhui999:应该是更新哇?还是校验哈; | ||
| 17 | void validateCombination(CombinationActivityUpdateStockReqDTO reqDTO); | 19 | void validateCombination(CombinationActivityUpdateStockReqDTO reqDTO); |
| 18 | 20 | ||
| 19 | } | 21 | } |
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/api/combination/dto/CombinationActivityUpdateStockReqDTO.java
| @@ -13,6 +13,8 @@ import javax.validation.constraints.NotNull; | @@ -13,6 +13,8 @@ import javax.validation.constraints.NotNull; | ||
| 13 | @Data | 13 | @Data |
| 14 | public class CombinationActivityUpdateStockReqDTO { | 14 | public class CombinationActivityUpdateStockReqDTO { |
| 15 | 15 | ||
| 16 | + // TODO @puhui999:是不是一个 activityId、count、skuId 参数就完事啦。 | ||
| 17 | + | ||
| 16 | @NotNull(message = "活动编号不能为空") | 18 | @NotNull(message = "活动编号不能为空") |
| 17 | private Long activityId; | 19 | private Long activityId; |
| 18 | 20 |
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/api/combination/dto/CombinationRecordCreateReqDTO.java
| @@ -13,6 +13,8 @@ import javax.validation.constraints.NotNull; | @@ -13,6 +13,8 @@ import javax.validation.constraints.NotNull; | ||
| 13 | @Data | 13 | @Data |
| 14 | public class CombinationRecordCreateReqDTO { | 14 | public class CombinationRecordCreateReqDTO { |
| 15 | 15 | ||
| 16 | + // TODO @puhui999:注释还是要的哈 | ||
| 17 | + | ||
| 16 | @NotNull(message = "拼团活动编号不能为空") | 18 | @NotNull(message = "拼团活动编号不能为空") |
| 17 | private Long activityId; | 19 | private Long activityId; |
| 18 | 20 |
yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/api/seckill/dto/SeckillActivityUpdateStockReqDTO.java
| @@ -13,6 +13,8 @@ import javax.validation.constraints.NotNull; | @@ -13,6 +13,8 @@ import javax.validation.constraints.NotNull; | ||
| 13 | @Data | 13 | @Data |
| 14 | public class SeckillActivityUpdateStockReqDTO { | 14 | public class SeckillActivityUpdateStockReqDTO { |
| 15 | 15 | ||
| 16 | + // TODO @puhui999:可以不用 dto,直接 activityId、skuId、count 即可 | ||
| 17 | + | ||
| 16 | @NotNull(message = "活动编号不能为空") | 18 | @NotNull(message = "活动编号不能为空") |
| 17 | private Long activityId; | 19 | private Long activityId; |
| 18 | 20 |
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/bargain/BargainActivityMapper.java
| @@ -39,7 +39,7 @@ public interface BargainActivityMapper extends BaseMapperX<BargainActivityDO> { | @@ -39,7 +39,7 @@ public interface BargainActivityMapper extends BaseMapperX<BargainActivityDO> { | ||
| 39 | default int updateActivityStock(Long id, int count) { | 39 | default int updateActivityStock(Long id, int count) { |
| 40 | return update(null, new LambdaUpdateWrapper<BargainActivityDO>() | 40 | return update(null, new LambdaUpdateWrapper<BargainActivityDO>() |
| 41 | .eq(BargainActivityDO::getId, id) | 41 | .eq(BargainActivityDO::getId, id) |
| 42 | - .gt(BargainActivityDO::getStock, 0) | 42 | + .gt(BargainActivityDO::getStock, 0) // TODO @puhui999:不是 > 0,是要大于 count 哈 |
| 43 | .setSql("stock = stock - " + count)); | 43 | .setSql("stock = stock - " + count)); |
| 44 | } | 44 | } |
| 45 | 45 |
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/seckill/seckillactivity/SeckillProductMapper.java
| @@ -34,7 +34,7 @@ public interface SeckillProductMapper extends BaseMapperX<SeckillProductDO> { | @@ -34,7 +34,7 @@ public interface SeckillProductMapper extends BaseMapperX<SeckillProductDO> { | ||
| 34 | default int updateActivityStock(Long id, int count) { | 34 | default int updateActivityStock(Long id, int count) { |
| 35 | return update(null, new LambdaUpdateWrapper<SeckillProductDO>() | 35 | return update(null, new LambdaUpdateWrapper<SeckillProductDO>() |
| 36 | .eq(SeckillProductDO::getId, id) | 36 | .eq(SeckillProductDO::getId, id) |
| 37 | - .gt(SeckillProductDO::getStock, 0) | 37 | + .gt(SeckillProductDO::getStock, 0) // TODO @puhui999:不是 > 0,是要大于 count 哈 |
| 38 | .setSql("stock = stock - " + count)); | 38 | .setSql("stock = stock - " + count)); |
| 39 | } | 39 | } |
| 40 | 40 |
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/bargain/BargainActivityServiceImpl.java
| @@ -82,8 +82,8 @@ public class BargainActivityServiceImpl implements BargainActivityService { | @@ -82,8 +82,8 @@ public class BargainActivityServiceImpl implements BargainActivityService { | ||
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | // 更新砍价库存 | 84 | // 更新砍价库存 |
| 85 | - int row = bargainActivityMapper.updateActivityStock(id, count); | ||
| 86 | - if (row == 0) { | 85 | + int updateCount = bargainActivityMapper.updateActivityStock(id, count); |
| 86 | + if (updateCount == 0) { | ||
| 87 | throw exception(BARGAIN_ACTIVITY_UPDATE_STOCK_FAIL); | 87 | throw exception(BARGAIN_ACTIVITY_UPDATE_STOCK_FAIL); |
| 88 | } | 88 | } |
| 89 | } | 89 | } |
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/combination/CombinationActivityServiceImpl.java
| @@ -215,23 +215,29 @@ public class CombinationActivityServiceImpl implements CombinationActivityServic | @@ -215,23 +215,29 @@ public class CombinationActivityServiceImpl implements CombinationActivityServic | ||
| 215 | 215 | ||
| 216 | @Override | 216 | @Override |
| 217 | public void validateCombination(CombinationActivityUpdateStockReqDTO reqDTO) { | 217 | public void validateCombination(CombinationActivityUpdateStockReqDTO reqDTO) { |
| 218 | - // 1、校验拼团活动是否存在 | 218 | + // 1.1 校验拼团活动是否存在 |
| 219 | CombinationActivityDO activity = validateCombinationActivityExists(reqDTO.getActivityId()); | 219 | CombinationActivityDO activity = validateCombinationActivityExists(reqDTO.getActivityId()); |
| 220 | - // 1.1、校验活动是否开启 | 220 | + // 1.2 校验活动是否开启 |
| 221 | if (ObjectUtil.equal(activity.getStatus(), CommonStatusEnum.DISABLE.getStatus())) { | 221 | if (ObjectUtil.equal(activity.getStatus(), CommonStatusEnum.DISABLE.getStatus())) { |
| 222 | throw exception(COMBINATION_ACTIVITY_STATUS_DISABLE); | 222 | throw exception(COMBINATION_ACTIVITY_STATUS_DISABLE); |
| 223 | } | 223 | } |
| 224 | - // 1.2、校验是否超出单次限购数量 | 224 | + // 1.3 校验是否超出单次限购数量 |
| 225 | if (activity.getSingleLimitCount() < reqDTO.getCount()) { | 225 | if (activity.getSingleLimitCount() < reqDTO.getCount()) { |
| 226 | throw exception(COMBINATION_RECORD_FAILED_SINGLE_LIMIT_COUNT_EXCEED); | 226 | throw exception(COMBINATION_RECORD_FAILED_SINGLE_LIMIT_COUNT_EXCEED); |
| 227 | } | 227 | } |
| 228 | - // 1.3、校验是否超出总限购数量 | ||
| 229 | - List<CombinationRecordDO> recordList = combinationRecordService.getRecordListByUserIdAndActivityId(getLoginUserId(), reqDTO.getActivityId()); | 228 | + |
| 229 | + // 2. 校验是否超出总限购数量 | ||
| 230 | + // TODO @puhui999:userId 应该接口传递哈;要保证 service 无状态 | ||
| 231 | + List<CombinationRecordDO> recordList = combinationRecordService.getRecordListByUserIdAndActivityId( | ||
| 232 | + getLoginUserId(), reqDTO.getActivityId()); | ||
| 233 | + // TODO @puhui999:最好 if true return;减少括号层数 | ||
| 230 | if (CollUtil.isNotEmpty(recordList)) { | 234 | if (CollUtil.isNotEmpty(recordList)) { |
| 231 | // 过滤出拼团成功的 | 235 | // 过滤出拼团成功的 |
| 236 | + // TODO @puhui999:count 要不存一个在 record 里? | ||
| 232 | List<Long> skuIds = convertList(recordList, CombinationRecordDO::getSkuId, | 237 | List<Long> skuIds = convertList(recordList, CombinationRecordDO::getSkuId, |
| 233 | item -> ObjectUtil.equals(item.getStatus(), CombinationRecordStatusEnum.SUCCESS.getStatus())); | 238 | item -> ObjectUtil.equals(item.getStatus(), CombinationRecordStatusEnum.SUCCESS.getStatus())); |
| 234 | - Integer countSum = tradeOrderApi.getOrderItemCountSumByOrderIdAndSkuId(convertList(recordList, CombinationRecordDO::getOrderId, | 239 | + Integer countSum = tradeOrderApi.getOrderItemCountSumByOrderIdAndSkuId(convertList(recordList, |
| 240 | + CombinationRecordDO::getOrderId, | ||
| 235 | item -> ObjectUtil.equals(item.getStatus(), CombinationRecordStatusEnum.SUCCESS.getStatus())), skuIds); | 241 | item -> ObjectUtil.equals(item.getStatus(), CombinationRecordStatusEnum.SUCCESS.getStatus())), skuIds); |
| 236 | if (activity.getTotalLimitCount() < countSum) { | 242 | if (activity.getTotalLimitCount() < countSum) { |
| 237 | throw exception(COMBINATION_RECORD_FAILED_TOTAL_LIMIT_COUNT_EXCEED); | 243 | throw exception(COMBINATION_RECORD_FAILED_TOTAL_LIMIT_COUNT_EXCEED); |
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/combination/CombinationRecordServiceImpl.java
| @@ -128,6 +128,7 @@ public class CombinationRecordServiceImpl implements CombinationRecordService { | @@ -128,6 +128,7 @@ public class CombinationRecordServiceImpl implements CombinationRecordService { | ||
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | // 2. 创建拼团记录 | 130 | // 2. 创建拼团记录 |
| 131 | + // TODO @puhui999:可以把 user、spu、sku 一起放 convert 里哈; | ||
| 131 | CombinationRecordDO record = CombinationActivityConvert.INSTANCE.convert(reqDTO); | 132 | CombinationRecordDO record = CombinationActivityConvert.INSTANCE.convert(reqDTO); |
| 132 | record.setVirtualGroup(false); | 133 | record.setVirtualGroup(false); |
| 133 | record.setExpireTime(record.getStartTime().plusHours(activity.getLimitDuration())); | 134 | record.setExpireTime(record.getStartTime().plusHours(activity.getLimitDuration())); |
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/seckill/SeckillActivityService.java
| @@ -35,24 +35,11 @@ public interface SeckillActivityService { | @@ -35,24 +35,11 @@ public interface SeckillActivityService { | ||
| 35 | void updateSeckillActivity(@Valid SeckillActivityUpdateReqVO updateReqVO); | 35 | void updateSeckillActivity(@Valid SeckillActivityUpdateReqVO updateReqVO); |
| 36 | 36 | ||
| 37 | /** | 37 | /** |
| 38 | - * 更新秒杀活动 | ||
| 39 | - * | ||
| 40 | - * @param activityDO 秒杀活动 | ||
| 41 | - */ | ||
| 42 | - void updateSeckillActivity(SeckillActivityDO activityDO); | ||
| 43 | - | ||
| 44 | - /** | ||
| 45 | * 更新秒杀库存 | 38 | * 更新秒杀库存 |
| 46 | * | 39 | * |
| 47 | * @param updateStockReqDTO 更新信息 | 40 | * @param updateStockReqDTO 更新信息 |
| 48 | */ | 41 | */ |
| 49 | void updateSeckillStock(SeckillActivityUpdateStockReqDTO updateStockReqDTO); | 42 | void updateSeckillStock(SeckillActivityUpdateStockReqDTO updateStockReqDTO); |
| 50 | - /** | ||
| 51 | - * 更新秒杀活动商品 | ||
| 52 | - * | ||
| 53 | - * @param productList 活动商品列表 | ||
| 54 | - */ | ||
| 55 | - void updateSeckillActivityProductList(List<SeckillProductDO> productList); | ||
| 56 | 43 | ||
| 57 | /** | 44 | /** |
| 58 | * 关闭秒杀活动 | 45 | * 关闭秒杀活动 |
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/seckill/SeckillActivityServiceImpl.java
| @@ -146,11 +146,6 @@ public class SeckillActivityServiceImpl implements SeckillActivityService { | @@ -146,11 +146,6 @@ public class SeckillActivityServiceImpl implements SeckillActivityService { | ||
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | @Override | 148 | @Override |
| 149 | - public void updateSeckillActivity(SeckillActivityDO activityDO) { | ||
| 150 | - seckillActivityMapper.updateById(activityDO); | ||
| 151 | - } | ||
| 152 | - | ||
| 153 | - @Override | ||
| 154 | @Transactional(rollbackFor = Exception.class) | 149 | @Transactional(rollbackFor = Exception.class) |
| 155 | public void updateSeckillStock(SeckillActivityUpdateStockReqDTO updateStockReqDTO) { | 150 | public void updateSeckillStock(SeckillActivityUpdateStockReqDTO updateStockReqDTO) { |
| 156 | // 1、校验秒杀活动是否存在 | 151 | // 1、校验秒杀活动是否存在 |
| @@ -171,23 +166,18 @@ public class SeckillActivityServiceImpl implements SeckillActivityService { | @@ -171,23 +166,18 @@ public class SeckillActivityServiceImpl implements SeckillActivityService { | ||
| 171 | } | 166 | } |
| 172 | 167 | ||
| 173 | // 3、更新活动商品库存 | 168 | // 3、更新活动商品库存 |
| 174 | - int itemRow = seckillProductMapper.updateActivityStock(product.getId(), updateStockReqDTO.getItem().getCount()); | ||
| 175 | - if (itemRow == 0) { | 169 | + int updateCount = seckillProductMapper.updateActivityStock(product.getId(), updateStockReqDTO.getItem().getCount()); |
| 170 | + if (updateCount == 0) { | ||
| 176 | throw exception(SECKILL_ACTIVITY_UPDATE_STOCK_FAIL); | 171 | throw exception(SECKILL_ACTIVITY_UPDATE_STOCK_FAIL); |
| 177 | } | 172 | } |
| 178 | 173 | ||
| 179 | // 4、更新活动库存 | 174 | // 4、更新活动库存 |
| 180 | - int row = seckillActivityMapper.updateActivityStock(seckillActivity.getId(), updateStockReqDTO.getCount()); | ||
| 181 | - if (row == 0) { | 175 | + updateCount = seckillActivityMapper.updateActivityStock(seckillActivity.getId(), updateStockReqDTO.getCount()); |
| 176 | + if (updateCount == 0) { | ||
| 182 | throw exception(SECKILL_ACTIVITY_UPDATE_STOCK_FAIL); | 177 | throw exception(SECKILL_ACTIVITY_UPDATE_STOCK_FAIL); |
| 183 | } | 178 | } |
| 184 | } | 179 | } |
| 185 | 180 | ||
| 186 | - @Override | ||
| 187 | - public void updateSeckillActivityProductList(List<SeckillProductDO> productList) { | ||
| 188 | - seckillProductMapper.updateBatch(productList); | ||
| 189 | - } | ||
| 190 | - | ||
| 191 | /** | 181 | /** |
| 192 | * 更新秒杀商品 | 182 | * 更新秒杀商品 |
| 193 | * | 183 | * |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/convert/order/TradeOrderConvert.java
| @@ -34,7 +34,6 @@ import cn.iocoder.yudao.module.trade.enums.order.TradeOrderItemAfterSaleStatusEn | @@ -34,7 +34,6 @@ import cn.iocoder.yudao.module.trade.enums.order.TradeOrderItemAfterSaleStatusEn | ||
| 34 | import cn.iocoder.yudao.module.trade.framework.delivery.core.client.dto.ExpressTrackRespDTO; | 34 | import cn.iocoder.yudao.module.trade.framework.delivery.core.client.dto.ExpressTrackRespDTO; |
| 35 | import cn.iocoder.yudao.module.trade.framework.order.config.TradeOrderProperties; | 35 | import cn.iocoder.yudao.module.trade.framework.order.config.TradeOrderProperties; |
| 36 | import cn.iocoder.yudao.module.trade.service.brokerage.bo.BrokerageAddReqBO; | 36 | import cn.iocoder.yudao.module.trade.service.brokerage.bo.BrokerageAddReqBO; |
| 37 | -import cn.iocoder.yudao.module.trade.service.brokerage.bo.BrokerageAddReqBO; | ||
| 38 | import cn.iocoder.yudao.module.trade.service.order.bo.TradeAfterOrderCreateReqBO; | 37 | import cn.iocoder.yudao.module.trade.service.order.bo.TradeAfterOrderCreateReqBO; |
| 39 | import cn.iocoder.yudao.module.trade.service.order.bo.TradeBeforeOrderCreateReqBO; | 38 | import cn.iocoder.yudao.module.trade.service.order.bo.TradeBeforeOrderCreateReqBO; |
| 40 | import cn.iocoder.yudao.module.trade.service.price.bo.TradePriceCalculateReqBO; | 39 | import cn.iocoder.yudao.module.trade.service.price.bo.TradePriceCalculateReqBO; |
| @@ -281,7 +280,7 @@ public interface TradeOrderConvert { | @@ -281,7 +280,7 @@ public interface TradeOrderConvert { | ||
| 281 | return new BrokerageAddReqBO().setBizId(String.valueOf(item.getId())).setSourceUserId(item.getUserId()) | 280 | return new BrokerageAddReqBO().setBizId(String.valueOf(item.getId())).setSourceUserId(item.getUserId()) |
| 282 | .setBasePrice(item.getPayPrice() * item.getCount()) | 281 | .setBasePrice(item.getPayPrice() * item.getCount()) |
| 283 | .setTitle(BrokerageRecordBizTypeEnum.ORDER.getTitle()) // TODO @疯狂:标题类似:木晴冰雪成功购买云时代的JVM原理与实战;茫农成功购买深入拆解消息队列47讲 | 282 | .setTitle(BrokerageRecordBizTypeEnum.ORDER.getTitle()) // TODO @疯狂:标题类似:木晴冰雪成功购买云时代的JVM原理与实战;茫农成功购买深入拆解消息队列47讲 |
| 284 | - .setFirstFixedPrice(sku.getFirstBrokerageRecord()).getSecondBrokerageRecord(sku.getSecondBrokerageRecord()); | 283 | + .setFirstFixedPrice(sku.getFirstBrokerageRecord()).setSecondFixedPrice(sku.getSecondBrokerageRecord()); |
| 285 | } | 284 | } |
| 286 | 285 | ||
| 287 | @Mapping(target = "activityId", source = "reqBO.seckillActivityId") | 286 | @Mapping(target = "activityId", source = "reqBO.seckillActivityId") |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceImpl.java
| @@ -542,11 +542,12 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService { | @@ -542,11 +542,12 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService { | ||
| 542 | int orderPayPrice = order.getAdjustPrice() != null ? (order.getPayPrice() - order.getAdjustPrice()) | 542 | int orderPayPrice = order.getAdjustPrice() != null ? (order.getPayPrice() - order.getAdjustPrice()) |
| 543 | + reqVO.getAdjustPrice() : order.getPayPrice() + reqVO.getAdjustPrice(); | 543 | + reqVO.getAdjustPrice() : order.getPayPrice() + reqVO.getAdjustPrice(); |
| 544 | update.setPayPrice(orderPayPrice); | 544 | update.setPayPrice(orderPayPrice); |
| 545 | - // TODO @芋艿:改价时,赠送的积分,要不要做改动??? | ||
| 546 | tradeOrderMapper.updateById(update); | 545 | tradeOrderMapper.updateById(update); |
| 546 | + // TODO @芋艿:改价时,赠送的积分,要不要做改动??? | ||
| 547 | 547 | ||
| 548 | // TODO @puhui999:应该是按照 payPrice 分配;并且要考虑取余问题;payPrice 也要考虑,item 里的 | 548 | // TODO @puhui999:应该是按照 payPrice 分配;并且要考虑取余问题;payPrice 也要考虑,item 里的 |
| 549 | // TODO:先按 adjustPrice 实现,没明白 payPrice 怎么搞哈哈哈 | 549 | // TODO:先按 adjustPrice 实现,没明白 payPrice 怎么搞哈哈哈 |
| 550 | + // TODO @puhui999:就是对比新老 adjustPrice 的差值,然后计算补充的 adjustPrice 最终值;另外,可以不用区分 items.size 是不是 > 1 哈;应该是一致的逻辑;分摊的逻辑,有点类似 dividePrice 方法噢; | ||
| 550 | // 5、更新 TradeOrderItem | 551 | // 5、更新 TradeOrderItem |
| 551 | if (items.size() > 1) { | 552 | if (items.size() > 1) { |
| 552 | // TradeOrderItemDO 需要做 adjustPrice 的分摊 | 553 | // TradeOrderItemDO 需要做 adjustPrice 的分摊 |