|
|
@@ -32,6 +32,10 @@ public class MemberSubscriptionService {
|
|
|
@Resource
|
|
|
private CfCommissionService cfCommissionService;
|
|
|
|
|
|
+ /** team.profit.hook(§12-T3):支付成功钩子,与 CF 值分佣同点位并行结算利润池 */
|
|
|
+ @Resource
|
|
|
+ private ProfitPoolService profitPoolService;
|
|
|
+
|
|
|
@Resource
|
|
|
private ButlerService butlerService;
|
|
|
|
|
|
@@ -165,6 +169,13 @@ public class MemberSubscriptionService {
|
|
|
if (family != null && family.getCreatorId() != null) {
|
|
|
cfCommissionService.settleReferrerOnly(order.getId(), "subscription", family.getCreatorId(),
|
|
|
family.getId(), amount);
|
|
|
+ // team.profit.hook(§12-T3):同点位并行结算利润池,D>0 才分润、uk_order 幂等;不阻断主链路
|
|
|
+ try {
|
|
|
+ profitPoolService.settle(order.getId(), "subscription", null,
|
|
|
+ amount != null ? amount : 0, 0);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("利润池结算失败(hook): orderId={}, error={}", order.getId(), e.getMessage());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return subscription;
|
|
|
@@ -237,6 +248,13 @@ public class MemberSubscriptionService {
|
|
|
if (family != null && family.getCreatorId() != null) {
|
|
|
cfCommissionService.settleReferrerOnly(order.getId(), "subscription", family.getCreatorId(),
|
|
|
family.getId(), amount);
|
|
|
+ // team.profit.hook(§12-T3):同点位并行结算利润池,D>0 才分润、uk_order 幂等;不阻断主链路
|
|
|
+ try {
|
|
|
+ profitPoolService.settle(order.getId(), "subscription", null,
|
|
|
+ amount != null ? amount : 0, 0);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("利润池结算失败(hook): orderId={}, error={}", order.getId(), e.getMessage());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return current;
|