From a3e7d2a38e7374e66023b00a3c6c3f178e203c05 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Wed, 10 Aug 2022 20:11:59 +0800 Subject: [PATCH] 1 --- rule/small_public_platoon_relate_commission.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/rule/small_public_platoon_relate_commission.go b/rule/small_public_platoon_relate_commission.go index 52eda9d..979d2f6 100644 --- a/rule/small_public_platoon_relate_commission.go +++ b/rule/small_public_platoon_relate_commission.go @@ -258,12 +258,11 @@ func smallPublicPlatoon(engine *xorm.Engine, uid, recommendUid int, userPublicPl //唯一标识符(父级id-uid-等级-位置) var uniqueIdentifier = zhios_order_relate_utils.IntToStr(pid) + "-" + zhios_order_relate_utils.IntToStr(uid) + "-" + zhios_order_relate_utils.IntToStr(int(level)) + "-" + zhios_order_relate_utils.IntToStr(position) -<<<<<<< HEAD + if userPublicPlatoonSetting.SettleDay == 0 { userPublicPlatoonSetting.SettleDay = 30 } - // 3、插入 user_public_platoon_relation 记录 -======= + // 3、改变直属父级的 has_son_num 数量 update, err := engine.Where("position = ?", pid).SetExpr("has_son_num", "has_son_num + 1").Update(new(model.UserSmallPublicPlatoonRelation)) if err != nil { @@ -272,8 +271,8 @@ func smallPublicPlatoon(engine *xorm.Engine, uid, recommendUid int, userPublicPl if update == 0 { return userSmallPublicPlatoonRelation, errors.New("更新has_son_num数据出错") } + // 4、插入 user_public_platoon_relation 记录 ->>>>>>> 64fd8a9 (update) now := time.Now() userSmallPublicPlatoonRelation.Uid = uid userSmallPublicPlatoonRelation.FatherUid = fatherUid @@ -375,7 +374,6 @@ func smallReverseDeductionPosition(calcPosition, levelFirstPosition, severalTime return } - func smallFindSuitablePosition(engine *xorm.Engine, position *int, severalTimes float64, fatherLevel int) (suitablePosition, pid int, level float64, err error) { firstSonPosition := smallSearchPositionFirstSonPosition(*position, int(severalTimes)) var tempLevel float64