From 3eeb37b1578e29e9df241e9c95b68fb21b818647 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Sat, 2 Jul 2022 20:24:10 +0800 Subject: [PATCH] =?UTF-8?q?add=20reverse:for=20v1.1.1=20=E5=88=86=E4=BD=A3?= =?UTF-8?q?=E6=96=B9=E6=A1=88=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/comm_plan/all.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/comm_plan/all.go b/lib/comm_plan/all.go index 16a8af2..bcc9ed1 100644 --- a/lib/comm_plan/all.go +++ b/lib/comm_plan/all.go @@ -199,7 +199,12 @@ func sameMoney(lv, isOnlySubsidy int, restAmt, profit, peerRate, totalRatio, res if restAmt < profit { return 0, restAmt, totalRatio, peerRate, subsidyFee, true } - + if opt == nil { + return 0, restAmt, totalRatio, peerRate, subsidyFee, true + } + if opt.UserRate == nil { + return 0, restAmt, totalRatio, peerRate, subsidyFee, true + } //极差返利 if opt.UserRate[lv].PayMode == 0 && isOnlySubsidy == 0 { restAmt -= profit // 剩余可分