fix:【system】增加 node 的 parentId 为空下的兼容性,对应 https://t.zsxq.com/ktTUO

This commit is contained in:
YunaiV
2026-01-18 15:16:31 +08:00
parent 5bb29a3fa0
commit 6520514426
3 changed files with 4 additions and 4 deletions

View File

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

View File

@@ -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. 根据比例计算佣金