Bladeren bron

update 共富制度

tags/v1.3.7
DengBiao 2 jaren geleden
bovenliggende
commit
41ac53f3a5
1 gewijzigde bestanden met toevoegingen van 14 en 4 verwijderingen
  1. +14
    -4
      svc/public_platoon_relate_commission.go

+ 14
- 4
svc/public_platoon_relate_commission.go Bestand weergeven

@@ -79,12 +79,22 @@ func BatchGetPublicPlatoonRelateCommissionByOrder(engine *xorm.Engine, masterId
fatherPositions := strings.Split(userPublicPlatoonRelation.FatherUid, "-")
var fatherPosition string
userPublicPlatoonRelation.ReturnCommissionNum++
remainder := (userPublicPlatoonRelation.ReturnCommissionNum) % userPublicPlatoonSetting.SeveralRows
if remainder == 0 {
fatherPosition = fatherPositions[userPublicPlatoonSetting.SeveralRows-1]
if len(fatherPositions) < userPublicPlatoonSetting.SeveralRows {
remainder1 := (userPublicPlatoonRelation.ReturnCommissionNum) % len(fatherPositions)
if remainder1 == 0 {
fatherPosition = fatherPositions[len(fatherPositions)-1]
} else {
fatherPosition = fatherPositions[len(fatherPositions)-remainder1]
}
} else {
fatherPosition = fatherPositions[remainder-1]
remainder2 := (userPublicPlatoonRelation.ReturnCommissionNum) % userPublicPlatoonSetting.SeveralRows
if remainder2 == 0 {
fatherPosition = fatherPositions[userPublicPlatoonSetting.SeveralRows-1]
} else {
fatherPosition = fatherPositions[remainder2-1]
}
}

nowBenefitUsers, err := db.UserPublicPlatoonRelationGetOneByParams(engine, map[string]interface{}{
"key": "position",
"value": fatherPosition,


Laden…
Annuleren
Opslaan