From 62865d9a6dde1cdc961c63e1e4e63c419e7c11f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A3=B7=E5=8F=B6?=
<14103883+leaf-phos@user.noreply.gitee.com>
Date: Thu, 6 Feb 2025 11:44:20 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E8=B4=A6=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ruoyi/dashboard/service/DashboardService.java | 4 ++++
.../domain/ReconciliationDate.java | 6 ++++++
.../mapper/ReconciliationDateMapper.xml | 14 ++++++++++++--
3 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/smart-switch-service/src/main/java/com/ruoyi/dashboard/service/DashboardService.java b/smart-switch-service/src/main/java/com/ruoyi/dashboard/service/DashboardService.java
index 56026b39..b2a2415e 100644
--- a/smart-switch-service/src/main/java/com/ruoyi/dashboard/service/DashboardService.java
+++ b/smart-switch-service/src/main/java/com/ruoyi/dashboard/service/DashboardService.java
@@ -541,6 +541,10 @@ public class DashboardService {
result.setOrderReceiveAmount(MathUtils.subtractDecimal(result.getOrderTotalAmount(), result.getRefundAmount()));
// 订单实收和实际分成差额
result.setDifference(MathUtils.subtractDecimal(result.getOrderReceiveAmount(), result.getActualBonus()));
+ // 用户实收金额
+ result.setUserActualBonus(MathUtils.subtractDecimal(result.getUserBonus(), result.getUserBonusRefund()));
+ // 平台实收金额
+ result.setPlatformActualBonus(MathUtils.subtractDecimal(result.getPlatformBonus(), result.getPlatformBonusRefund()));
// 平台收益 = 平台分成 + 应收账 + 提现服务费 - 平台分成退款 - 渠道成本
BigDecimal add = MathUtils.addDecimal(result.getPlatformBonus(), result.getReceiveAmount(),
result.getWithdrawServiceFee());
diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/reconciliationDate/domain/ReconciliationDate.java b/smart-switch-service/src/main/java/com/ruoyi/ss/reconciliationDate/domain/ReconciliationDate.java
index 8935f535..fe223222 100644
--- a/smart-switch-service/src/main/java/com/ruoyi/ss/reconciliationDate/domain/ReconciliationDate.java
+++ b/smart-switch-service/src/main/java/com/ruoyi/ss/reconciliationDate/domain/ReconciliationDate.java
@@ -113,4 +113,10 @@ public class ReconciliationDate extends BaseEntity
@ApiModelProperty("渠道名称")
private String channelName;
+ @ApiModelProperty("用户实收金额")
+ private BigDecimal userActualBonus;
+
+ @ApiModelProperty("平台实收金额")
+ private BigDecimal platformActualBonus;
+
}
diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/reconciliationDate/mapper/ReconciliationDateMapper.xml b/smart-switch-service/src/main/java/com/ruoyi/ss/reconciliationDate/mapper/ReconciliationDateMapper.xml
index 586f6408..69ee631c 100644
--- a/smart-switch-service/src/main/java/com/ruoyi/ss/reconciliationDate/mapper/ReconciliationDateMapper.xml
+++ b/smart-switch-service/src/main/java/com/ruoyi/ss/reconciliationDate/mapper/ReconciliationDateMapper.xml
@@ -30,7 +30,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
srd.actual_bonus,
srd.platform_income,
srd.withdraw_service_fee,
- srd.channel_cost
+ srd.channel_cost,
+ srd.user_actual_bonus,
+ srd.platform_actual_bonus
from ss_reconciliation_date srd
@@ -58,7 +60,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sum(srd.actual_bonus) as actual_bonus,
sum(srd.platform_income) as platform_income,
sum(srd.withdraw_service_fee) as withdraw_service_fee,
- sum(srd.channel_cost) as channel_cost
+ sum(srd.channel_cost) as channel_cost,
+ sum(srd.user_actual_bonus) as user_actual_bonus,
+ sum(srd.platform_actual_bonus) as platform_actual_bonus
from ss_reconciliation_date srd
@@ -111,6 +115,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
channel_id,
channel_name,
channel_type,
+ user_actual_bonus,
+ platform_actual_bonus,
#{date},
@@ -135,6 +141,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{channelId},
#{channelName},
#{channelType},
+ #{userActualBonus},
+ #{platformActualBonus},
@@ -169,6 +177,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
channel_id = #{data.channelId},
channel_name = #{data.channelName},
channel_type = #{data.channelType},
+ user_actual_bonus = #{data.userActualBonus},
+ platform_actual_bonus = #{data.platformActualBonus},