diff --git a/Services/Hncore.Pass.Vpn/Service/ProductOrderService.cs b/Services/Hncore.Pass.Vpn/Service/ProductOrderService.cs index bc98111..8f5e938 100644 --- a/Services/Hncore.Pass.Vpn/Service/ProductOrderService.cs +++ b/Services/Hncore.Pass.Vpn/Service/ProductOrderService.cs @@ -933,24 +933,23 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel, var deduct_money = agentScoreEntity.score_value / lastOrder.AccountCount; - var score_money = deduct_money - refundAmount; - if(score_money <= 0){ - score_money = deduct_money; - } else { - score_money = refundAmount; - } + // + //使用天数 回补佣金 + var re_money = useDay * (agentPriceEntity.refund - refundDayPrice.Value) * accountInfo.ConnectCount; + //佣金 + var score_money = agentEntity.account - deduct_money + re_money; var agnetScoreEntity = new AgentScoreEntity() { agent_id = order.agent_id, order_id = order.Id, score_type = 2, - score_value = score_money, + score_value = re_money - deduct_money, remark = "客户退款" + account, agent_name = agentEntity.username, op_user = order.UserName, rest_amount1 = agentEntity.account, - rest_amount2 = agentEntity.account - score_money + rest_amount2 = score_money }; agentEntity.account -= score_money;