对账更新
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.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());
|
||||
|
|
|
@ -113,4 +113,10 @@ public class ReconciliationDate extends BaseEntity
|
|||
@ApiModelProperty("渠道名称")
|
||||
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.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
|
||||
</sql>
|
||||
|
||||
|
@ -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
|
||||
</sql>
|
||||
|
||||
|
@ -111,6 +115,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="channelId != null">channel_id,</if>
|
||||
<if test="channelName != null">channel_name,</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 prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<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="channelName != null">#{channelName},</if>
|
||||
<if test="channelType != null">#{channelType},</if>
|
||||
<if test="userActualBonus != null">#{userActualBonus},</if>
|
||||
<if test="platformActualBonus != null">#{platformActualBonus},</if>
|
||||
</trim>
|
||||
</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.channelName != null">channel_name = #{data.channelName},</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>
|
||||
|
||||
<delete id="deleteReconciliationDateById" parameterType="Long">
|
||||
|
|
Loading…
Reference in New Issue
Block a user