Browse Source

add reverse:for v3.7.6 修复

tags/v3.7.6
huangjiajun 2 years ago
parent
commit
ae0ff85715
4 changed files with 47 additions and 36 deletions
  1. +17
    -14
      svc/extend_price_reward.go
  2. +9
    -7
      svc/public_platoon_relate_commission.go
  3. +9
    -7
      svc/reward_commission.go
  4. +12
    -8
      svc/small_public_platoon_relate_commission.go

+ 17
- 14
svc/extend_price_reward.go View File

@@ -66,22 +66,25 @@ func ExtendPriceReward(eg *xorm.Engine, param map[string]string, cfg *comm_plan.
isTrue = true
}
var extendReward = make(map[string]string)
for _, coinId := range lvGrade.ReturnType {
reward := rewardList[coinId]
var pendingAmount = param["commission"]
if zhios_order_relate_utils.StrToInt(coinId) > 0 { //积分更换基数
pendingAmount = param["integral"]
}
rewardAmount := reward.Bili
//如果等级一致 判断位置
if isTrue && zhios_order_relate_utils.StrToInt(reward.BaseVal) > 0 {
position := count % zhios_order_relate_utils.StrToInt64(reward.BaseVal)
if position == 0 {
rewardAmount = reward.PositionBili
if lvGrade != nil {

for _, coinId := range lvGrade.ReturnType {
reward := rewardList[coinId]
var pendingAmount = param["commission"]
if zhios_order_relate_utils.StrToInt(coinId) > 0 { //积分更换基数
pendingAmount = param["integral"]
}
rewardAmount := reward.Bili
//如果等级一致 判断位置
if isTrue && zhios_order_relate_utils.StrToInt(reward.BaseVal) > 0 {
position := count % zhios_order_relate_utils.StrToInt64(reward.BaseVal)
if position == 0 {
rewardAmount = reward.PositionBili
}
}
}

extendReward[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(rewardAmount) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100)
extendReward[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(rewardAmount) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100)
}
}

return extendReward, userProfile.ParentUid


+ 9
- 7
svc/public_platoon_relate_commission.go View File

@@ -57,14 +57,16 @@ func BatchGetPublicPlatoonRelateCommissionByOrder(engine *xorm.Engine, masterId
var directPush = make(map[string]string)
var selfRateList = make(map[string]string)
var commonWealthSystem = make(map[string]string)
for _, coinId := range lvGrade.ReturnType {
var pendingAmount = param.PendingAmount
if zhios_order_relate_utils.StrToInt(coinId) > 0 { //积分更换基数
pendingAmount = param.PendingIntegral
if lvGrade != nil {
for _, coinId := range lvGrade.ReturnType {
var pendingAmount = param.PendingAmount
if zhios_order_relate_utils.StrToInt(coinId) > 0 { //积分更换基数
pendingAmount = param.PendingIntegral
}
selfRateList[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.SelfRateList[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100)
commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100)
directPush[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.DirectPush[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100)
}
selfRateList[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.SelfRateList[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100)
commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100)
directPush[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.DirectPush[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100)
}
//TODO::本次消费产生的共富收益给到谁
var nowBenefitUid string


+ 9
- 7
svc/reward_commission.go View File

@@ -627,14 +627,16 @@ func BatchGetPublicPlatoonRelateCommissionByGoods(engine *xorm.Engine, masterId
var directPush = make(map[string]string)
var selfRateList = make(map[string]string)
var commonWealthSystem = make(map[string]string)
for _, coinId := range lvGrade.ReturnType {
var pendingAmount = param.PendingAmount
if zhios_order_relate_utils.StrToInt(coinId) > 0 { //积分更换基数
pendingAmount = param.PendingIntegral
if lvGrade != nil {
for _, coinId := range lvGrade.ReturnType {
var pendingAmount = param.PendingAmount
if zhios_order_relate_utils.StrToInt(coinId) > 0 { //积分更换基数
pendingAmount = param.PendingIntegral
}
selfRateList[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.SelfRateList[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100)
commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100)
directPush[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.DirectPush[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100)
}
selfRateList[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.SelfRateList[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100)
commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100)
directPush[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.DirectPush[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100)
}
resp[param.Oid] = &md.PublicPlatoonRelateCommissionResp{
Uid: param.Uid,


+ 12
- 8
svc/small_public_platoon_relate_commission.go View File

@@ -50,10 +50,12 @@ func BatchSmallGetPublicPlatoonRelateCommission(engine *xorm.Engine, masterId st
var directPush = make(map[string]string)
var selfRateList = make(map[string]string)
var commonWealthSystem = make(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) / 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) / 100)
if lvGrade != nil {
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) / 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) / 100)
}
}

//TODO::本次消费产生的共富收益给到谁
@@ -177,10 +179,12 @@ func BatchSmallGetPublicPlatoonRelateByGoods(engine *xorm.Engine, masterId strin
var directPush = make(map[string]string)
var selfRateList = make(map[string]string)
var commonWealthSystem = make(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) / 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) / 100)
if lvGrade != nil {
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) / 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) / 100)
}
}
resp[param.Oid] = &md.SmallPublicPlatoonRelateCommissionResp{
PendingAmount: param.PendingAmount,


Loading…
Cancel
Save