From 0e15e700253aa9fd311f38b1fe4af551a2b5c256 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Tue, 23 Apr 2024 00:39:28 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/model/user_public_platoon_income_records.go | 1 + 1 file changed, 1 insertion(+) diff --git a/db/model/user_public_platoon_income_records.go b/db/model/user_public_platoon_income_records.go index fa2a577..efefda4 100644 --- a/db/model/user_public_platoon_income_records.go +++ b/db/model/user_public_platoon_income_records.go @@ -17,4 +17,5 @@ type UserPublicPlatoonIncomeRecords struct { Oid string `json:"oid" xorm:"comment('订单号') VARCHAR(100)"` Type int `json:"type" xorm:"not null default 0 comment('0收入 1支出') INT(11)"` BeforeAmount string `json:"before_amount" xorm:"comment('变更前金额') VARCHAR(100)"` + Source string `json:"source" xorm:"comment('变更前金额') VARCHAR(100)"` } From ee1fadd133d200be44faa0130b434ac3ab5585a9 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Tue, 23 Apr 2024 23:01:03 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- svc/reward_commission.go | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/svc/reward_commission.go b/svc/reward_commission.go index e8bd486..64f4cc4 100644 --- a/svc/reward_commission.go +++ b/svc/reward_commission.go @@ -151,14 +151,17 @@ func GetRewardCommission(engine *xorm.Engine, rmd *md.CommissionParam, isShare b } profit := zhios_order_relate_utils.StrToFloat64(reward.SelfRateList["0"]) var ulink = &comm_plan.LvUser{} - if zhios_order_relate_utils.StrToInt(reward.CommonWealthBenefitUid) != zhios_order_relate_utils.StrToInt(reward.DirectPushBenefitUid) { - //共富收益处理 - ulink = getRewardLink(reward.CommonWealthBenefitUid, 2, reward.CommonWealthSystem, ulink, "public_platoon", cfg) - //直推收益处理 - ulink = getRewardLink(reward.DirectPushBenefitUid, 1, reward.DirectPush, ulink, "extend", cfg) - } else { //共富 直推都是同一个用户的处理 - ulink = getRewardLinkCommWithExtend(reward.CommonWealthBenefitUid, 3, reward.CommonWealthSystem, reward.DirectPush, ulink, cfg) + if returnAllLevel { + if zhios_order_relate_utils.StrToInt(reward.CommonWealthBenefitUid) != zhios_order_relate_utils.StrToInt(reward.DirectPushBenefitUid) { + //共富收益处理 + ulink = getRewardLink(reward.CommonWealthBenefitUid, 2, reward.CommonWealthSystem, ulink, "public_platoon", cfg) + //直推收益处理 + ulink = getRewardLink(reward.DirectPushBenefitUid, 1, reward.DirectPush, ulink, "extend", cfg) + } else { //共富 直推都是同一个用户的处理 + ulink = getRewardLinkCommWithExtend(reward.CommonWealthBenefitUid, 3, reward.CommonWealthSystem, reward.DirectPush, ulink, cfg) + } } + //自购 ulink = getRewardLink(reward.Uid, 0, reward.SelfRateList, ulink, "own", cfg) if zhios_order_relate_utils.StrToFloat64(commArr["integralRewardMultiple"]) > 0 {