mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 15:21:53 +08:00
spu:分佣属性和分佣保持一致
This commit is contained in:
parent
95d8be0455
commit
50354462fe
@ -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;
|
||||
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -81,11 +81,11 @@ public class ProductSkuDO extends BaseDO {
|
||||
/**
|
||||
* 一级分销的佣金,单位:分
|
||||
*/
|
||||
private Integer subCommissionFirstPrice;
|
||||
private Integer firstBrokerageRecord;
|
||||
/**
|
||||
* 二级分销的佣金,单位:分
|
||||
*/
|
||||
private Integer subCommissionSecondPrice;
|
||||
private Integer secondBrokerageRecord;
|
||||
|
||||
// ========== 营销相关字段 =========
|
||||
|
||||
|
@ -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));
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user