From f4198e0067761309f1c1b75141a23db4a0b782d2 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Thu, 7 Jul 2022 18:55:05 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=85=B1=E5=AF=8C=E5=88=B6=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- md/public_platoon_relate_commission.go | 4 ++-- rule/public_platoon_relate_commission.go | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/md/public_platoon_relate_commission.go b/md/public_platoon_relate_commission.go index d713e7c..7741990 100644 --- a/md/public_platoon_relate_commission.go +++ b/md/public_platoon_relate_commission.go @@ -21,8 +21,8 @@ type PublicPlatoonRelateCommissionReq struct { type PublicPlatoonRelateCommissionResp struct { Uid string `json:"uid"` CommonWealthBenefitUid string `json:"common_wealth_benefit_uid"` //共富奖励给到的uid - DirectPushBenefitUid string `json:"direct_push_benefit_uid"` //共富奖励给到的uid - PendingAmount string `json:"pending_amount"` //直推奖励给到的uid + DirectPushBenefitUid string `json:"direct_push_benefit_uid"` //直推奖励给到的uid + PendingAmount string `json:"pending_amount"` //处理金额 Oid string `json:"oid"` SelfRateList map[string]string `json:"self_rate_list"` // 自购奖励 CommonWealthSystem map[string]string `json:"common_wealth_system"` // 共富制度奖励 diff --git a/rule/public_platoon_relate_commission.go b/rule/public_platoon_relate_commission.go index d12ba01..7934fb3 100644 --- a/rule/public_platoon_relate_commission.go +++ b/rule/public_platoon_relate_commission.go @@ -49,9 +49,6 @@ func BatchGetPublicPlatoonRelateCommissionByOrder(engine *xorm.Engine, masterId if err != nil || commissionOpt == nil || commissionOpt.Id == 0 { return nil, err } - if err != nil || commissionOpt == nil || commissionOpt.Id == 0 { - return nil, err - } var subsidyTmp map[string]*md.LvGrade if err := json.Unmarshal([]byte(commissionOpt.Data), &subsidyTmp); err != nil { return nil, zhios_order_relate_logx.Warn(fmt.Sprintf("%s:分佣方案数据设置错误", masterId)) @@ -59,8 +56,8 @@ func BatchGetPublicPlatoonRelateCommissionByOrder(engine *xorm.Engine, masterId lvGrade := subsidyTmp[param.UserLevel] var selfRateList, commonWealthSystem, directPush map[string]string for _, coinId := range lvGrade.ReturnType { - selfRateList[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.SelfRateList[coinId]) * zhios_order_relate_utils.StrToFloat64(param.PendingAmount)) - commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId]) * zhios_order_relate_utils.StrToFloat64(param.PendingAmount)) + selfRateList[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.SelfRateList[coinId]) * zhios_order_relate_utils.StrToFloat64(param.PendingAmount) / 100) + commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId]) * zhios_order_relate_utils.StrToFloat64(param.PendingAmount) / 100) directPush[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.DirectPush[coinId]) * zhios_order_relate_utils.StrToFloat64(param.PendingAmount)) }