spu:分佣属性和分佣保持一致

This commit is contained in:
puhui999 2023-09-09 23:18:09 +08:00
parent 95d8be0455
commit 50354462fe
5 changed files with 13 additions and 15 deletions

View File

@ -59,15 +59,13 @@ public class ProductSkuRespDTO {
* 商品体积单位m^3 平米
*/
private Double volume;
// TODO @puhui 2 字段需要改下firstBrokerageRecordsecondBrokerageRecord和分佣保持一致
/**
* 一级分销的佣金单位
*/
private Integer subCommissionFirstPrice;
private Integer firstBrokerageRecord;
/**
* 二级分销的佣金单位
*/
private Integer subCommissionSecondPrice;
private Integer secondBrokerageRecord;
}

View File

@ -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<Property> properties;

View File

@ -81,11 +81,11 @@ public class ProductSkuDO extends BaseDO {
/**
* 一级分销的佣金单位
*/
private Integer subCommissionFirstPrice;
private Integer firstBrokerageRecord;
/**
* 二级分销的佣金单位
*/
private Integer subCommissionSecondPrice;
private Integer secondBrokerageRecord;
// ========== 营销相关字段 =========

View File

@ -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));

View File

@ -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());
}
}