对账更新
This commit is contained in:
parent
5792838734
commit
62865d9a6d
|
@ -541,6 +541,10 @@ public class DashboardService {
|
||||||
result.setOrderReceiveAmount(MathUtils.subtractDecimal(result.getOrderTotalAmount(), result.getRefundAmount()));
|
result.setOrderReceiveAmount(MathUtils.subtractDecimal(result.getOrderTotalAmount(), result.getRefundAmount()));
|
||||||
// 订单实收和实际分成差额
|
// 订单实收和实际分成差额
|
||||||
result.setDifference(MathUtils.subtractDecimal(result.getOrderReceiveAmount(), result.getActualBonus()));
|
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(),
|
BigDecimal add = MathUtils.addDecimal(result.getPlatformBonus(), result.getReceiveAmount(),
|
||||||
result.getWithdrawServiceFee());
|
result.getWithdrawServiceFee());
|
||||||
|
|
|
@ -113,4 +113,10 @@ public class ReconciliationDate extends BaseEntity
|
||||||
@ApiModelProperty("渠道名称")
|
@ApiModelProperty("渠道名称")
|
||||||
private String channelName;
|
private String channelName;
|
||||||
|
|
||||||
|
@ApiModelProperty("用户实收金额")
|
||||||
|
private BigDecimal userActualBonus;
|
||||||
|
|
||||||
|
@ApiModelProperty("平台实收金额")
|
||||||
|
private BigDecimal platformActualBonus;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
srd.actual_bonus,
|
srd.actual_bonus,
|
||||||
srd.platform_income,
|
srd.platform_income,
|
||||||
srd.withdraw_service_fee,
|
srd.withdraw_service_fee,
|
||||||
srd.channel_cost
|
srd.channel_cost,
|
||||||
|
srd.user_actual_bonus,
|
||||||
|
srd.platform_actual_bonus
|
||||||
from ss_reconciliation_date srd
|
from ss_reconciliation_date srd
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
@ -58,7 +60,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
sum(srd.actual_bonus) as actual_bonus,
|
sum(srd.actual_bonus) as actual_bonus,
|
||||||
sum(srd.platform_income) as platform_income,
|
sum(srd.platform_income) as platform_income,
|
||||||
sum(srd.withdraw_service_fee) as withdraw_service_fee,
|
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
|
from ss_reconciliation_date srd
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
@ -111,6 +115,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="channelId != null">channel_id,</if>
|
<if test="channelId != null">channel_id,</if>
|
||||||
<if test="channelName != null">channel_name,</if>
|
<if test="channelName != null">channel_name,</if>
|
||||||
<if test="channelType != null">channel_type,</if>
|
<if test="channelType != null">channel_type,</if>
|
||||||
|
<if test="userActualBonus != null">user_actual_bonus,</if>
|
||||||
|
<if test="platformActualBonus != null">platform_actual_bonus,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="date != null">#{date},</if>
|
<if test="date != null">#{date},</if>
|
||||||
|
@ -135,6 +141,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="channelId != null">#{channelId},</if>
|
<if test="channelId != null">#{channelId},</if>
|
||||||
<if test="channelName != null">#{channelName},</if>
|
<if test="channelName != null">#{channelName},</if>
|
||||||
<if test="channelType != null">#{channelType},</if>
|
<if test="channelType != null">#{channelType},</if>
|
||||||
|
<if test="userActualBonus != null">#{userActualBonus},</if>
|
||||||
|
<if test="platformActualBonus != null">#{platformActualBonus},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
@ -169,6 +177,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="data.channelId != null">channel_id = #{data.channelId},</if>
|
<if test="data.channelId != null">channel_id = #{data.channelId},</if>
|
||||||
<if test="data.channelName != null">channel_name = #{data.channelName},</if>
|
<if test="data.channelName != null">channel_name = #{data.channelName},</if>
|
||||||
<if test="data.channelType != null">channel_type = #{data.channelType},</if>
|
<if test="data.channelType != null">channel_type = #{data.channelType},</if>
|
||||||
|
<if test="data.userActualBonus != null">user_actual_bonus = #{data.userActualBonus},</if>
|
||||||
|
<if test="data.platformActualBonus != null">platform_actual_bonus = #{data.platformActualBonus},</if>
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<delete id="deleteReconciliationDateById" parameterType="Long">
|
<delete id="deleteReconciliationDateById" parameterType="Long">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user