## 新复购级差收益累计商品数量;

This commit is contained in:
cabbage 2025-07-10 13:55:37 +08:00
parent 3b1bbdccd8
commit 0f63dcc55c
2 changed files with 7 additions and 1 deletions

View File

@ -2138,6 +2138,9 @@ public class BonusSettleRangeHandle extends BonusSettleHandle {
} else {
bonusIncome = tmpPrice.subtract(targetRangePrice);
}
// 单个级差 * 商品数量 = 实际奖金
bonusIncome = bonusIncome.multiply(new BigDecimal(saOrderItemsExt.getWaresQuantity()));
bonusIncomeMap.put(targetMemberRangeExt.getPkMember(), bonusIncome);
// 临时价格更新
tmpPrice = targetRangePrice;

View File

@ -333,6 +333,7 @@
<result column="PK_ORDER" property="pkOrder"/>
<result column="PK_ID" property="pkId"/>
<result column="PRICE" property="price"/>
<result column="WARES_QUANTITY" property="waresQuantity"/>
<result column="PK_WARES" property="pkWares"/>
<result column="PK_PRODUCT" property="pkProduct"/>
<result column="PK_WARES_DETAIL" property="pkWaresDetail"/>
@ -348,6 +349,7 @@
select soi.pk_order,
soi.pk_id,
soi.price,
soi.wares_quantity,
bwr.pk_wares,
bwr.pk_product,
bwr.pk_wares_detail,
@ -360,7 +362,8 @@
soi.pk_product,
soi.pk_wares_detail,
soi.pk_wares_specs_sku,
soi.price
soi.price,
max(soi.wares_quantity) wares_quantity
from sa_order so
left join sa_order_items soi
on soi.pk_order = so.pk_id