|
|
@@ -165,6 +165,9 @@ func OneCirclesPublicPlatoon(engine *xorm.Engine, uid, recommendUid int, oneCirc |
|
|
|
if m.Level8 == 0 { |
|
|
|
m.Level8-- |
|
|
|
} |
|
|
|
if m.Level9 == 0 { |
|
|
|
m.Level9-- |
|
|
|
} |
|
|
|
|
|
|
|
standardSmallPublicPlatoonRelation.Level1 = m.Level + 1 |
|
|
|
standardSmallPublicPlatoonRelation.Level2 = m.Level1 + 1 |
|
|
@@ -199,6 +202,7 @@ func OneCirclesPublicPlatoon(engine *xorm.Engine, uid, recommendUid int, oneCirc |
|
|
|
standardSmallPublicPlatoonRelation.FatherUid6 = oneCirclesPublicPlatoonUserRelations[0].FatherUid6 |
|
|
|
standardSmallPublicPlatoonRelation.FatherUid7 = oneCirclesPublicPlatoonUserRelations[0].FatherUid7 |
|
|
|
standardSmallPublicPlatoonRelation.FatherUid8 = oneCirclesPublicPlatoonUserRelations[0].FatherUid8 |
|
|
|
standardSmallPublicPlatoonRelation.FatherUid9 = oneCirclesPublicPlatoonUserRelations[0].FatherUid9 |
|
|
|
|
|
|
|
standardSmallPublicPlatoonRelation.Pid1 = oneCirclesPublicPlatoonUserRelations[0].Pid1 |
|
|
|
standardSmallPublicPlatoonRelation.Pid2 = oneCirclesPublicPlatoonUserRelations[0].Pid2 |
|
|
@@ -208,6 +212,7 @@ func OneCirclesPublicPlatoon(engine *xorm.Engine, uid, recommendUid int, oneCirc |
|
|
|
standardSmallPublicPlatoonRelation.Pid6 = oneCirclesPublicPlatoonUserRelations[0].Pid6 |
|
|
|
standardSmallPublicPlatoonRelation.Pid7 = oneCirclesPublicPlatoonUserRelations[0].Pid7 |
|
|
|
standardSmallPublicPlatoonRelation.Pid8 = oneCirclesPublicPlatoonUserRelations[0].Pid8 |
|
|
|
standardSmallPublicPlatoonRelation.Pid9 = oneCirclesPublicPlatoonUserRelations[0].Pid9 |
|
|
|
|
|
|
|
standardSmallPublicPlatoonRelation.Position1 = oneCirclesPublicPlatoonUserRelations[0].Position1 + 1 |
|
|
|
if oneCirclesPublicPlatoonUserRelations[0].Position2 != 0 { |
|
|
@@ -231,6 +236,9 @@ func OneCirclesPublicPlatoon(engine *xorm.Engine, uid, recommendUid int, oneCirc |
|
|
|
if oneCirclesPublicPlatoonUserRelations[0].Position8 != 0 { |
|
|
|
standardSmallPublicPlatoonRelation.Position8 = oneCirclesPublicPlatoonUserRelations[0].Position8 + 1 |
|
|
|
} |
|
|
|
if oneCirclesPublicPlatoonUserRelations[0].Position9 != 0 { |
|
|
|
standardSmallPublicPlatoonRelation.Position9 = oneCirclesPublicPlatoonUserRelations[0].Position9 + 1 |
|
|
|
} |
|
|
|
|
|
|
|
standardSmallPublicPlatoonRelation.Level1 = oneCirclesPublicPlatoonUserRelations[0].Level1 |
|
|
|
standardSmallPublicPlatoonRelation.Level2 = oneCirclesPublicPlatoonUserRelations[0].Level2 |
|
|
@@ -240,6 +248,7 @@ func OneCirclesPublicPlatoon(engine *xorm.Engine, uid, recommendUid int, oneCirc |
|
|
|
standardSmallPublicPlatoonRelation.Level6 = oneCirclesPublicPlatoonUserRelations[0].Level6 |
|
|
|
standardSmallPublicPlatoonRelation.Level7 = oneCirclesPublicPlatoonUserRelations[0].Level7 |
|
|
|
standardSmallPublicPlatoonRelation.Level8 = oneCirclesPublicPlatoonUserRelations[0].Level8 |
|
|
|
standardSmallPublicPlatoonRelation.Level9 = oneCirclesPublicPlatoonUserRelations[0].Level9 |
|
|
|
standardSmallPublicPlatoonRelation.LevelTotal = oneCirclesPublicPlatoonUserRelations[0].LevelTotal |
|
|
|
|
|
|
|
} |
|
|
@@ -277,6 +286,7 @@ func OneCirclesPublicPlatoon(engine *xorm.Engine, uid, recommendUid int, oneCirc |
|
|
|
oneCirclesPublicPlatoonUserRelation.FatherUid6 = standardSmallPublicPlatoonRelation.FatherUid6 |
|
|
|
oneCirclesPublicPlatoonUserRelation.FatherUid7 = standardSmallPublicPlatoonRelation.FatherUid7 |
|
|
|
oneCirclesPublicPlatoonUserRelation.FatherUid8 = standardSmallPublicPlatoonRelation.FatherUid8 |
|
|
|
oneCirclesPublicPlatoonUserRelation.FatherUid9 = standardSmallPublicPlatoonRelation.FatherUid9 |
|
|
|
oneCirclesPublicPlatoonUserRelation.Pid1 = standardSmallPublicPlatoonRelation.Pid1 |
|
|
|
oneCirclesPublicPlatoonUserRelation.Pid2 = standardSmallPublicPlatoonRelation.Pid2 |
|
|
|
oneCirclesPublicPlatoonUserRelation.Pid3 = standardSmallPublicPlatoonRelation.Pid3 |
|
|
@@ -285,6 +295,7 @@ func OneCirclesPublicPlatoon(engine *xorm.Engine, uid, recommendUid int, oneCirc |
|
|
|
oneCirclesPublicPlatoonUserRelation.Pid6 = standardSmallPublicPlatoonRelation.Pid6 |
|
|
|
oneCirclesPublicPlatoonUserRelation.Pid7 = standardSmallPublicPlatoonRelation.Pid7 |
|
|
|
oneCirclesPublicPlatoonUserRelation.Pid8 = standardSmallPublicPlatoonRelation.Pid8 |
|
|
|
oneCirclesPublicPlatoonUserRelation.Pid9 = standardSmallPublicPlatoonRelation.Pid9 |
|
|
|
oneCirclesPublicPlatoonUserRelation.Position = 1 |
|
|
|
oneCirclesPublicPlatoonUserRelation.Position1 = standardSmallPublicPlatoonRelation.Position1 |
|
|
|
oneCirclesPublicPlatoonUserRelation.Position2 = standardSmallPublicPlatoonRelation.Position2 |
|
|
@@ -294,6 +305,7 @@ func OneCirclesPublicPlatoon(engine *xorm.Engine, uid, recommendUid int, oneCirc |
|
|
|
oneCirclesPublicPlatoonUserRelation.Position6 = standardSmallPublicPlatoonRelation.Position6 |
|
|
|
oneCirclesPublicPlatoonUserRelation.Position7 = standardSmallPublicPlatoonRelation.Position7 |
|
|
|
oneCirclesPublicPlatoonUserRelation.Position8 = standardSmallPublicPlatoonRelation.Position8 |
|
|
|
oneCirclesPublicPlatoonUserRelation.Position9 = standardSmallPublicPlatoonRelation.Position9 |
|
|
|
oneCirclesPublicPlatoonUserRelation.Level = 1 |
|
|
|
oneCirclesPublicPlatoonUserRelation.Level1 = standardSmallPublicPlatoonRelation.Level1 |
|
|
|
oneCirclesPublicPlatoonUserRelation.Level2 = standardSmallPublicPlatoonRelation.Level2 |
|
|
@@ -303,6 +315,7 @@ func OneCirclesPublicPlatoon(engine *xorm.Engine, uid, recommendUid int, oneCirc |
|
|
|
oneCirclesPublicPlatoonUserRelation.Level6 = standardSmallPublicPlatoonRelation.Level6 |
|
|
|
oneCirclesPublicPlatoonUserRelation.Level7 = standardSmallPublicPlatoonRelation.Level7 |
|
|
|
oneCirclesPublicPlatoonUserRelation.Level8 = standardSmallPublicPlatoonRelation.Level8 |
|
|
|
oneCirclesPublicPlatoonUserRelation.Level9 = standardSmallPublicPlatoonRelation.Level9 |
|
|
|
oneCirclesPublicPlatoonUserRelation.LevelTotal = standardSmallPublicPlatoonRelation.LevelTotal |
|
|
|
oneCirclesPublicPlatoonUserRelation.RecommendUid = recommendUid |
|
|
|
oneCirclesPublicPlatoonUserRelation.JoinAt = now.Format("2006-01-02 15:04:05") |
|
|
@@ -419,6 +432,9 @@ func oneCirclesSmallFindSuitablePosition(engine *xorm.Engine, position *int, sev |
|
|
|
if list[0].Level8 == 0 { |
|
|
|
list[0].Level8-- |
|
|
|
} |
|
|
|
if list[0].Level9 == 0 { |
|
|
|
list[0].Level9-- |
|
|
|
} |
|
|
|
standardSmallPublicPlatoonRelation.Level1 = list[0].Level + 1 |
|
|
|
standardSmallPublicPlatoonRelation.Level2 = list[0].Level1 + 1 |
|
|
|
standardSmallPublicPlatoonRelation.Level3 = list[0].Level2 + 1 |
|
|
@@ -462,6 +478,9 @@ func oneCirclesSmallFindSuitablePosition(engine *xorm.Engine, position *int, sev |
|
|
|
if oneCirclesPublicPlatoonUserRelations[0].Position8 == 0 { |
|
|
|
standardSmallPublicPlatoonRelation.Position8 = -1 |
|
|
|
} |
|
|
|
if oneCirclesPublicPlatoonUserRelations[0].Position9 == 0 { |
|
|
|
standardSmallPublicPlatoonRelation.Position9 = -1 |
|
|
|
} |
|
|
|
|
|
|
|
standardSmallPublicPlatoonRelation = md.StandardSmallPublicPlatoonRelation{ |
|
|
|
FatherUid1: oneCirclesPublicPlatoonUserRelations[0].FatherUid1, |
|
|
@@ -472,6 +491,7 @@ func oneCirclesSmallFindSuitablePosition(engine *xorm.Engine, position *int, sev |
|
|
|
FatherUid6: oneCirclesPublicPlatoonUserRelations[0].FatherUid6, |
|
|
|
FatherUid7: oneCirclesPublicPlatoonUserRelations[0].FatherUid7, |
|
|
|
FatherUid8: oneCirclesPublicPlatoonUserRelations[0].FatherUid8, |
|
|
|
FatherUid9: oneCirclesPublicPlatoonUserRelations[0].FatherUid9, |
|
|
|
Pid1: oneCirclesPublicPlatoonUserRelations[0].Pid1, |
|
|
|
Pid2: oneCirclesPublicPlatoonUserRelations[0].Pid2, |
|
|
|
Pid3: oneCirclesPublicPlatoonUserRelations[0].Pid3, |
|
|
@@ -480,6 +500,7 @@ func oneCirclesSmallFindSuitablePosition(engine *xorm.Engine, position *int, sev |
|
|
|
Pid6: oneCirclesPublicPlatoonUserRelations[0].Pid6, |
|
|
|
Pid7: oneCirclesPublicPlatoonUserRelations[0].Pid7, |
|
|
|
Pid8: oneCirclesPublicPlatoonUserRelations[0].Pid8, |
|
|
|
Pid9: oneCirclesPublicPlatoonUserRelations[0].Pid9, |
|
|
|
Position1: oneCirclesPublicPlatoonUserRelations[0].Position1 + 1, |
|
|
|
Position2: oneCirclesPublicPlatoonUserRelations[0].Position2 + 1, |
|
|
|
Position3: oneCirclesPublicPlatoonUserRelations[0].Position3 + 1, |
|
|
@@ -488,6 +509,7 @@ func oneCirclesSmallFindSuitablePosition(engine *xorm.Engine, position *int, sev |
|
|
|
Position6: oneCirclesPublicPlatoonUserRelations[0].Position6 + 1, |
|
|
|
Position7: oneCirclesPublicPlatoonUserRelations[0].Position7 + 1, |
|
|
|
Position8: oneCirclesPublicPlatoonUserRelations[0].Position8 + 1, |
|
|
|
Position9: oneCirclesPublicPlatoonUserRelations[0].Position9 + 1, |
|
|
|
Level1: oneCirclesPublicPlatoonUserRelations[0].Level1, |
|
|
|
Level2: oneCirclesPublicPlatoonUserRelations[0].Level2, |
|
|
|
Level3: oneCirclesPublicPlatoonUserRelations[0].Level3, |
|
|
@@ -496,6 +518,7 @@ func oneCirclesSmallFindSuitablePosition(engine *xorm.Engine, position *int, sev |
|
|
|
Level6: oneCirclesPublicPlatoonUserRelations[0].Level6, |
|
|
|
Level7: oneCirclesPublicPlatoonUserRelations[0].Level7, |
|
|
|
Level8: oneCirclesPublicPlatoonUserRelations[0].Level8, |
|
|
|
Level9: oneCirclesPublicPlatoonUserRelations[0].Level9, |
|
|
|
LevelTotal: oneCirclesPublicPlatoonUserRelations[0].LevelTotal, |
|
|
|
} |
|
|
|
return standardSmallPublicPlatoonRelation, fatherUid, nil |
|
|
@@ -584,6 +607,16 @@ func oneCirclesGetPosition(m model.OneCirclesPublicPlatoonUserRelation, times in |
|
|
|
fatherUid = m.FatherUid8 |
|
|
|
fatherUidName = "father_uid8" |
|
|
|
} |
|
|
|
if times == 9 { |
|
|
|
position = m.Position9 |
|
|
|
positionName = "position9" |
|
|
|
pid = m.Pid9 |
|
|
|
pidName = "pid9" |
|
|
|
level = m.Level9 |
|
|
|
levelName = "level9" |
|
|
|
fatherUid = m.FatherUid9 |
|
|
|
fatherUidName = "father_uid9" |
|
|
|
} |
|
|
|
|
|
|
|
return |
|
|
|
} |
|
|
|