From cdc4dd26855336ef8e7b46c3606fa0d659aeeea0 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Thu, 14 Sep 2023 17:47:32 +0800 Subject: [PATCH] update --- svc/small_public_platoon_relate_commission.go | 39 ++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/svc/small_public_platoon_relate_commission.go b/svc/small_public_platoon_relate_commission.go index 6ed0abb..d00028a 100644 --- a/svc/small_public_platoon_relate_commission.go +++ b/svc/small_public_platoon_relate_commission.go @@ -9,6 +9,7 @@ import ( "encoding/json" "errors" "fmt" + "strconv" "strings" "xorm.io/xorm" ) @@ -220,8 +221,44 @@ func CalcSmallPublicPlatoonRelateLaXinReward(engine *xorm.Engine, masterId strin } } value, _ := zhios_order_relate_utils.InterfaceToString(detail[k].Val) + var uid int + switch k { + case 0: + uid = userPublicPlatoonRelation.FatherUid1 + break + case 1: + uid = userPublicPlatoonRelation.FatherUid2 + break + case 2: + uid = userPublicPlatoonRelation.FatherUid3 + break + case 3: + uid = userPublicPlatoonRelation.FatherUid4 + break + case 4: + uid = userPublicPlatoonRelation.FatherUid5 + break + case 5: + uid = userPublicPlatoonRelation.FatherUid6 + break + case 6: + uid = userPublicPlatoonRelation.FatherUid7 + break + case 7: + uid = userPublicPlatoonRelation.FatherUid8 + break + case 8: + uid = userPublicPlatoonRelation.FatherUid9 + break + } + + if uid <= 0 { + //TODO::不需要讲理 + continue + } + tmp := md.CalcSmallPublicPlatoonRelateLaXinReward{ - Uid: v, + Uid: strconv.Itoa(uid), CoinId: m.CoinId, Value: value, }