【同步】BOOT 和 CLOUD 的功能
This commit is contained in:
@@ -13,6 +13,7 @@ public class BrokerageUserCreateReqVO {
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "推广员编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "4587")
|
||||
@NotNull(message = "推广员编号不能为空")
|
||||
private Long bindUserId;
|
||||
|
||||
}
|
||||
|
||||
@@ -265,8 +265,7 @@ public interface TradeOrderConvert {
|
||||
ProductSpuRespDTO spu, ProductSkuRespDTO sku) {
|
||||
BrokerageAddReqBO bo = new BrokerageAddReqBO().setBizId(String.valueOf(item.getId())).setSourceUserId(item.getUserId())
|
||||
.setBasePrice(item.getPayPrice())
|
||||
.setTitle(StrUtil.format("{}成功购买{}", user.getNickname(), item.getSpuName()))
|
||||
.setFirstFixedPrice(0).setSecondFixedPrice(0);
|
||||
.setTitle(StrUtil.format("{}成功购买{}", user.getNickname(), item.getSpuName()));
|
||||
if (BooleanUtil.isTrue(spu.getSubCommissionType())) {
|
||||
// 特殊:单独设置的佣金需要乘以购买数量。关联 https://gitee.com/yudaocode/yudao-mall-uniapp/issues/ICY7SJ
|
||||
bo.setFirstFixedPrice(sku.getFirstBrokeragePrice() * item.getCount())
|
||||
|
||||
@@ -142,4 +142,4 @@ public class TradeOrderLogAspect {
|
||||
EXTS.remove();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -142,7 +142,7 @@ public class BrokerageRecordServiceImpl implements BrokerageRecordService {
|
||||
*/
|
||||
int calculatePrice(Integer basePrice, Integer percent, Integer fixedPrice) {
|
||||
// 1. 优先使用固定佣金
|
||||
if (fixedPrice != null && fixedPrice > 0) {
|
||||
if (fixedPrice != null && fixedPrice >= 0) {
|
||||
return ObjectUtil.defaultIfNull(fixedPrice, 0);
|
||||
}
|
||||
// 2. 根据比例计算佣金
|
||||
|
||||
Reference in New Issue
Block a user