Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

tags/v3.7.7
DengBiao pirms 1 gada
vecāks
revīzija
220bf1e63c
4 mainītis faili ar 47 papildinājumiem un 36 dzēšanām
  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 Parādīt failu

@@ -66,22 +66,25 @@ func ExtendPriceReward(eg *xorm.Engine, param map[string]string, cfg *comm_plan.
isTrue = true isTrue = true
} }
var extendReward = make(map[string]string) 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 return extendReward, userProfile.ParentUid


+ 9
- 7
svc/public_platoon_relate_commission.go Parādīt failu

@@ -57,14 +57,16 @@ func BatchGetPublicPlatoonRelateCommissionByOrder(engine *xorm.Engine, masterId
var directPush = make(map[string]string) var directPush = make(map[string]string)
var selfRateList = make(map[string]string) var selfRateList = make(map[string]string)
var commonWealthSystem = 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::本次消费产生的共富收益给到谁 //TODO::本次消费产生的共富收益给到谁
var nowBenefitUid string var nowBenefitUid string


+ 9
- 7
svc/reward_commission.go Parādīt failu

@@ -627,14 +627,16 @@ func BatchGetPublicPlatoonRelateCommissionByGoods(engine *xorm.Engine, masterId
var directPush = make(map[string]string) var directPush = make(map[string]string)
var selfRateList = make(map[string]string) var selfRateList = make(map[string]string)
var commonWealthSystem = 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{ resp[param.Oid] = &md.PublicPlatoonRelateCommissionResp{
Uid: param.Uid, Uid: param.Uid,


+ 12
- 8
svc/small_public_platoon_relate_commission.go Parādīt failu

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


Notiek ielāde…
Atcelt
Saglabāt