From 50354462fef35505080cfc4194ac2d06036e9bd2 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sat, 9 Sep 2023 23:18:09 +0800 Subject: [PATCH] =?UTF-8?q?spu=EF=BC=9A=E5=88=86=E4=BD=A3=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E5=92=8C=E5=88=86=E4=BD=A3=E4=BF=9D=E6=8C=81=E4=B8=80?= =?UTF-8?q?=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/product/api/sku/dto/ProductSkuRespDTO.java | 6 ++---- .../product/controller/admin/sku/vo/ProductSkuBaseVO.java | 4 ++-- .../module/product/dal/dataobject/sku/ProductSkuDO.java | 4 ++-- .../product/service/spu/ProductSpuServiceImplTest.java | 8 ++++---- .../module/trade/convert/order/TradeOrderConvert.java | 6 +++--- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/sku/dto/ProductSkuRespDTO.java b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/sku/dto/ProductSkuRespDTO.java index c412faf4e..b69bbd5ec 100644 --- a/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/sku/dto/ProductSkuRespDTO.java +++ b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/sku/dto/ProductSkuRespDTO.java @@ -59,15 +59,13 @@ public class ProductSkuRespDTO { * 商品体积,单位:m^3 平米 */ private Double volume; - - // TODO @puhui:这 2 字段,需要改下;firstBrokerageRecord、secondBrokerageRecord;和分佣保持一致; /** * 一级分销的佣金,单位:分 */ - private Integer subCommissionFirstPrice; + private Integer firstBrokerageRecord; /** * 二级分销的佣金,单位:分 */ - private Integer subCommissionSecondPrice; + private Integer secondBrokerageRecord; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/vo/ProductSkuBaseVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/vo/ProductSkuBaseVO.java index 13da82214..f3eee6123 100755 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/vo/ProductSkuBaseVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/vo/ProductSkuBaseVO.java @@ -51,10 +51,10 @@ public class ProductSkuBaseVO { private Double volume; @Schema(description = "一级分销的佣金,单位:分", example = "199") - private Integer subCommissionFirstPrice; + private Integer firstBrokerageRecord; @Schema(description = "二级分销的佣金,单位:分", example = "19") - private Integer subCommissionSecondPrice; + private Integer secondBrokerageRecord; @Schema(description = "属性数组") private List properties; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/sku/ProductSkuDO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/sku/ProductSkuDO.java index fa576683b..e164915dd 100755 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/sku/ProductSkuDO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/sku/ProductSkuDO.java @@ -81,11 +81,11 @@ public class ProductSkuDO extends BaseDO { /** * 一级分销的佣金,单位:分 */ - private Integer subCommissionFirstPrice; + private Integer firstBrokerageRecord; /** * 二级分销的佣金,单位:分 */ - private Integer subCommissionSecondPrice; + private Integer secondBrokerageRecord; // ========== 营销相关字段 ========= diff --git a/yudao-module-mall/yudao-module-product-biz/src/test/java/cn/iocoder/yudao/module/product/service/spu/ProductSpuServiceImplTest.java b/yudao-module-mall/yudao-module-product-biz/src/test/java/cn/iocoder/yudao/module/product/service/spu/ProductSpuServiceImplTest.java index e57540292..b505ad161 100755 --- a/yudao-module-mall/yudao-module-product-biz/src/test/java/cn/iocoder/yudao/module/product/service/spu/ProductSpuServiceImplTest.java +++ b/yudao-module-mall/yudao-module-product-biz/src/test/java/cn/iocoder/yudao/module/product/service/spu/ProductSpuServiceImplTest.java @@ -92,8 +92,8 @@ public class ProductSpuServiceImplTest extends BaseDbUnitTest { o.setMarketPrice(generaInt()); o.setStock(generaInt()); o.setWarnStock(10); - o.setSubCommissionFirstPrice(generaInt()); - o.setSubCommissionSecondPrice(generaInt()); + o.setFirstBrokerageRecord(generaInt()); + o.setSecondBrokerageRecord(generaInt()); // 限制分数为两位数 o.setWeight(RandomUtil.randomDouble(10,2, RoundingMode.HALF_UP)); o.setVolume(RandomUtil.randomDouble(10,2, RoundingMode.HALF_UP)); @@ -143,8 +143,8 @@ public class ProductSpuServiceImplTest extends BaseDbUnitTest { o.setMarketPrice(generaInt()); o.setStock(generaInt()); o.setWarnStock(10); - o.setSubCommissionFirstPrice(generaInt()); - o.setSubCommissionSecondPrice(generaInt()); + o.setFirstBrokerageRecord(generaInt()); + o.setSecondBrokerageRecord(generaInt()); // 限制分数为两位数 o.setWeight(RandomUtil.randomDouble(10,2, RoundingMode.HALF_UP)); o.setVolume(RandomUtil.randomDouble(10,2, RoundingMode.HALF_UP)); diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/convert/order/TradeOrderConvert.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/convert/order/TradeOrderConvert.java index e4c996da5..feaa1bab0 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/convert/order/TradeOrderConvert.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/convert/order/TradeOrderConvert.java @@ -7,7 +7,6 @@ import cn.iocoder.yudao.framework.common.util.string.StrUtils; import cn.iocoder.yudao.framework.dict.core.util.DictFrameworkUtils; import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; import cn.iocoder.yudao.module.member.api.address.dto.AddressRespDTO; -import cn.iocoder.yudao.module.trade.service.brokerage.bo.BrokerageAddReqBO; import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO; import cn.iocoder.yudao.module.pay.api.order.dto.PayOrderCreateReqDTO; import cn.iocoder.yudao.module.pay.enums.DictTypeConstants; @@ -31,6 +30,7 @@ import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderItemDO; import cn.iocoder.yudao.module.trade.enums.order.TradeOrderItemAfterSaleStatusEnum; import cn.iocoder.yudao.module.trade.framework.delivery.core.client.dto.ExpressTrackRespDTO; import cn.iocoder.yudao.module.trade.framework.order.config.TradeOrderProperties; +import cn.iocoder.yudao.module.trade.service.brokerage.bo.BrokerageAddReqBO; import cn.iocoder.yudao.module.trade.service.price.bo.TradePriceCalculateReqBO; import cn.iocoder.yudao.module.trade.service.price.bo.TradePriceCalculateRespBO; import org.mapstruct.Mapper; @@ -280,7 +280,7 @@ public interface TradeOrderConvert { default BrokerageAddReqBO convert(TradeOrderItemDO item, ProductSkuRespDTO sku) { return new BrokerageAddReqBO().setBizId(String.valueOf(item.getId())) .setBasePrice(item.getPayPrice() * item.getCount()) - .setFirstFixedPrice(sku.getSubCommissionFirstPrice()) - .setSecondFixedPrice(sku.getSubCommissionSecondPrice()); + .setFirstFixedPrice(sku.getFirstBrokerageRecord()) + .setSecondFixedPrice(sku.getSecondBrokerageRecord()); } }