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, }