Browse Source

update 共富制度

tags/v1.1.5
DengBiao 2 years ago
parent
commit
f4198e0067
2 changed files with 4 additions and 7 deletions
  1. +2
    -2
      md/public_platoon_relate_commission.go
  2. +2
    -5
      rule/public_platoon_relate_commission.go

+ 2
- 2
md/public_platoon_relate_commission.go View File

@@ -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"` // 共富制度奖励


+ 2
- 5
rule/public_platoon_relate_commission.go View File

@@ -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))
}



Loading…
Cancel
Save